Package: translate-toolkit
Version: 1.3.0-5
Severity: important

Hi all,
while using po2html to generate an Italian translation of a site, I noticed 
that it confuses translatable text with the strings specified into the "src"
and "href" attributes of the respective "img" and "a" tags.

I enclosed a tar.gz file containing the files that triggers this problem: 
inside there are 2 scripts:
* generate-pot is the script used to generate the pot files;
* generate-site-it is the script used to regenerate the html file from html 
  templates and the po files.
In order to trigger the problem, it will suffice to call the second script 
that will generate a directory called site-it in which a menu-doc-hosting.html 
file is generated according to the Italian language; in this file there are 
the 2 problems cited in the outline:

1. the "alt" attribute at rows 38,39 (which has to be translated) contains 
   "espandi" which is the translation of expand, but the "src" attribute
   (which has not to be translated) is modified from 
   "../images/widget-gtk-espandable.png" to
   "../images/widget-gtk-espandiable.png" causing an erroneous reference
   to the image; the same thing applies to the following 2 instances
   of the widget image...

2. the "href" attribute at rows 86-88 (which should not be translated)
   is erroneously modified from
   "http://stats.gna.org/download.gna.org/gepolabo/"; to
   "http://stats.gna.org/scaricare.gna.org/gepolabo/"; because there is 
   a subsequent translatable string of an "alt" attribute 
   (download->scaricare).

Of course the text enclosed in such attributes should be protected, or 
at least, it should be translated only and only if it completely matches
a msgid string. What happens here is that a part of and "href" and "src"
attributes matches a msgid, and thus such a part is translated according to
the msgstr text. I hope that the explanation is clear...

pkz

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Attachment: bug2.tar.gz
Description: GNU Zip compressed data

Reply via email to