feat(gui): let the UI language be chosen manually (#179)

The interface followed the system locale with no way to override it. Settings now
carry a language picker, stored as forced_lang in gui.json, with "System" listed
first so the choice stays undoable.

rust-i18n keeps the current locale in a process-wide atomic and t! reads it on
every lookup, so switching takes effect on the next frame without a restart.

Languages are listed by their own name rather than a translated one, since that
is what a reader looking for their language recognises. A test asserts every
shipped locale has such a name, so adding a translation without naming it fails
rather than silently showing a bare language code.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Tarasov Aleksandr
2026-07-26 21:24:54 +03:00
committed by GitHub
co-authored by Claude Opus 5
parent 7b87dc02dd
commit 389640ee0a
5 changed files with 116 additions and 4 deletions
+22
View File
@@ -561,3 +561,25 @@ ar = "مستوى صوت الميكروفون"
kz = "Микрофон дыбысы"
he = "עוצמת מיקרופון"
pt-BR = "Volume do microfone"
[gui.settings.language.label]
en = "Language"
ru = "Язык"
es = "Idioma"
fr = "Langue"
zh = "语言"
ar = "اللغة"
kz = "Тіл"
he = "שפה"
pt-BR = "Idioma"
[gui.settings.language.system]
en = "System"
ru = "Системный"
es = "Sistema"
fr = "Système"
zh = "系统"
ar = "النظام"
kz = "Жүйе"
he = "מערכת"
pt-BR = "Sistema"