Re: [nvda-translations] Small problem in nvda.po files

  • From: Mesar Hameed <mesar.hameed@xxxxxxxxx>
  • To: James Teh <jamie@xxxxxxxxxxxx>
  • Date: Tue, 10 Jan 2012 09:39:23 +0000

On Tue 10/01/12,11:51, James Teh wrote:
> I tested with xgettext 0.17 and it appears to work correctly.

That is a releaf

> I'm not sure where this leaves us, as even if we generate the .pot
> file and upload it to the snapshots page, your scripts would have to
> wait until a snapshot was built (only once daily) to fetch it.

This isn't a problem, the scripts were downloading the pot files before I 
started providing the translation messages locally.
Also if its done serverside it would allow us to make progress on #1410 and 
#1524

> Any chance of running dos2unix over all .py files before you call
> xgettext? This would have to be done in a temporary tree, of course.

Yes I considered doing that, but it does break the po file.

> Unless I'm missing something, this shouldn't break anything in terms
> of the resultant .po file.

At the moment I would have to apply the attached patch before converting to 
unix line endings. It would work for these 
messages, but any other tripple quoted string that would be introduced would 
require the same treatment, which is of course 
very uggly and I would have to be looking out for them.

Sorry for dragging this out.

Thanks,
Mesar
=== modified file 'source/gui/__init__.py'
--- source/gui/__init__.py      2011-12-29 12:45:12 +0000
+++ source/gui/__init__.py      2012-01-10 09:13:45 +0000
@@ -448,9 +448,9 @@
        This dialog tells the user that their configuration file is broken.
        """
 
-       MESSAGE=_("""Your configuration file contains errors. 
-Press 'Ok' to fix these errors, or press 'Cancel' if you wish to manually edit 
your config file at a later stage to make corrections. More details about the 
errors can be found in the log file.
-""")
+       MESSAGE=_("Your configuration file contains errors. \n"
+"Press 'Ok' to fix these errors, or press 'Cancel' if you wish to manually 
edit your config file at a later stage to make corrections. More details about 
the errors can be found in the log file.\n"
+)
 
        def __init__(self, parent):
                super(ConfigFileErrorDialog, self).__init__(parent, wx.ID_ANY, 
_("Configuration File Error"))

=== modified file 'source/versionInfo.py'
--- source/versionInfo.py       2011-11-25 12:17:31 +0000
+++ source/versionInfo.py       2012-01-10 09:13:45 +0000
@@ -41,17 +41,17 @@
 copyrightYears="2006-2011"
 copyright=_("Copyright (C) {years} NVDA Contributors").format(
        years=copyrightYears)
-aboutMessage=_(u"""{longName} ({name})
-Version: {version}
-URL: {url}
-{copyright}
-
-{name} is covered by the GNU General Public License (Version 2). You are free 
to share or change this software in any way you like as long as it is 
accompanied by the license and you make all source code available to anyone who 
wants it. This applies to both original and modified copies of this software, 
plus any derivative works.
-For further details, you can view the license from the Help menu.
-It can also be viewed online at: 
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
-
-{name} is developed by NV Access, a non-profit organisation committed to 
helping and promoting free and open source solutions for blind and vision 
impaired people.
-If you find NVDA useful and want it to continue to improve, please consider 
donating to NV Access. You can do this by selecting Donate from the NVDA 
menu.""").format(**globals())
+aboutMessage=_(u"{longName} ({name})\n"
+"Version: {version}\n"
+"URL: {url}\n"
+"{copyright}\n"
+"\n"
+"{name} is covered by the GNU General Public License (Version 2). You are free 
to share or change this software in any way you like as long as it is 
accompanied by the license and you make all source code available to anyone who 
wants it. This applies to both original and modified copies of this software, 
plus any derivative works.\n"
+"For further details, you can view the license from the Help menu.\n"
+"It can also be viewed online at: 
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n";
+"\n"
+"{name} is developed by NV Access, a non-profit organisation committed to 
helping and promoting free and open source solutions for blind and vision 
impaired people.\n"
+"If you find NVDA useful and want it to continue to improve, please consider 
donating to NV Access. You can do this by selecting Donate from the NVDA 
menu.").format(**globals())
 
 # A test version is anything other than a final or rc release.
 isTestVersion = not version[0].isdigit() or "alpha" in version or "beta" in 
version or "dev" in version

Other related posts: