[Po4a-devel] Only translating specific XML tags

Francois Gouget fgouget at free.fr
Wed Nov 18 14:34:26 UTC 2009


I have an XML file I'd like to translate. It has quite a few tags, but 
only two or three of them should be translated. But it appears that I 
will have to specify every single tag I don't want to see translated

To test this I have written a small test file, where <name> is the only 
tag that should be translated:

<?xml version="1.0" encoding="UTF-8" ?>
<root>
  <global>
    <name>To be translated</name>
    <other>foo</other>
    <yetother>bar</yetother>
  </global>
</root>

So I thought that something like this would work:

   po4a-gettextize -f xml -m test.xml -o 'translated=<name>'

But that still produces a po file that includes every string. What's the 
point of the 'translated' option then since all tags are included by 
default anyway?

I also tried 'tagsonly=<name>' but it's deprecated and just produced an 
empty po file anyway.


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
                  Hiroshima '45 - Czernobyl '86 - Windows '95



More information about the Po4a-devel mailing list