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/
Index: Makefile.common =================================================================== RCS file: /cvs/docs/docs-common/Makefile.common,v retrieving revision 1.112 diff -u -r1.112 Makefile.common --- Makefile.common 27 Apr 2006 20:20:27 -0000 1.112 +++ Makefile.common 18 May 2006 20:49:47 -0000 @@ -324,9 +324,7 @@ $(patsubst ${PRI_LANG}/%,${1}/%,${2}):: ${2} po/${1}.po \ ${DOC_ENTITIES_ENT-${1}} mkdir -p ${1} - ln -s -f ../${2} $$@.in - cd po && ${XML2PO} ${XML2POFLAGS} -p ${1}.po ../$$@.in >../$$@ - ${RM} $$@.in + cd po && ${XML2PO} ${XML2POFLAGS} -p ${1}.po ../${2} >../$$@ endef clean::
Attachment:
signature.asc
Description: This is a digitally signed message part
-- fedora-docs-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-docs-list