fix: restore runtime status ci expectations

This commit is contained in:
777genius 2026-05-24 16:43:16 +03:00
parent 5abd096c61
commit 6ebe375cf9
5 changed files with 50 additions and 17 deletions

View file

@ -2062,6 +2062,10 @@
}, },
"joining": { "joining": {
"teammatesStillJoining": "{{count}} teammates still 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" "teammatesConfirmedRatio": "{{count}}/{{total}} teammates confirmed"
}, },
"ready": { "ready": {

View file

@ -2062,6 +2062,10 @@
}, },
"joining": { "joining": {
"teammatesStillJoining": "{{count}} участник(ов) ещё подключается", "teammatesStillJoining": "{{count}} участник(ов) ещё подключается",
"teammatesStillJoining_one": "{{count}} участник ещё подключается",
"teammatesStillJoining_few": "{{count}} участника ещё подключаются",
"teammatesStillJoining_many": "{{count}} участников ещё подключается",
"teammatesStillJoining_other": "{{count}} участника(ов) ещё подключается",
"teammatesConfirmedRatio": "{{count}}/{{total}} участников подтверждено" "teammatesConfirmedRatio": "{{count}}/{{total}} участников подтверждено"
}, },
"ready": { "ready": {

View file

@ -4503,6 +4503,10 @@ export default interface Resources {
joining: { joining: {
teammatesConfirmedRatio: '{{count}}/{{total}} teammates confirmed'; teammatesConfirmedRatio: '{{count}}/{{total}} teammates confirmed';
teammatesStillJoining: '{{count}} teammates still joining'; 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'; nameListWithMore: '{{names}}, +{{count}} more';
namedPendingDiagnostic: '{{label}}: {{names}}'; namedPendingDiagnostic: '{{label}}: {{names}}';

View file

@ -2,7 +2,32 @@ import { CLI_PROVIDER_STATUS_DEFERRED_MESSAGE } from '@shared/types/cliInstaller
import type { CliProviderAuthMode, CliProviderStatus } from '@shared/types'; import type { CliProviderAuthMode, CliProviderStatus } from '@shared/types';
type ProviderConnectionTranslator = unknown; type ProviderConnectionTranslator = object;
function interpolateProviderConnectionFallback(
value: string,
options?: Record<string, unknown>
): 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( function translateProviderConnection(
t: ProviderConnectionTranslator | undefined, t: ProviderConnectionTranslator | undefined,
@ -10,14 +35,20 @@ function translateProviderConnection(
fallback: string, fallback: string,
options?: Record<string, unknown> options?: Record<string, unknown>
): string { ): string {
const interpolatedFallback = interpolateProviderConnectionFallback(fallback, options);
if (!t) { if (!t) {
return fallback; return interpolatedFallback;
} }
return (t as (translationKey: string, options?: Record<string, unknown>) => string)(key, { const translated = (t as (translationKey: string, options?: Record<string, unknown>) => string)(
defaultValue: fallback, key,
...options, {
}); ...options,
defaultValue: fallback,
}
);
return interpolateProviderConnectionFallback(translated, options);
} }
const CODEX_NATIVE_LABEL = 'Codex native'; const CODEX_NATIVE_LABEL = 'Codex native';

View file

@ -895,16 +895,6 @@ function getProvisioningProviderSettingsActionLabel(
: null; : 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 { function getSupportDiagnosticsPayload(check: ProvisioningProviderCheck): string | null {
if (check.providerId !== 'opencode') { if (check.providerId !== 'opencode') {
return null; return null;
@ -990,7 +980,7 @@ export const ProvisioningProviderStatusList = ({
check.providerId check.providerId
)}`} )}`}
> >
{getDisplayDetailText(detail, check.status, check.providerId, t)} {detail}
</p> </p>
))} ))}
</div> </div>