-
-
Notifications
You must be signed in to change notification settings - Fork 632
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
Support translation message contexts #1524
Comments
Comment 2 by jteh on 2011-05-26 07:27 |
Comment 3 by jteh on 2011-05-26 09:37 |
Comment 4 by orcauser on 2011-05-26 10:09 |
Comment 5 by orcauser (in reply to comment 3) on 2011-11-27 15:50
Yes to both questions, the appmodule suggested in 1811 makes accessing these very straight forward. I also found localization tips on the boost website [another prebuilt gettext for windows package provided by the CPPCMS project linked off the same page. [1](1]. |
Comment 6 by orcauser (in reply to comment 1) on 2012-01-10 13:12
I presume these are just .exe files without installers, in which case it might be least troublesom for us to add it to the nvda build tree, otherwise we may have to ask the potential developer to modify their path variable to include the gettext path in program files? |
Comment 7 by jteh (in reply to comment 6) on 2012-01-10 21:33
They wouldn't necessarily have to modify their path variable. We could have them extract gettext into a predefined location which scons would know about; e.g. c:\program files\gettext. This is probably still a bit ugly, though, since it's not a real installer which makes this path non-standard. I'm reluctant to install non-include stuff into our build tree, not least because I'm not sure where to put it. That said, it's probably the least ugly option. |
Comment 8 by jteh on 2012-01-18 07:48 |
Comment 9 by jteh on 2012-04-19 23:29
|
Comment 11 by jteh on 2012-09-13 01:26 |
Reported by jteh on 2011-05-26 00:47
There are necessarily a lot of short translatable strings in NVDA. However, some of these should be translated differently depending on the context. An example of this is the word "none", which is used for both symbol level and the eSpeak variant name.
Message contexts can be used to differentiate between these. In the code, we would write something like
pgettext("symbol level", "none")
. "symbol level" would then show up in the .po file in an msgctxt field. (See the Contexts section of the gettext manual for further details.)Unfortunately, Python doesn't yet support this, and even when it does, it won't be in Python 2.x. However, it is fairly trivial for us to support fetching the right message in our code. The problem is that pygettext and msgfmt.py don't support this. There's a patch to update msgfmt.py, but I think we should just switch to the real gettext tools, as there are also other reasons to do this.
Notes:
One major problem is that poedit doesn't support viewing contexts yet and many of our translators rely on poedit.
The text was updated successfully, but these errors were encountered: