From d3d338376444b8abdcaf7200f682faa3daf1ad10 Mon Sep 17 00:00:00 2001 From: cesnimda Date: Mon, 2 Nov 2026 23:24:15 +0100 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20identify=20Bokm=C3=A5l=20accuratel?= =?UTF-8?q?y=20in=20supported-language=20controls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/direct-roadmap/INTEGRATION_CHECKPOINT.md | 2 ++ .../language-control-native.json.gz | Bin 0 -> 1470 bytes docs/i18n/LANGUAGE_CONTROL_QA.md | 11 +++++++++++ docs/i18n/PIPELINE_ALIAS_FALLBACK.md | 2 +- job-tracker-ui/src/app-shell-navigation.test.tsx | 11 +++++++++++ job-tracker-ui/src/layout/AppShell.tsx | 4 ++-- 6 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 docs/direct-roadmap/integration-evidence/language-control-native.json.gz create mode 100644 docs/i18n/LANGUAGE_CONTROL_QA.md diff --git a/docs/direct-roadmap/INTEGRATION_CHECKPOINT.md b/docs/direct-roadmap/INTEGRATION_CHECKPOINT.md index 1c964e13..8b4757d9 100644 --- a/docs/direct-roadmap/INTEGRATION_CHECKPOINT.md +++ b/docs/direct-roadmap/INTEGRATION_CHECKPOINT.md @@ -2,6 +2,8 @@ Published implementation checkpoint `557efde073a380030a39066fab2e6d961ce717f4` was independently read back on origin/codex/direct-roadmap-integration. Follow-up test-only catalogue QA adds three invariants and runs with existing provider/persistence stability tests: 10 passed in three additional suites; see ../i18n/EN_NB_CATALOGUE_QA.md. No runtime application change after the passing build. +Subsequent bounded localisation fix: supported-language control now names Bokmål explicitly and shows NB, retaining preference values and handlers. Seventeen shell/language tests passed; scoped lint, full typecheck and a new production static build passed after this change. See ../i18n/LANGUAGE_CONTROL_QA.md. This later run overlaps i18n-provider coverage in the 10-test QA run; keep those counts separate. No final UI design was implemented. + Validated isolated review branch `codex/direct-roadmap-integration`. Base Phase 10 `db818e5ebd19eeedc05ae58dc3f7a908ce0e713d`; selected application paths and docs/i18n from published `4172c23d7ce13e8327a5e51bbb09f296c24fb9b8`; backup parser/deploy function and release-readiness reports from `f19e7ebf4aeae350b43fa84cf115c393030280f0`. Content was integrated by explicit owned paths, preserving the Phase 10 accepted handoff records and approved App.css deletion. No full-branch history overwrite, orchestrator access, main merge, final UI design or deployment. ## Fresh qualification diff --git a/docs/direct-roadmap/integration-evidence/language-control-native.json.gz b/docs/direct-roadmap/integration-evidence/language-control-native.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..49f5e25dea099d6194328a04b1e8bdfa8f580bce GIT binary patch literal 1470 zcmV;v1wr~BiwFP!000003e8!|a@#f(-S;an*mOf>D2aORlGK@|k2K@htI&%p;)+BC z0vtS~C?0=Kzob9b0Z7YI;*k`Gbh8sdki6%fi*pa4TPj`o2Dm_Wg~onx+@hiLI655P z4ZR0r4yO*k7&mm@pVVV08JGFj@7=qx8@qJU@)9q!R{HBFt`t)T)31~T@pTxx;U)@I zq5Ksj6Mo9an}`|-l_`{^^IHmxAqy{LoLyH8EYkTBgu#d|feWYiuDL+-a`!;Eyu?zi z9~t%#nRsQ>rARBHA!mS|^EMFs$P$B`z$lkLIX+*hPt1JZQiy@+-xuSFFgxFOr zm-)+p*wFbXq8hEK`!u4~C#O{uchRZT_xrPU zQvdP&s2BIi`^$?Dy^DB4F5>A8$+dD7G9qEk^YBH2pDJb05L+P0oYp8U$qFu5z@(fd zCFm8Gd6-c_m;m+s3i585na1PsF=n0(l84WsnhrnUW0jmM}Dy`+8H- z5RD~pNmjUBDA25@D%7wLPo!sXCO!S>=$q+zI+Qb3&#)!oI*fdJLmH7?IzdcAJMW- zJDpP+Q7@HrPG8T{^xB{{Y5H18sdSpY@S6E4O*cxftVT3x%DBeN_Ot?4Le=BaVqTM< zroX8Lu^O@!>NNdZEqcvG&+#-hI!jZis$PKCdw}=C_sbX7e4>x{*wJwCs00~TmY}yD zL#WGd@3OODJGCm6B*8x;BPhwj`L3*M>FiDWZJCfsFP@TpWi&SgBykefz=bzOhstOyY`s{nq}s@! zlU_U-noRSmY34%slJbRd{dTuK={Wo2*>N}Wd^k_DHyU-y9?_U7&5)7LsMR5?0=$Q^ z+SwvFF|0s?#eHB;BWidiQR7kk1fsqd(i#1sB|Ul^fUl9dk`6-W_Z783Mz}oK>-#NZ zR)Ea!_l&`@)CS~de+p1`yrd@aiJjLo0)5=-&%&w74`B88b8yP-Pe-F+H*UYJbDfg= zEHtfMU=G=qyi8$hzpquZic`1Z-Rc0&88S9#i;GI*nk#37KiL+1jd~AB6Kw-Q z;~KT!W;TI8OY%o27R2|*fA^RrO#1P3^8Z;v-k-`|rPZ1<)TfN#Y~n*bZUk>4x&iZ6 YTGZNA;h)-2Hg`Y$2d#Lo{D&U^02F-W=>Px# literal 0 HcmV?d00001 diff --git a/docs/i18n/LANGUAGE_CONTROL_QA.md b/docs/i18n/LANGUAGE_CONTROL_QA.md new file mode 100644 index 00000000..488ad618 --- /dev/null +++ b/docs/i18n/LANGUAGE_CONTROL_QA.md @@ -0,0 +1,11 @@ +# Supported-language control naming + +2 November 2026. Existing compact AppShell control now displays NB for Bokmål, accessible native name Norsk bokmål, and lang=nb. English retains EN/English with lang=en. This distinguishes written-language identity from Norway's NO country code. Native self-names are intentional invariant labels, not ordinary untranslated interface prose. + +The persisted UI value remains nb; I18nProvider still handles legacy aliases and server nb-NO. No document/ad-language preference, route, country support, new locale, navigation layout or final design implementation changed. Both buttons retain their existing handlers, aria-pressed state and two-character badge width. + +RED: new shell test failed against the old Norsk/NO label. GREEN: 17 tests in app-shell-navigation, app-shell-notifications and i18n-provider, zero failures/pending, native exit 0. New case checks both language attributes, native name, badge, pressed state and persisted nb selection. Scoped lint and full typecheck passed. Existing language-persistence cases overlap the preceding catalogue QA run; do not add the totals as disjoint tests. Native local report: job-tracker-ui/.artifacts/language-control-qa.json. Native-device/AT/browser qualification remains distinct. + +Literal review also checked JobFlowBar's Flow label. Bounded src search found only its declaration; it has a separate local status normaliser rather than importing the shared pipeline helper. No deletion candidate is established and no inactive/compatibility component was changed solely to reduce an inventory count. Other formatting, admin labels and backend literals remain open. + +Fresh production static build after the language-control patch PASSED, native exit 0, including TypeScript and all three generated pages. This is development build evidence, not browser/native AT or production qualification. Native test evidence is archived at ../direct-roadmap/integration-evidence/language-control-native.json.gz. diff --git a/docs/i18n/PIPELINE_ALIAS_FALLBACK.md b/docs/i18n/PIPELINE_ALIAS_FALLBACK.md index 892aafd8..5fa82942 100644 --- a/docs/i18n/PIPELINE_ALIAS_FALLBACK.md +++ b/docs/i18n/PIPELINE_ALIAS_FALLBACK.md @@ -2,7 +2,7 @@ CONFIRMED functional defect: normalizeStatus('constructor') returned the inherited Object function and '__proto__' returned an object instead of the declared pipeline status or Other. statusLabel could consequently lose a custom status. No prototype mutation, account access or persisted-data corruption is asserted. -Minimal fix: only accept own properties of the existing ALIASES map. Existing trimming, case-insensitive canonical stages, known aliases, empty-as-Applied and custom-as-Other behavior are retained. Shared callers include JobFlowBar, KanbanBoard and ApplicationWorkspacePage. No statuses or stored records were renamed; no routes, migrations or dependencies changed. +Minimal fix: only accept own properties of the existing ALIASES map. Existing trimming, case-insensitive canonical stages, known aliases, empty-as-Applied and custom-as-Other behavior are retained. Imported shared-helper callers reviewed here are KanbanBoard and ApplicationWorkspacePage. Correction: JobFlowBar has a separate local normaliser; the earlier name-based caller search incorrectly included it. That component was not changed. No statuses or stored records were renamed; no routes, migrations or dependencies changed. RED diagnostic: constructor and __proto__ cases failed; toString control passed because the input is lowercased. Eleven unrelated cases were not selected in that diagnostic run. GREEN final: pipeline and grouped-board suites, 29 tests, zero failures/pending, native exit 0. New cases verify raw custom labels bypass translation; existing cases cover aliases, group membership/order, valid stage labels and board interactions. Scoped lint and full typecheck passed. Native ignored report: job-tracker-ui/.artifacts/pipeline-alias-fallback.json. diff --git a/job-tracker-ui/src/app-shell-navigation.test.tsx b/job-tracker-ui/src/app-shell-navigation.test.tsx index 687a176e..4d0d92c5 100644 --- a/job-tracker-ui/src/app-shell-navigation.test.tsx +++ b/job-tracker-ui/src/app-shell-navigation.test.tsx @@ -24,6 +24,17 @@ function Providers({ children }: { children: React.ReactNode }) { afterEach(() => localStorage.clear()); +test('language controls identify Bokmål with its native name and language code', () => { + render(
Jobs content
); + const bokmal = screen.getAllByRole('button', { name: 'Norsk bokmål' })[0]; + expect(bokmal).toHaveTextContent('NB'); + expect(bokmal).toHaveAttribute('lang', 'nb'); + expect(screen.getAllByRole('button', { name: 'English' })[0]).toHaveAttribute('lang', 'en'); + fireEvent.click(bokmal); + expect(bokmal).toHaveAttribute('aria-pressed', 'true'); + expect(localStorage.getItem('uiLanguage')).toBe('nb'); +}); + test("[P5-01 PRES-E07 E08] grouped navigation exposes the current child without marking the parent as the page", () => { render(
Board content
); expect(screen.getByRole("navigation", { name: "Navigation" })).toBeInTheDocument(); diff --git a/job-tracker-ui/src/layout/AppShell.tsx b/job-tracker-ui/src/layout/AppShell.tsx index 5a0e9085..4b57d556 100644 --- a/job-tracker-ui/src/layout/AppShell.tsx +++ b/job-tracker-ui/src/layout/AppShell.tsx @@ -689,8 +689,8 @@ export function StackLanguageToggle({ language, setLanguage, onDark = false }: { ...(onDark ? { "& .MuiButton-outlined": { color: "#fff", borderColor: "rgba(255,255,255,0.55)" } } : {}), }} > - - + + ); }