wx no longer compplains of unsupported languages#8612
Merged
Conversation
…lly support a particular algnauge.
josephsl
previously approved these changes
Aug 9, 2018
josephsl
left a comment
Contributor
There was a problem hiding this comment.
Hi,
I see. I think we need to alert translators of this fact soon so they understand what's going on.
Thanks.
LeonarddeR
reviewed
Aug 9, 2018
| # If we try to initialize this language, wx will show a warning dialog. | ||
| # Therefore treat this situation like wx not knowing the language at all. | ||
| if not locale.IsAvailable(wxLang.Language): | ||
| wxLang=None |
Collaborator
There was a problem hiding this comment.
It might make sense to log this.
Member
Author
|
I think it does get logged, further down. The 'else' clause for if wxLang.
I don't think we need a specific log to differentiate between
findLanguageInfo returning nothing and isAvailable returning False as
both clearly mean there is no translation.
|
Collaborator
|
Ok, I'm fine with that. |
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:
Fixes #8064
Summary of the issue:
There are some languages NVDA has a translation for but WX itself does not. An example of this is Mongolian (mn).
When switching to one of these languages, WX shows a warning dialog on NvDA startup stating that the language is not supported by the OS.
Description of how this pull request fixes the issue:
Core now checks to see if wxPython actually supports the language (I.e. has a translation database for it), and only switches to the language if it does.
Testing performed:
Started NVDA in Mongolian: NVDA started, and the warning dialog did not appear. NVDA messages were translated, but there was no WX translation obviously.
Started NVDA in French: NVDA interface was translated in French and so too was wx's controls.
Known issues with pull request:
None.
Change log entry:
Bug fixes: