Admin panel has no language switcher for its own chrome #5

Open
opened 2026-10-15 23:56:00 -04:00 by jfraeys · 0 comments
Owner

Admin chrome text (ADMIN_STRINGS/t() in static/js/admin/admin.js) is English-only today: ADMIN_LANG is hardcoded to SITE_LANGUAGES[0] (hugo.toml's defaultContentLanguage, currently en) — an admin user can't pick their own display language. The two strings that do have French translations (newPost/postTitlePrompt) only work because they're called with an explicit content-language argument tied to a specific post's language tab; that mechanism doesn't help chrome that isn't per-language (Site Settings, save/validation messages, etc).

Fix: a real language-picker control for the admin's own display language, decoupled from SITE_LANGUAGES[0], feeding a persisted (localStorage) ADMIN_LANG instead of the current hardcoded constant. The ADMIN_STRINGS/t() table is already structured to support this (see fr:'s fallback-to-en: behavior) — it just has nothing driving it today.

See docs/future_additions.md ("Admin Panel Language Switcher").

Admin chrome text (`ADMIN_STRINGS`/`t()` in `static/js/admin/admin.js`) is English-only today: `ADMIN_LANG` is hardcoded to `SITE_LANGUAGES[0]` (`hugo.toml`'s `defaultContentLanguage`, currently `en`) — an admin user can't pick their own display language. The two strings that do have French translations (`newPost`/`postTitlePrompt`) only work because they're called with an explicit content-language argument tied to a specific post's language tab; that mechanism doesn't help chrome that isn't per-language (Site Settings, save/validation messages, etc). Fix: a real language-picker control for the admin's own display language, decoupled from `SITE_LANGUAGES[0]`, feeding a persisted (localStorage) `ADMIN_LANG` instead of the current hardcoded constant. The `ADMIN_STRINGS`/`t()` table is already structured to support this (see `fr:`'s fallback-to-`en:` behavior) — it just has nothing driving it today. See `docs/future_additions.md` ("Admin Panel Language Switcher").
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/coaching-site#5
No description provided.