Skip to content

The agent that grows with you

refactor(desktop-i18n): move billingBlock copy into en_billing sibling

Austin Pickettf7b6b4ec8983
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 6c37d252d37..fa31d261686 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -2,6 +2,7 @@ import { FIELD_DESCRIPTIONS, FIELD_LABELS } from '@/app/settings/constants'
import { enAppTour, enHandoffTour } from './en_app_tour'
import { enAuxTasks } from './en_aux_tasks'
+import { enBilling } from './en_billing'
import { enBoot } from './en_boot'
import { enCatalogInstall } from './en_catalog_install'
import { enLocalModels } from './en_local_models'
@@ -508,14 +509,7 @@ export const en: Translations = {
...enNotices,
- billingBlock: {
- titleNous: 'Out of Nous credits',
- titleProvider: provider => `Out of credits — ${provider}`,
- fallbackMessage: 'Your account is out of credits. Add credits to keep going.',
- openBilling: 'Open billing',
- addCredits: 'Add credits',
- dismiss: 'Dismiss'
- },
+ ...enBilling,
sendDiagnostics: {
title: 'Send diagnostics to Nous',
diff --git a/apps/desktop/src/i18n/en_billing.ts b/apps/desktop/src/i18n/en_billing.ts
new file mode 100644
index 00000000000..07f5d3d6b8c
--- /dev/null
+++ b/apps/desktop/src/i18n/en_billing.ts
@@ -0,0 +1,13 @@
+import type { BillingTranslations } from './types_billing'
+
+// Out-of-credits overlay copy (Nous vs. third-party providers), spread into en.ts.
+export const enBilling: BillingTranslations = {
+ billingBlock: {
+ titleNous: 'Out of Nous credits',
+ titleProvider: provider => `Out of credits — ${provider}`,
+ fallbackMessage: 'Your account is out of credits. Add credits to keep going.',
+ openBilling: 'Open billing',
+ addCredits: 'Add credits',
+ dismiss: 'Dismiss'
+ }
+}
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index b04a8c86a21..72df37a3e89 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -10,6 +10,7 @@ import type { TipId } from '@/lib/tips/catalog'
import type { AppTourTranslations, HandoffTourTranslations } from './types_app_tour'
import type { AuxTaskCopyMap } from './types_aux_tasks'
+import type { BillingTranslations } from './types_billing'
import type { BootTranslations } from './types_boot'
import type { CatalogInstallTranslations } from './types_catalog_install'
import type { ModelMenuTranslations } from './types_model_menu'
@@ -539,14 +540,7 @@ export interface Translations extends NoticeTranslations {
}
}
- billingBlock: {
- titleNous: string
- titleProvider: (provider: string) => string
- fallbackMessage: string
- openBilling: string
- addCredits: string
- dismiss: string
- }
+ billingBlock: BillingTranslations['billingBlock']
sendDiagnostics: {
title: string
diff --git a/apps/desktop/src/i18n/types_billing.ts b/apps/desktop/src/i18n/types_billing.ts
new file mode 100644
index 00000000000..8969250a274
--- /dev/null
+++ b/apps/desktop/src/i18n/types_billing.ts
@@ -0,0 +1,11 @@
+// Out-of-credits overlay copy; `Translations` spreads this in.
+export interface BillingTranslations {
+ billingBlock: {
+ titleNous: string
+ titleProvider: (provider: string) => string
+ fallbackMessage: string
+ openBilling: string
+ addCredits: string
+ dismiss: string
+ }
+}