<#1039 Add flag emojis, 6 new languages, and comma...
# osctrl
g
#1039 Add flag emojis, 6 new languages, and command palette i18n (i18n phase 3) Pull request opened by javuto Add flag emojis, 6 new languages, and command palette i18n (i18n phase 3) Problem The language selector had no visual language affordances, coverage was limited to 7 European languages, and the ⌘K command palette was fully hardcoded English. Change • Flag emojis: each language in the dropdown now renders a flag next to its endonym. English uses the Union Jack, Portuguese uses Portugal's flag (locale tag switched
pt-BR
→
pt-PT
), and Catalan uses the Andorran flag as its geographic anchor. • New languages: Dutch, Japanese, Korean, Chinese (Simplified), Polish, and Russian — 13 languages total, each with a full typed catalog. Japanese/Korean/Chinese include native compact time units ("3時間前", "3시간 전", "3小时前"). • Command palette translated: title, search label, placeholder, empty state, keyboard legend, page hints, and the "Go to env · X" / "Edit config · X" dynamic entries across all 13 languages. English aliases remain in the fuzzy-filter haystack so typing English matches regardless of the active UI language; the three settings entries keep distinct labels via service suffixes (admin / tls / osctrl-api). Notes • A flag-validity test checks every flag is exactly two regional-indicator code points (U+1F1E6–1F1FF). Emoji are decorative (
aria-hidden
) — screen readers rely on the text labels. • Catalogs remain compile-checked: every language must mirror the English key contract or
tsc
fails. Performance • Still one lazy chunk per non-English language (12 chunks, 1.9–2.5 KB gz each), fetched once per browser session; English stays bundled. Main bundle growth remains under 1 KB gz across this phase. Validation •
npm run check
— clean •
npm test
— 362 passed (new: 13-language catalog parity, flag validation, updated selector coverage) •
npm run build
— all 12 lazy locale chunks emitted correctly Follow-ups • Translate feature pages (dashboard, nodes, queries, carves, settings…) • Migrate remaining
toLocaleString()
calls in feature pages to
useLocale
• Optional: backend
PreferredLanguage
for cross-device sync jmpsec/osctrl