GNOME Bugzilla – Bug 449756
bug in handling quotes inside an xml tag
Last modified: 2007-08-28 01:39:27 UTC
Please describe the problem: intltool-update's doesn't detect a string inside an html tag attribute. For example: <a title="$_("foo")">$_("bar")</a> The next one works, but it's not good for translators: <a title=$_("'foo'")">$_("bar")</a> Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information: Detected in damned-lies installation of http://translate.fedoraproject.org/
Danilo, can you take a look at this?
This is not actually a bug in intltool: the problem is with the templating system used for Damned-Lies, which is not supported by intltool at all. Basically, I am letting the C code detection take place, and it, obviously, cannot work for everything. I exclusively used compatible constructs there, and if not, it can easily be hacked around in the templates, eg. something like: #set whatevertitle=$_("foo") <a title="$whatevertitle">...</a> should do the trick.
The correct way to do this hack is: set whatevertitle=$_("foo") <a title="$whatevertitle">...</a> The first line can't start with "#".
I'm sorry for the previous comment. I would mean that as the line starts with a "#", the intltool is unable to find those strings. If the "#" is put off, then the intltool can find them. It happens because the intltool see those lines as comments and it doesn't find any string in comments, I suppose. Of course, if the "#" will not be present in those lines, the code doesn't work! So, the Fedora Localization Project is using other hack to skirt this problem. We have used the following hack: <!-- $_("foo") --> <a title="$_("foo")">...</a> It's not the better solution, but it's working for a while.