Skip to content

fix: fallback translations to user device settings language#1656

Merged
achou11 merged 4 commits into
developfrom
fix/translation-fallback
Feb 5, 2026
Merged

fix: fallback translations to user device settings language#1656
achou11 merged 4 commits into
developfrom
fix/translation-fallback

Conversation

@gmaclennan

@gmaclennan gmaclennan commented Jan 13, 2026

Copy link
Copy Markdown
Member

Uses the locale from the users device settings as a fallback for translations. If the user has defined multiple locales, the fallbacks will be used in order. If no translation exists in any language, then English from the default messages is used.

For this to work it needs #1557 EDIT: #1667 to be merged - that PR is a result of modifying the crowdin settings to not include untranslated strings in the translated files.

I noticed that some languages (e.g. api.json) include some strings that are marked as "translated" but are still in English. These strings will appear in English if the language is set to api. This needs to be fixed in Crowdin by deleting translated strings that are still actually in English.

@gmaclennan gmaclennan self-assigned this Jan 13, 2026
ErikSin
ErikSin previously requested changes Feb 2, 2026

@ErikSin ErikSin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still is not working as intended unfortunately.

I set my language to system language (in android settings) to Portuguese, and it is still always reverting to english if the translation is not avaialable. I checked the language files, and chose languages where the strings were not available in English, but it is still reverting to english

@gmaclennan

Copy link
Copy Markdown
Member Author

This still is not working as intended unfortunately.

This should be fixed in bcdd1ab. The issue was that the system language preference is normally returning the BCP-47 code with the regional variant (e.g. pt-BR), but our translations are currently only using the 2-letter code (e.g. pt), so this was not matching our translations. When we update our translations to support regional variants, we should probably make this code a bit more intelligent to also pull in regional variant translations from other regions with the same language code as fallbacks.

@achou11
achou11 self-requested a review February 5, 2026 18:19
@ErikSin
ErikSin dismissed their stale review February 5, 2026 18:50

Andrew taking over!

@achou11 achou11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for CI to pass but otherwise changes seem to work as expected.

@achou11
achou11 merged commit ad9e47f into develop Feb 5, 2026
11 checks passed
@achou11
achou11 deleted the fix/translation-fallback branch February 5, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants