[lfs-dev] LFS 7.5 Brazilian Portuguese Complete

Alberto Senna Dias Neto albertosdneto at gmail.com
Mon May 12 06:30:51 PDT 2014


>
> akhiezer, I am using xml files.
>
>
>> I tried to automate it the most I could, but I have not been succesful on
>> that.
>
>
>> I have been using "itstool" (http://itstool.org/) and OmegaT (2.6.3).
>
> Both tools have been giving me some headache.
>
>
>> The process is the following:
>
> 1 - Treat some issues (for the itstool they are issues) on xml
>
> 2 - Generate po from xml with itstool
>
> 3 - Translate the po file with OmegaT
>
> 4 - Convert the po file to an mo file
>
> 5 - Merge the mo file with the original xml file
>
> 6 - Undo any "hacks" or changes done in any xml files in order for itstool
>> work properly
>
> 7 - Build the book ( Before this step make sure the file lfs-l10n.xml on
>> stylesheets/lfs-xsl/ has an entry for Brazilian Portuguese and that any xml
>> file that has a tag "lang" has it set to "pt_br")
>
> 8 - Once the nochunck version is built, check for any formatting problems
>> and fix it. I literally compared the book that I had generated side by side
>> with the original book available.
>
>
>> The issues on step 1 are the following:
>
> a) Itstool does not work well with some entities used on xml files,
>> specially the ones like <!ENTITY checkfs            SYSTEM
>> "checkfs.script">. For itstool to work properly I had to remove the
>> "SYSTEM", translate, and then add it again to automatically generate pdf,
>> html, etc.
>
> b) I must to treat any – or — etc, for itstool to work
>> properly. I do this with the following code:
>
> *************
>
> #!/bin/bash
>
>
>> find . -name '*.xml' -exec sed -i 's/\–/\–/g' {} \;
>
> find . -name '*.xml' -exec sed -i 's/\—/\—/g' {} \;
>
> find . -name '*.xml' -exec sed -i 's/\©/\©/g' {} \;
>
> find . -name '*.xml' -exec sed -i 's/\Æ/\Æ/g' {} \;
>
> find . -name '*.xml' -exec sed -i 's/\é/\é/g' {} \;
>
>
>> *************
>
>
>> OmegaT keeps all the text and its respective translation on memory, so it
>> is a lot easier then working directly on xml files.
>
>
>> Before getting to this "solution" I tried do work on xml files directly
>> on OmegaT, but OmegaT makes a big mess with the xml tags. I will try that
>> again with newer versions of OmegaT.
>
>
>> I tryed to use xml2po instead of itstool but I had problems with that.
>
>
>> I am not happy with this method.
>
>
>> Please, if anyone knows a good tool for doing this, let me know.
>
>
>> Fernando, I am going to work on the creation of a repository. It is a
>> good moment to learn how to work with subvertion.
>
>
>> Regards.
>
>
-- 
Alberto Senna Dias Neto
albertosdneto at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20140512/da4374a3/attachment.html>


More information about the lfs-dev mailing list