fix: restore runtime status ci expectations
This commit is contained in:
parent
5abd096c61
commit
6ebe375cf9
5 changed files with 50 additions and 17 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -2062,6 +2062,10 @@
|
|||
},
|
||||
"joining": {
|
||||
"teammatesStillJoining": "{{count}} участник(ов) ещё подключается",
|
||||
"teammatesStillJoining_one": "{{count}} участник ещё подключается",
|
||||
"teammatesStillJoining_few": "{{count}} участника ещё подключаются",
|
||||
"teammatesStillJoining_many": "{{count}} участников ещё подключается",
|
||||
"teammatesStillJoining_other": "{{count}} участника(ов) ещё подключается",
|
||||
"teammatesConfirmedRatio": "{{count}}/{{total}} участников подтверждено"
|
||||
},
|
||||
"ready": {
|
||||
|
|
|
|||
|
|
@ -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}}';
|
||||
|
|
|
|||
|
|
@ -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, 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(
|
||||
t: ProviderConnectionTranslator | undefined,
|
||||
|
|
@ -10,14 +35,20 @@ function translateProviderConnection(
|
|||
fallback: string,
|
||||
options?: Record<string, unknown>
|
||||
): string {
|
||||
const interpolatedFallback = interpolateProviderConnectionFallback(fallback, options);
|
||||
if (!t) {
|
||||
return fallback;
|
||||
return interpolatedFallback;
|
||||
}
|
||||
|
||||
return (t as (translationKey: string, options?: Record<string, unknown>) => string)(key, {
|
||||
defaultValue: fallback,
|
||||
...options,
|
||||
});
|
||||
const translated = (t as (translationKey: string, options?: Record<string, unknown>) => string)(
|
||||
key,
|
||||
{
|
||||
...options,
|
||||
defaultValue: fallback,
|
||||
}
|
||||
);
|
||||
|
||||
return interpolateProviderConnectionFallback(translated, options);
|
||||
}
|
||||
|
||||
const CODEX_NATIVE_LABEL = 'Codex native';
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue