After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 449756 - bug in handling quotes inside an xml tag
bug in handling quotes inside an xml tag
Status: RESOLVED NOTABUG
Product: intltool
Classification: Deprecated
Component: general
0.35.x
Other All
: Normal normal
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-21 11:08 UTC by Dimitris Glezos
Modified: 2007-08-28 01:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Dimitris Glezos 2007-06-21 11:08:14 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/
Comment 1 Rodney Dawes 2007-06-27 21:06:11 UTC
Danilo, can you take a look at this?
Comment 2 Danilo Segan 2007-07-20 21:27:53 UTC
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.
Comment 3 Diego Búrigo Zacarão 2007-08-27 20:45:11 UTC
The correct way to do this hack is:

  set whatevertitle=$_("foo")
  <a title="$whatevertitle">...</a>

The first line can't start with "#".
Comment 4 Diego Búrigo Zacarão 2007-08-28 01:39:27 UTC
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.