#1305 UI language: System default follows the Windows display language; restart notice on OK #1339
No reviewers
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream!1339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "TheSlowly/Slipstream:ui-language-1305"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1305 as far as the code goes; the ticket asks the reporter for their settings to confirm which cause it was. An explicit language already wins everywhere, so these are the likely causes:
GetThreadLocale) rather than the display language. It now usesGetUserDefaultUILanguage.Languagesetting (ja/pl month names, the abuse-report categories, the UI preview tool). They now go through one resolver,SLUILanguage::resolve, which has a unit test.Tested in-world: picking a language, Cancel and OK. System default on a Windows whose display and regional languages differ wasn't available to test.
With Preferences > Language on "System default", the viewer resolves its language from SystemLanguage, which on Windows came from FL_FindLocale() reading GetThreadLocale(). The thread locale is the user's regional format (Settings > Time & language > Region), not the language Windows displays. An English Windows with German date and number formats therefore got a German viewer, and a German Windows with English formats an English one. FL_FindLocale(FL_MESSAGES) now reads GetUserDefaultUILanguage(), the display language. The LCID-to-code table is unchanged, so the codes are the same ("de", "fr", "zh", ...), and a display language the table does not know still falls back to "en". An explicitly chosen language is untouched (it already wins over SystemLanguage), and Linux keeps reading LC_ALL / LC_MESSAGES / LANG / LANGUAGE. Test-Plan: On Windows with the display language English and the regional format German (Settings > Time & language > Language & region: Windows display language English, Regional format German), set Preferences > Language to System default and restart: the viewer is in English, and the log's AppInit "Language:" line says en. With the display language German (any regional format) and System default, the viewer is in German. With an explicit language chosen (e.g. English on a German Windows), that language is used whatever the display language or format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>