Remove windowsPrimaryLCIDsToLocaleNames (#13342)
Summary of the issue:
The latest PR (#13338) to merge beta to master has failed, due to Bangla translations being introduced and windowsPrimaryLCIDsToLocaleNames not 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 normalizeLanguage instead.
On further inspection, it appears that the only additions from locale.windows_locale are as follows:
{
1170: 'ckb',
1109: 'my',
1143: 'so',
+ 2117: 'bn',
9242: 'sr',
}
As locale.windows_locale is incomplete, these were introduced to ensure languages translated in NVDA could be mapped.
Instead, the Windows function LCIDToLocaleName can be used to get each of these locales.
This was suggested in #4203.
However Windows maps 1170 to "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 use LCIDToLocaleName after checking for an internal mapping (eg for "ckb").