diff --git a/src/features/localization/renderer/locales/en/team.json b/src/features/localization/renderer/locales/en/team.json index cc284f8d..bb5fd673 100644 --- a/src/features/localization/renderer/locales/en/team.json +++ b/src/features/localization/renderer/locales/en/team.json @@ -2062,6 +2062,10 @@ }, "joining": { "teammatesStillJoining": "{{count}} teammates still joining", + "teammatesStillJoining_one": "{{count}} teammate still joining", + "teammatesStillJoining_few": "{{count}} teammates still joining", + "teammatesStillJoining_many": "{{count}} teammates still joining", + "teammatesStillJoining_other": "{{count}} teammates still joining", "teammatesConfirmedRatio": "{{count}}/{{total}} teammates confirmed" }, "ready": { diff --git a/src/features/localization/renderer/locales/ru/team.json b/src/features/localization/renderer/locales/ru/team.json index 159379e7..4eb9fd8e 100644 --- a/src/features/localization/renderer/locales/ru/team.json +++ b/src/features/localization/renderer/locales/ru/team.json @@ -2062,6 +2062,10 @@ }, "joining": { "teammatesStillJoining": "{{count}} участник(ов) ещё подключается", + "teammatesStillJoining_one": "{{count}} участник ещё подключается", + "teammatesStillJoining_few": "{{count}} участника ещё подключаются", + "teammatesStillJoining_many": "{{count}} участников ещё подключается", + "teammatesStillJoining_other": "{{count}} участника(ов) ещё подключается", "teammatesConfirmedRatio": "{{count}}/{{total}} участников подтверждено" }, "ready": { diff --git a/src/features/localization/renderer/resources.d.ts b/src/features/localization/renderer/resources.d.ts index 96aec47d..884e9862 100644 --- a/src/features/localization/renderer/resources.d.ts +++ b/src/features/localization/renderer/resources.d.ts @@ -4503,6 +4503,10 @@ export default interface Resources { joining: { teammatesConfirmedRatio: '{{count}}/{{total}} teammates confirmed'; teammatesStillJoining: '{{count}} teammates still joining'; + teammatesStillJoining_few: '{{count}} teammates still joining'; + teammatesStillJoining_many: '{{count}} teammates still joining'; + teammatesStillJoining_one: '{{count}} teammate still joining'; + teammatesStillJoining_other: '{{count}} teammates still joining'; }; nameListWithMore: '{{names}}, +{{count}} more'; namedPendingDiagnostic: '{{label}}: {{names}}'; diff --git a/src/renderer/components/runtime/providerConnectionUi.ts b/src/renderer/components/runtime/providerConnectionUi.ts index d1b7c22d..e5fbb883 100644 --- a/src/renderer/components/runtime/providerConnectionUi.ts +++ b/src/renderer/components/runtime/providerConnectionUi.ts @@ -2,7 +2,32 @@ import { CLI_PROVIDER_STATUS_DEFERRED_MESSAGE } from '@shared/types/cliInstaller import type { CliProviderAuthMode, CliProviderStatus } from '@shared/types'; -type ProviderConnectionTranslator = unknown; +type ProviderConnectionTranslator = object; + +function interpolateProviderConnectionFallback( + value: string, + options?: Record +): string { + if (!options) { + return value; + } + + return value.replace(/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g, (match: string, optionKey: string) => { + const optionValue = options[optionKey]; + if (optionValue === undefined || optionValue === null) { + return match; + } + if ( + typeof optionValue === 'string' || + typeof optionValue === 'number' || + typeof optionValue === 'boolean' || + typeof optionValue === 'bigint' + ) { + return String(optionValue); + } + return match; + }); +} function translateProviderConnection( t: ProviderConnectionTranslator | undefined, @@ -10,14 +35,20 @@ function translateProviderConnection( fallback: string, options?: Record ): string { + const interpolatedFallback = interpolateProviderConnectionFallback(fallback, options); if (!t) { - return fallback; + return interpolatedFallback; } - return (t as (translationKey: string, options?: Record) => string)(key, { - defaultValue: fallback, - ...options, - }); + const translated = (t as (translationKey: string, options?: Record) => string)( + key, + { + ...options, + defaultValue: fallback, + } + ); + + return interpolateProviderConnectionFallback(translated, options); } const CODEX_NATIVE_LABEL = 'Codex native'; diff --git a/src/renderer/components/team/dialogs/ProvisioningProviderStatusList.tsx b/src/renderer/components/team/dialogs/ProvisioningProviderStatusList.tsx index fe6957e7..5163256f 100644 --- a/src/renderer/components/team/dialogs/ProvisioningProviderStatusList.tsx +++ b/src/renderer/components/team/dialogs/ProvisioningProviderStatusList.tsx @@ -895,16 +895,6 @@ function getProvisioningProviderSettingsActionLabel( : null; } -function getDisplayDetailText( - detail: string, - status: ProvisioningProviderCheckStatus, - providerId: TeamProviderId, - t: TeamTranslator -): string { - const summary = summarizeDetail(detail, status, providerId); - return summary ? localizeProvisioningDetailSummary(summary, t) : detail; -} - function getSupportDiagnosticsPayload(check: ProvisioningProviderCheck): string | null { if (check.providerId !== 'opencode') { return null; @@ -990,7 +980,7 @@ export const ProvisioningProviderStatusList = ({ check.providerId )}`} > - {getDisplayDetailText(detail, check.status, check.providerId, t)} + {detail}

))}