Replace hardcoded French strings with i18n calls
CI / lint (push) Failing after 1m28s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after 17s

Initialize i18n before auth so t() works when rendering
auth-dependent UI, and build the command palette lazily so
translations are loaded first. Bump service worker cache version.
This commit is contained in:
2026-07-20 20:16:34 -04:00
parent cc22ffe6df
commit 790f97e501
17 changed files with 378 additions and 147 deletions
+6 -4
View File
@@ -23,12 +23,14 @@ import { initMermaid, setupFocusMode } from './mermaid-viewer.js';
// Initialization — mirrors the original app.js init() ordering
// =========================================================================
async function init() {
// 1. Init auth first — needed for server-side language preference
const authOk = await Auth.AuthManager.initAuth();
// 2. Init i18n after auth so server language preference is available
// 1. Init i18n FIRST — loads fallback (FR) + selected locale
// Server language check may fail (no auth yet), falls to localStorage
// LocalStorage has correct language if user set it previously
await initI18n();
// 2. Init auth — now t() works inside showApp()/renderUserMenu()
const authOk = await Auth.AuthManager.initAuth();
UI.initTheme();
UI.initHeaderMenu();
UI.initCustomDropdowns();