Inconsistency in yum-software-management translation

Paul W. Frields stickster at gmail.com
Thu May 18 20:51:18 UTC 2006


On Thu, 2006-05-18 at 16:09 -0300, Hugo Cisneiros wrote:
> While helping Rodrigo Menezes to translate and understand the FDP system, we 
> ran into a very strange problem. The potfile for the yum-software-management 
> was completely translated, and is building fine.
> 
> As we don't have the webtest working, I uploaded a copy to my page:
> 
> http://www.devin.com.br/eitch/fedora/yum-software-management-pt_BR/
> 
> The problem is: everything is fine but the Chapter 7. For some very strange 
> reason that I don't know, some paragraphs aren't translating:
> 
> http://www.devin.com.br/eitch/fedora/yum-software-management-pt_BR/sn-using-repositories.html
> 
> Look at the beggining of chapter 7 and the 7.3 section. The entities are 
> translating fine, but the whole paragraph isn't. It's a mix with English and 
> Portuguese :)
> 
> I checked the potfile, regenerated it, compared the .xml with the .pot, 
> retranslated, and so on. It didn't work, so I'm asking for help here :) 
> Anyone knows what may be happening?

I'm betting this is some additional weirdness with xml2po, but I don't
understand it well enough to know *WHY*.  If I use the attached patch to
docs-common/Makefile.common, everything works smashingly.  I think the
problem is that if we use a link in this fashion, xml2po is expanding
the fdp-entities in the new language, which means the text won't match
the English text with the entities expanded.  We recently eliminated the
"keeping" of entities unparsed since it was making builds very hacky
from an XML serialization point of view.  This is one spot where we
didn't see a ramification and probably just need a small change to fix
the behavior properly.

In other words, if:

  <!ENTITY FOO "foo"> <!-- this is in English -->

And in the document:

  <para>This is where &FOO; happens.</para>

Then in the POT file, you will now see

  msgid "This is where foo happens."

If "foo" in English is "bar" in Elbonian (el), then what is happening as
a result of this link is that when the document is parsed, this <para>
element becomes:

  <para>This is where bar happens.</para>

Since that para doesn't match a msgid, it won't be substituted properly
with a matching translated string.  (Note that in the translated file,
you may see a bunch of entities declared at the top for the
primary-language version of the document, but they don't matter since
they are not used in the translated version now.)

I am going to submit the patch here on the list for our resident
Makefile guru, Tommy Reynolds, to examine and approve, improve, or deny.

-- 
Paul W. Frields, RHCE                          http://paul.frields.org/
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
 Fedora Documentation Project: http://fedora.redhat.com/projects/docs/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.common-xmlfile-no-in.patch
Type: text/x-patch
Size: 629 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-docs-list/attachments/20060518/2feae04a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-docs-list/attachments/20060518/2feae04a/attachment.sig>


More information about the fedora-docs-list mailing list