Error on file ru.po
Hi, I got an warning on compiling rev18681:
--------- Generating and caching the translation database Merging translations into inkscape.desktop. ru.po: unclosed <b>: #: ../src/dialogs/swatches.cpp:249 msgid "Color: <b>" msgstr "Цвет: <b>"
WARNING: Bad markup found in translations. Please consider fixing the above problems. ---------
It's just a unclosed tag <b> It is not the first time it happens with *.po files. Is there some way to avoid this?
Karlisson schrieb:
Hi, I got an warning on compiling rev18681:
Generating and caching the translation database Merging translations into inkscape.desktop. ru.po: unclosed <b>: #: ../src/dialogs/swatches.cpp:249 msgid "Color: <b>" msgstr "Цвет: <b>"
WARNING: Bad markup found in translations. Please consider fixing the above problems.
It's just a unclosed tag <b> It is not the first time it happens with *.po files. Is there some way to avoid this?
No, this time it's not an unclosed tag. At first I thought this, too, but closer investigation revealed that the string to be translated is split across several lines (because for some reason a string returned by another function is supposed to be rendered in boldface). Thus the translation tool cannot find the closing tag because it appears in a separate string.
One solution would be to move the <b> tag outside the translateable string and only mark "Color" as translateable (BTW, strings as "</b>" and "; " really shouldn't be marked translateable as they currently are in ui/dialogs/swatches.cpp, should they?). What do the translation people think?
Max
On Tue, 2008-05-20 at 14:23 +0200, Maximilian Albert wrote:
No, this time it's not an unclosed tag. At first I thought this, too, but closer investigation revealed that the string to be translated is split across several lines (because for some reason a string returned by another function is supposed to be rendered in boldface). Thus the translation tool cannot find the closing tag because it appears in a separate string.
One solution would be to move the <b> tag outside the translateable string and only mark "Color" as translateable (BTW, strings as "</b>" and "; " really shouldn't be marked translateable as they currently are in ui/dialogs/swatches.cpp, should they?). What do the translation people think?
AHA!!!
I've tracked it down and looked at the code where those strings are coming from. The root cause of the problem is bad i18n code in the source.
The source is concatenating the result of several i18n string calls. This is a big no-no, and if the code is fixed then then problems should go away out of the .po files.
For those who aren't experienced with i18n issues, this is an important one. I think that's it's helpful to see the diffs that Jon made. Please take a second to look at them, they're small.
http://inkscape.svn.sourceforge.net/inkscape/?rev=18701&view=rev http://inkscape.svn.sourceforge.net/inkscape/?rev=18702&view=rev
Thanks Jon!
On Wed, 2008-05-21 at 21:12 -0700, Jon A. Cruz wrote:
On Tue, 2008-05-20 at 14:23 +0200, Maximilian Albert wrote:
No, this time it's not an unclosed tag. At first I thought this, too, but closer investigation revealed that the string to be translated is split across several lines (because for some reason a string returned by another function is supposed to be rendered in boldface). Thus the translation tool cannot find the closing tag because it appears in a separate string.
One solution would be to move the <b> tag outside the translateable string and only mark "Color" as translateable (BTW, strings as "</b>" and "; " really shouldn't be marked translateable as they currently are in ui/dialogs/swatches.cpp, should they?). What do the translation people think?
AHA!!!
I've tracked it down and looked at the code where those strings are coming from. The root cause of the problem is bad i18n code in the source.
The source is concatenating the result of several i18n string calls. This is a big no-no, and if the code is fixed then then problems should go away out of the .po files.
Hi,
Now I see:
Merging translations into inkscape.desktop. ru.po: parsing error for `http://pyxml.sourceforge.net/': #: ../share/extensions/export_gimp_palette.py:14 msgid "The export_gpl.py module requires PyXML. Please download the latest version from http://pyxml.sourceforge.net/." msgstr ""
ru.po: parsing error for `http://cheeseshop.python.org/pypi/lxml/': #: ../share/extensions/inkex.py:61 msgid "The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml" msgstr ""
ru.po: parsing error for `<%s>': #: ../share/extensions/pathmodifier.py:229 #, python-format msgid "Please first convert objects to paths! (Got <%s>.)" msgstr ""
Alexandre
On Fri, May 30, 2008 at 06:27:12PM +0400, Alexandre Prokoudine wrote:
Hi,
Now I see:
Merging translations into inkscape.desktop. ru.po: parsing error for `http://pyxml.sourceforge.net/': #: ../share/extensions/export_gimp_palette.py:14 msgid "The export_gpl.py module requires PyXML. Please download the latest version from http://pyxml.sourceforge.net/." msgstr ""
ru.po: parsing error for `http://cheeseshop.python.org/pypi/lxml/': #: ../share/extensions/inkex.py:61 msgid "The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml" msgstr ""
ru.po: parsing error for `<%s>': #: ../share/extensions/pathmodifier.py:229 #, python-format msgid "Please first convert objects to paths! (Got <%s>.)" msgstr ""
Any progress on these? I suppose the angle brackets are the culprit! It stops the build after a message merge. I suppose we ought to just simply remove the angle brackets from the source code where those appear - if no one has arguments against I will go away and do it.
Regards, -- Marcin Floryan http://marcin.floryan.pl/ [GPG Key ID: 0D5581C5]
On Wed, 2008-06-11 at 00:38 +0200, Marcin Floryan wrote:
On Fri, May 30, 2008 at 06:27:12PM +0400, Alexandre Prokoudine wrote:
ru.po: parsing error for `<%s>': #: ../share/extensions/pathmodifier.py:229 #, python-format msgid "Please first convert objects to paths! (Got <%s>.)" msgstr ""
Any progress on these? I suppose the angle brackets are the culprit! It stops the build after a message merge. I suppose we ought to just simply remove the angle brackets from the source code where those appear - if no one has arguments against I will go away and do it.
Go head. Sounds good.
The choice of characters there is simple to change.
participants (6)
-
Alexandre Prokoudine
-
Jon A. Cruz
-
Karlisson
-
Marcin Floryan
-
Maximilian Albert
-
Ted Gould