fix(i18n): localize application workflows

Use stable checklist and interview keys for system copy while preserving user-authored content. Localize creation-tab errors, language selectors, match bands, dates, and selected-CV context.
This commit is contained in:
cesnimda
2026-08-29 16:51:59 +02:00
parent 9edcbfc5de
commit a704c75440
11 changed files with 173 additions and 37 deletions
@@ -35,7 +35,8 @@ import { PIPELINE_STATUSES, normalizeStatus, statusLabel, statusTone } from "../
import { useI18n } from "../i18n/I18nProvider";
import { useConfirm } from "../confirm";
import {
WORKSPACE_SECTIONS, WorkspaceOverview, WorkspaceSectionKey, applicationWorkspaceApi, workspaceSection,
WORKSPACE_SECTIONS, WorkspaceOverview, WorkspaceSectionKey, applicationWorkspaceApi,
checklistSystemTranslationToken, workspaceSection,
} from "../applicationWorkspace";
// Phase 5 Milestone 1 — the dedicated Application Workspace.
@@ -315,16 +316,24 @@ function OverviewSection({ overview, onGo, onReload, onEdit }: {
return <Stack spacing={2}>{[0, 1].map((i) => <Skeleton key={i} variant="rounded" height={120} />)}</Stack>;
}
const nextStepToken = checklistSystemTranslationToken(overview.nextStep?.key);
const nextStepLabel = overview.nextStep
? nextStepToken ? t(`checklistItem_${nextStepToken}` as any) : overview.nextStep.label
: null;
const nextStepReason = overview.nextStep
? nextStepToken ? t(`checklistItem_${nextStepToken}Description` as any) : overview.nextStep.reason
: null;
return (
<Stack spacing={2}>
{overview.nextStep ? (
<Paper sx={{ p: 2.5, borderRadius: 3, borderLeft: "4px solid", borderLeftColor: "primary.main" }}>
<Typography variant="overline" color="text.secondary">{t("workspaceNextAction")}</Typography>
<Typography variant="h6" sx={{ fontWeight: 800 }}>{overview.nextStep.label}</Typography>
<Typography color="text.secondary" sx={{ mb: 1.5 }}>{overview.nextStep.reason}</Typography>
<Typography variant="h6" sx={{ fontWeight: 800 }}>{nextStepLabel}</Typography>
<Typography color="text.secondary" sx={{ mb: 1.5 }}>{nextStepReason}</Typography>
<Button variant="contained" endIcon={<ArrowForwardIcon />}
onClick={() => overview.nextStep?.section && onGo(overview.nextStep.section as WorkspaceSectionKey)}>
{overview.nextStep.label}
{nextStepLabel}
</Button>
</Paper>
) : (