feat(i18n): persist Bokmal preference globally

This commit is contained in:
cesnimda
2026-08-28 12:44:02 +02:00
parent b6dcc7c760
commit 5805c1a621
21 changed files with 359 additions and 66 deletions
@@ -9,6 +9,7 @@ import { getApiErrorMessage } from "../api";
import {
CareerMatch, JobAnalysis, TIMELINE_CATEGORY_LABELS, Timeline, applicationIntelligenceApi,
} from "../applicationWorkspace";
import { useI18n } from "../i18n/I18nProvider";
// Phase 5.3 — Application Intelligence sections for the workspace.
//
@@ -255,6 +256,7 @@ export function ApplicationAnalysis({ jobId }: { jobId: number }) {
// ---------- Match ----------
export function ApplicationMatch({ jobId }: { jobId: number }) {
const { t } = useI18n();
const { data, error, loading } = useIntelligence<CareerMatch>(
() => applicationIntelligenceApi.match(jobId),
[jobId],
@@ -262,17 +264,17 @@ export function ApplicationMatch({ jobId }: { jobId: number }) {
return (
<SectionShell
title="CV Match"
title={t("workspaceCvMatch")}
subtitle={data?.selectedCvName
? `${data.selectedCvName} compared with this job advert.`
: "Choose the CV intended for this application before comparing it with the advert."}
? `${t("workspaceComparingCv")} ${data.selectedCvName}`
: t("workspaceSelectCvMatch")}
loading={loading}
error={error}
>
<Stack spacing={2}>
{data && !data.hasSelectedCv ? (
<Alert severity="info" sx={{ borderRadius: 2 }}>
Select a CV on the CV tab first. The application will only analyse the document you explicitly link.
{t("workspaceSelectCvFirst")}
</Alert>
) : data && !data.hasCareerProfile ? (
<Alert severity="info" sx={{ borderRadius: 2 }}>