From 7d3a8140d4d352de762ca8242aea89f194b2cd96 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 20:27:22 -0800 Subject: [PATCH] chore(billing): JA-18 localization catalog and lint fixes --- .../billing/PlanBillingUsage.test.tsx | 6 ++- .../src/i18n/en-runtime-required.json | 12 +++++- src/renderer/src/i18n/locales/en.json | 43 +++++++++++++++---- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/components/billing/PlanBillingUsage.test.tsx b/src/renderer/src/components/billing/PlanBillingUsage.test.tsx index 19293abef85..31f0aa5e1ac 100644 --- a/src/renderer/src/components/billing/PlanBillingUsage.test.tsx +++ b/src/renderer/src/components/billing/PlanBillingUsage.test.tsx @@ -16,7 +16,11 @@ const overageOn: OrcaBillingEntitlement = { } function capField(): HTMLInputElement { - return screen.getByLabelText('Monthly spend cap') as HTMLInputElement + const field = screen.getByLabelText('Monthly spend cap') + if (!(field instanceof HTMLInputElement)) { + throw new Error('the spend cap is not an input') + } + return field } describe('spend cap field', () => { diff --git a/src/renderer/src/i18n/en-runtime-required.json b/src/renderer/src/i18n/en-runtime-required.json index 5a71a0907a4..1da04ca5f20 100644 --- a/src/renderer/src/i18n/en-runtime-required.json +++ b/src/renderer/src/i18n/en-runtime-required.json @@ -254,7 +254,17 @@ "trialHoursLeft_one": "Trial · {{count}} sandbox hour left", "trialHoursLeft_other": "Trial · {{count}} sandbox hours left", "trialHoursUsed_one": "{{used}} of {{count}} sandbox hour used", - "trialHoursUsed_other": "{{used}} of {{count}} sandbox hours used" + "trialHoursUsed_other": "{{used}} of {{count}} sandbox hours used", + "usage": { + "otherMembers_one": "{{count}} other", + "otherMembers_other": "{{count}} others", + "otherWorkspaces_one": "{{count}} other workspace", + "otherWorkspaces_other": "{{count}} other workspaces", + "total_one": "{{value}} sandbox hour", + "total_other": "{{value}} sandbox hours", + "windowTotal_one": "{{value}} sandbox hour in 30 days", + "windowTotal_other": "{{value}} sandbox hours in 30 days" + } }, "browser-pane": { "markup": { diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index ec448c98c22..c8f7938e49f 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -20550,7 +20550,6 @@ "renewsOn": "Renews {{value0}}", "continueInBrowser": "Continue in your browser. This updates when you come back.", "title": "Plan & billing", - "refresh": "Refresh plan", "menuItem": "Plan & billing", "statusActive": "Active", "statusTrial": "Trial", @@ -20560,7 +20559,6 @@ "overageNoPlan": "Overage needs an active plan.", "resets": "Hours reset {{value0}}", "overageTitle": "Overage", - "overageToggle": "Allow overage", "overageSpent": "{{value0}} of {{value1}} monthly cap spent", "saveCap": "Save", "monthly": "Monthly", @@ -20817,10 +20815,6 @@ "openForbidden2": "Only an owner or admin can manage billing.", "openTeamRequired": "Plans belong to a team. Create a team, then choose a plan.", "openSignedOut2": "Sign in to Orca again to manage your team.", - "overageDescription7": "Optional overage at {{rate}} per sandbox hour, billed by the minute, up to a monthly spend cap you set ({{cap}} by default).", - "overageMemberHint": "Owners and admins can change overage.", - "overageOffRead": "Off", - "overageOnRead": "On", "overagePaymentFailed": "Update the payment method before changing overage.", "paymentAsleepBody": "New sandboxes can’t start and running sandboxes are asleep. They can wake again once the payment goes through. Your files are safe.", "paymentGraceBody2": "New sandboxes can’t start. Running sandboxes go to sleep on {{value0}} unless the payment goes through.", @@ -20833,7 +20827,6 @@ "resetsEnds": "Hours reset {{value0}} · Plan ends {{value1}}", "resetsRenews": "Hours reset {{value0}} · Renews {{value1}}", "sandboxHoursUsedMonth": "{{value0}} of {{value1}} sandbox hours used this month", - "overageDescriptionOn4": "Optional overage at {{rate}} per sandbox hour, billed by the minute, up to a monthly spend cap you set.", "reasonCapMember4": "Spend cap reached. Running sandboxes go to sleep and new ones can’t start. Nothing is deleted, and your files are safe. Ask an owner or admin to raise the spend cap.", "reasonGraceExpired3": "Payment failed. New sandboxes can’t start and running sandboxes are asleep. Update your payment method. Your files are safe.", "reasonGraceExpiredMember2": "Payment failed. New sandboxes can’t start and running sandboxes are asleep. Ask an owner or admin to update the payment method. Your files are safe.", @@ -20868,7 +20861,41 @@ "trialProduct": "Orca Cloud", "trialRowChoosePlan": "{{trial}}. Choose plan", "trialUsedUpTitle": "Your trial is used up", - "unconfigured": "Billing isn’t available in this build of Orca." + "unconfigured": "Billing isn’t available in this build of Orca.", + "teamPlanTitle": "{{team}} · {{plan}} plan", + "planTitle": "{{plan}} plan", + "overage": { + "capHint": "{{rate}} per sandbox hour after your included hours, billed by the minute. $0 keeps overage off.", + "memberOn": "On, up to {{cap}} a month.", + "memberOff2": "Off. Ask an owner or admin to turn it on.", + "turnOn": "Turn on with a {{cap}} cap" + }, + "usage": { + "title": "Last 30 days", + "loadFailed": "Couldn’t load your usage history", + "loading": "Loading your usage history…", + "empty": "No sandbox hours yet. Usage shows here once your team runs cloud workspaces.", + "topWorkspaces": "Top workspaces", + "topMembers": "Top members", + "hoursColumn": "Sandbox hours", + "chartLabel": "Sandbox hours per day, last 30 days. Use the arrow keys to read each day.", + "today": "Today", + "tableCaption": "Sandbox hours per day", + "you": "You", + "formerMember": "Former member", + "otherMembers_one": "{{count}} other", + "otherMembers_other": "{{count}} others", + "unattributed": "Not attributed to a member", + "deletedWorkspace": "Deleted workspace", + "otherWorkspaces_one": "{{count}} other workspace", + "otherWorkspaces_other": "{{count}} other workspaces", + "windowTotal_one": "{{value}} sandbox hour in 30 days", + "windowTotal_other": "{{value}} sandbox hours in 30 days", + "total_one": "{{value}} sandbox hour", + "total_other": "{{value}} sandbox hours", + "yours": "You used {{yours}} of your team’s {{total}} sandbox hours.", + "dayLine": "{{date}} · {{hours}}" + } }, "ports": { "RuntimePortAutoForwarder": {