fix: fallback translations to user device settings language#1656
Conversation
ErikSin
left a comment
There was a problem hiding this comment.
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
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. |
achou11
left a comment
There was a problem hiding this comment.
Waiting for CI to pass but otherwise changes seem to work as expected.
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
#1557EDIT: #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.