make sure About dialog text is shown localized - #7773
Conversation
…ildVersion module. This allows importing of buildVersion in places where the version is needed before languageHandler is initialized. Specifically, this is now used in logHandler to stop versionInfo being accidentally imported too early.
feerrenrut
left a comment
There was a problem hiding this comment.
Looks good. Just a couple of suggestions for doc strings. I'll approve this and leave it up to you whether to take those suggestions on board.
| @@ -5,43 +5,9 @@ | |||
| #See the file COPYING for more details. | |||
|
|
|||
There was a problem hiding this comment.
Perhaps a module level doc string to say "This module is for UI specific / translatable version information. The source of this information should come from the non-translated buildVersion module so that it can be used in parts of nvda that are executed pre-translation system initialisation."
| #Copyright (C) 2006-2017 NV Access Limited | ||
| #This file is covered by the GNU General Public License. | ||
| #See the file COPYING for more details. | ||
|
|
There was a problem hiding this comment.
I would suggest some module level doc string to indicate that "this module is for non-localised version information. It should not contain UI strings or translatable strings. The versionInfo module is the correct place for that"
Link to issue number:
Fixes #7770
Summary of the issue:
The versionInfo module contains some localized strings at module level. If this module is imported too early, these strings will not be localized correctly. Commit 1fcc7fe added the import of versionInfo to the top of logHandler, thereby causing this issue to occur.
logHandler required versionInfo.version to calculate the correct path for nvdaHelperRemote.dll for remote logging.
As versionInfo was imported before languageHandler was initialized, text such as the message in the About dialog was always displayed in English.
Description of how this pull request fixes the issue:
This PR splits out non-localizable version data from versionInfo into a new buildVersion module. This allows importing of buildVersion in places where the version is needed before languageHandler is initialized. Specifically, this is now used in logHandler to stop versionInfo being accidentally imported too early.
Note that the content of the buildVersion module is imported into versionInfo, so versionInfo can continue to be used as normal where ever it is safe to do so. Use buildVersion directly for code that could be run before languageHandler is initialized.
Testing performed:
Known issues with pull request:
None
Change log entry:
Changes from rc1 to rc2: