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

GUI: About dialog is rendered in English #7770

Closed
josephsl opened this issue Nov 17, 2017 · 28 comments
Closed

GUI: About dialog is rendered in English #7770

josephsl opened this issue Nov 17, 2017 · 28 comments
Labels
bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Milestone

Comments

@josephsl
Copy link
Collaborator

Hi,

A critical showstopper found: when opening About dialog in languages other than English, content is displayed in English.

STR:

  1. Switch to a language other than English (NVDA menu/Preferences/General).
  2. Restart NVDA.
  3. Open About dialog.

Expected: content is displayed in the new language.
Actual: English is displayed.
Severity: critical.
Affects: NVDA 2017.4 RC, master, next snapshots.

Thanks.

@k-kolev1985
Copy link

Yes, I can definitely reproduce this. But why it happened is a mystery to me...

@josephsl
Copy link
Collaborator Author

Hi,

After testing various binary snapshot builds, it appears Python 2.7.14 upgrade from the build server is the likely culprit.

Thanks.

@zstanecic
Copy link
Contributor

zstanecic commented Nov 17, 2017 via email

@florianionascu7
Copy link

Hello, I also confirm this bug. I hope it'll be fixed in 2017.4

@josephsl
Copy link
Collaborator Author

josephsl commented Nov 17, 2017 via email

@LeonarddeR
Copy link
Collaborator

@josephsl commented on 17 nov. 2017 15:20 CET:

After testing various binary snapshot builds, it appears Python 2.7.14 upgrade from the build server is the likely culprit.

I tend to disagree with this finding. I"m running Python 2.7.13 on my local system, and when running from source, the about dialog is also showing up in English. Note that the title of the dialog is properly translated.

@josephsl
Copy link
Collaborator Author

Hi,

In that case, Python is not to blame.

Further testing shows that the new likely culprit might be #7649, as prior to that, there was no problem with this dialog.

CC @michaelDCurran

@LeonarddeR
Copy link
Collaborator

Comfirmed.

I did a git checkout 1fcc7fe, and the issue did occur. After that, i did a git checkout head~, and the translation showed up correctly. Assuming this is the right way to test this, of course.

@LeonarddeR
Copy link
Collaborator

@michaelDCurran: It could have to do with the move of the localisation initialisation. Note that all translatable strings in versionInfo show up as untranslated. This suggest versionInfo is imported without localisation being initialized properly. See logHandler around line 221:

versionInfo must be imported after the language is set. Otherwise, strings won't be in the correct language.
Therefore, don't import versionInfo if it hasn't already been imported.

May be use a similar trick for the RemoteHandler?

@zahra21
Copy link

zahra21 commented Nov 17, 2017

hello.
i should say that i dont have this problem using nvda 2017.3 (which is built with python 2.7.13!
hope that help, God bless you all.

@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Nov 17, 2017

Hi, I can't reproduce this exactly: For me, the info is also displayed in Spanish, even if I switch to catalon, French or Italian. Spanish is the language I use for Windows.
Cheers

@florianionascu7
Copy link

Well, what NVDA version are you using?

@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Nov 17, 2017

Hi, I'm using NVDA 2017.4rc1. I see that, in the General dialog of preferences submenu, languages of the combo box are shown in Spanish too testing with NVDA set to English.
I've tested with the Python console copying to the clipboard the aboutMessage of versionInfo and is copied in Spanish too.

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 17, 2017 via email

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 17, 2017 via email

@Elshara
Copy link

Elshara commented Nov 17, 2017

I also can confirm this behavior.

@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Nov 17, 2017

Hi, perhaps the title of the issue should be changed to: About dialog and language names in General settings are displayed in the default language for Windows.
I've changed my language to en_us and now these are shown in English.

Cheers

@florianionascu7
Copy link

We're talking about the About dialog, not about the language names of General Settings Dialog. If you're switching to another language than English and open the About dialog from Help submenu, you'll see that it is shown in English, not in the language you've set.

@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Nov 17, 2017

florianionascu7 commented

We're talking about the About dialog, not about the language names of General Settings Dialog.

Maybe the two ones are caused by a common issue.

Cheers

@michaelDCurran
Copy link
Member

michaelDCurran commented Nov 18, 2017 via email

@josephsl
Copy link
Collaborator Author

josephsl commented Nov 18, 2017 via email

@michaelDCurran michaelDCurran added the p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority label Nov 18, 2017
@nvdaes
Copy link
Sponsor Contributor

nvdaes commented Nov 18, 2017

Hi, fixed also the issue reported by me related to About dialog, not exactly described as Joseph did.
Resolved using the exe file, not from source.
The language names are displayed in the default language for Windows, but I think it's not critical.
Thanks

@florianionascu7
Copy link

Hello, I can also confirm that this bug has been succesfully fixed.

@k-kolev1985
Copy link

Yes, I can confirm that it is fixed in the test build.

@Brian1Gaff
Copy link

Brian1Gaff commented Nov 18, 2017 via email

@Elshara
Copy link

Elshara commented Nov 19, 2017 via email

@nvaccessAuto nvaccessAuto added this to the 2017.4 milestone Nov 22, 2017
@florianionascu7
Copy link

I think this issue can be closed now.

@josephsl
Copy link
Collaborator Author

Done, thanks.

seanbudd pushed a commit that referenced this issue Mar 2, 2023
#14677)

Related to #14660

Summary of the issue:
When starting NVDA installs a 'fake' gettext and pgettext functions which translates to the language set as the current Windows locale. Later in the startup process languageHandler overwrites these installed translation functions with a new one which translate strings to the language chosen by the user (either in the configuration or from the CLI). Unfortunately if there is a module with translatable strings at its top level and it is imported before languageHandler is initialized these strings are either translated to the default system language, or for locales for which Python's locale.getdefaultlocale fails they remain in English. Similar problems were reported in #7770 and in #14657. Both of these are fixed, but the main problem is that bugs like this are difficult to identify before the release, since most contributors either use both NVDA and Windows in English, or at least their NVDA is in the same language as their operating system.

Description of user facing changes
This should not have any user visible impact.

Description of development approach
When starting NVDA or nvda_slave gettext and pgettext are no longer installed before initializing languageHandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression p2 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

No branches or pull requests