Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set language to Serbian (Latin) on newer Windows versions #4203

Closed
nvaccessAuto opened this issue Jun 17, 2014 · 4 comments
Closed

Cannot set language to Serbian (Latin) on newer Windows versions #4203

nvaccessAuto opened this issue Jun 17, 2014 · 4 comments
Labels
Milestone

Comments

@nvaccessAuto
Copy link

Reported by mdcurran on 2014-06-17 22:49
It seems that in Windows 8, and possibly earlier it is impossible to run NVDA on a machine with the user language set to Serbian (Latin) (LCID 0x241a) where the NVDA language is 'Windows'. as this LCID does not exist in Python's locale.windows_locale. In fact a KeyError is raised and NVDA fails to initialize.
We should catch KeyError when looking up the LCID, and fallback to using LCIDToLocaleName if this function is available. Eventually we should consider using this before using locale.windows_locale, but this could be a breaking change so for now we should only fall back to it.

@nvaccessAuto
Copy link
Author

Comment 1 by mdcurran on 2014-06-17 23:25
Changes:
Changed title from "eCannot set language to Serbian (Latin) on newer Windows versions" to "Cannot set language to Serbian (Latin) on newer Windows versions"

@nvaccessAuto
Copy link
Author

Comment 2 by Michael Curran <mick@... on 2014-06-19 01:27
In [2eac437]:

Merge branch 't4203' into next. Incubates #4203

Changes:
Added labels: incubating

@nvaccessAuto
Copy link
Author

Comment 3 by Michael Curran <mick@... on 2014-07-07 09:05
In [6bd2cee]:

Merge branch 't4203'. Fixes #4203

Changes:
Removed labels: incubating
State: closed

@nvaccessAuto
Copy link
Author

Comment 4 by mdcurran on 2014-07-07 09:06
Changes:
Milestone changed from None to 2014.3

@nvaccessAuto nvaccessAuto added this to the 2014.3 milestone Nov 10, 2015
seanbudd added a commit that referenced this issue Feb 17, 2022
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").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant