[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Inconsistency in yum-software-management translation

On Thu, 2006-05-18 at 18:00 -0500, Tommy Reynolds wrote:
> Doesn't seem to break anything, so I'll apply it.
> Paul, what exactly does avoiding the symlink accomplish?

I didn't do a very good job of explaining my theory, apparently. :-(
Let me try again.  Take for instance the following module:

mydoc/en_US/mydoc.xml   (PRI_LANG = en_US)
mydoc/po/el.po          (OTHERS   = el)

Assume that mydoc/en_US/fdp-entities.ent gets generated properly and is
referenced in the internal subset of the mydoc.xml DTD declaration, and
that mydoc.xml uses it for things like &FC;, &FP;, and so on:

  <!ENTITY % FDP-ENTITIES SYSTEM "fdp-entities.ent">

Further, to make the example really detailed for the benefit of
onlookers, imagine it contains, among other stuff, the following element
where the en_US version of entity "FP" is "Fedora Project":

  <para>Behold the &FP;.</para>

We are now using 'xml2po -e' instead 'xml2po -k' so that the entities
get parsed/expanded instead of kept in the POT file.  So the POT file
has a msgid that looks like this:

  msgid "Behold the Fedora Project."

In Elbonian (el.po) this has been translated to:

  msgstr "Beholden dem dar Projecto Fedora."

If you use the link method which my patch eliminates, you first create a

  mydoc/el/mydoc.xml.in -> mydoc/en_US/mydoc.xml

...which is well and good, but keep in mind that part of the XML file
building *previous* to that creates the following link:

-> ../../docs-common/common/entities/entities-el.ent

So when it comes time to run 'cd po/ && xml2po -e -p
el.po ../el/mydoc.xml.in > ../el/mydoc.xml', what you end up with is
xml2po reading the original element and converting it thus, since it
serializes before it translates (which is proper behavior):

  <para>Behold the Projecto Fedora.</para>

Now we have no msgid that matches this element, so it doesn't get
translated -- or rather, it gets "translated" haphazardly in that the
parsed entity uses the Elbonian version.  This causes the behavior Hugo
et al. were seeing, if my theory is correct.  Instead, we want to simply
allow the entities to be parsed in the original PRI_LANG domain, and the
msgid's will now match up properly for translation.  This way of doin'
bidness should allow us to concentrate on using entities simply for
consistency and ease of use in the PRI_LANG version only.  It also
follows the "way o' simplicity," hopefully.

Hope this wasn't pedantic, or if it was, that someone else got something
out of it. ;-)

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/

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]