Remove windowsPrimaryLCIDsToLocaleNames#13342
Merged
Merged
Conversation
5 tasks
feerrenrut
suggested changes
Feb 16, 2022
feerrenrut
approved these changes
Feb 16, 2022
# Conflicts: # source/languageHandler.py
See test results for failed build of commit b344b8b2bf |
lukaszgo1
suggested changes
Feb 16, 2022
f40f4a9 to
b643ec5
Compare
# Conflicts: # user_docs/en/changes.t2t
b643ec5 to
d04e0dd
Compare
feerrenrut
reviewed
Feb 17, 2022
feerrenrut
approved these changes
Feb 17, 2022
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.
Link to issue number:
None
Summary of the issue:
The latest PR (#13338) to merge beta to master has failed, due to Bangla translations being introduced and
windowsPrimaryLCIDsToLocaleNamesnot listing the locale. AppVeyor build failure.On #13339, @CyrilleB79 raised that this variable is poorly documented and outdated.
The initial variable provided a mapping of LCIDs to language codes, without the rest of the locale.
We now normalize the locale as necessary in
normalizeLanguageinstead.On further inspection, it appears that the only additions from
locale.windows_localeare as follows:{ 1170: 'ckb', 1109: 'my', 1143: 'so', + 2117: 'bn', 9242: 'sr', }As
locale.windows_localeis incomplete, these were introduced to ensure languages translated in NVDA could be mapped.Instead, the Windows function
LCIDToLocaleNamecan be used to get each of these locales.This was suggested in #4203.
However Windows maps
1170to "ku-Arab-IQ" not "ckb", and a translation is added for Central Kurdish in localesData.LANG_NAMES_TO_LOCALIZED_DESCS["ckb"]. NVDA may drop "Arab-IQ" from this locale to get the language, losing the locality of "Central Kurdish".Description of how this pull request fixes the issue:
Removes
windowsPrimaryLCIDsToLocaleNames, instead useLCIDToLocaleNameafter checking for an internal mapping (eg for "ckb").Testing strategy:
mylocale in NVDA (previously hardcoded mapping)Known issues with pull request:
None
Change log entries:
For Developers
Code Review Checklist: