Expose translations on window so the inline lang switcher can find it

translations.js declared the dict as `const translations = {...}`,
which scopes it to the script but does NOT attach it to window. The
inline applyLang() in index.html reads `window.translations?.[l]` and
was always getting undefined → early-return → no DOM updates → the
button text stayed in French regardless of the lang switcher.

One-line fix: append `window.translations = translations;` so
classic-script inline code can pick it up. All page-level i18n keys
(intro.ctaBtn included) start translating again.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MVA Global Fret 2026-05-05 14:18:14 +02:00
parent c4328da11d
commit 0b2fe83963

View File

@ -1001,3 +1001,9 @@ const translations = {
} }
} }
}; };
/* Exposé en global pour que les scripts inline (sélecteur de langue,
applyLang) puissent y accéder via window.translations. `const` au
top-level d'un <script> classique ne s'attache pas automatiquement
à window. */
window.translations = translations;