Conversation
📦 Build Artifacts Ready
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some users saw the app switch to an unexpected language, for example Slovak, even though their device preferred English. This depended on which languages were configured on the device and in what order.
Fixes: #4524
What changed
main.cppnow resolves the preferred language through a newloadInputTranslationfunction instead of a singleQTranslatorload call. It walks through the device's preferred languages one at a time and, for each one, tries every listed form as well as a manually built base form (for example plainenderived fromen_GB) before moving on to the next preferred language. This matters because Qt's ownuiLanguages()list can place a preferred language's base form behind an exact match for a less preferred one, which is what caused the wrong language to get picked before.Behavior
Users should now consistently see the app in their actual top preferred language. Switching the device language back and forth, or having a secondary language configured alongside the primary one, no longer risks the app settling on an unrelated language.