Repository navigation
feat: use system language when no locale has been chosen - #8020
creeperkatze wants to merge 1 commit into
Conversation
Pull request changelogAppAddedChangedDeprecatedRemovedFixedSecurityWebsiteAddedChangedDeprecatedRemovedFixedSecurityHostingAddedChangedDeprecatedRemovedFixedSecurity |
|
A minimum translation coverage for detection could be added, so poorly translated languages (e.g. Thai at roughly 11%) fall back to English instead. Didnt add it since the website already uses the browser language with no threshold, and adding one only to the app would make the two behave differently. |
Slop |
|
This pull request is closed, so it cannot be queued. Reopen it to get the box back. |
|
Going to close this, I dont think this is smart atm when there are some languages with not great coverage, would make the app pretty weird if they installed for the first time and got greeted with potentially incorrect strings. |
Yea, fair enough. Once localization reaches close to 100% this would be nice to see tho. At least from who I know, most people dont even know the app has a language option. |
The app always started in English, and the website only used the browser language for logged-out users, since account preferences returned
en-USand overrode it. Both now use the system/browser language until one is chosen.The account
localization.localepreference is now nullable and only applied when set. The app detects the language fromnavigator.languageson startup without saving it, so it follows the OS until one is picked, and a migration resets the storeden-USdefault. Matching goes through a new sharedmatchLocalehelper in@modrinth/ui, which also prefers a language's home region (e.g.debecomesde-DEinstead ofde-CH).Users who chose English on purpose can't be told apart from users who never chose the language, so on a non-English system they'll need to pick English again once. This is unavoidable.