[lfs-fr] LFS Translation

MENGUAL Jean-Philippe jmengual at linuxfromscratch.org
Sam 24 Mai 10:12:50 PDT 2014


Merci amj pour cette belle conduite de projet. Un point sur la procédure 
(toujours en test) (je parle sous ton contrôle amj):
1.  La PJ est un Makefile neuf. Il passe les xml en .po et les .po en xml.
a) Doit-on modifier les chemins qu'il contient pour les adapter à notre 
arborescence sur notre ordi?
b) Où met-on le fichier?

2. Par quoi on commence? On télécharge avec svn up la version en? Et 
3. Le script gère-t-il l'aspect "mise à jour"?

Bref merci pour les explicitements sur le process.


Et merci encore!


Le 24/05/2014 18:00, amj a écrit :
> Hi
> I have created a new makefile
> (the updatepo function have not been tested yet and the first sed must 
> be replaced)
> and it works :D
> Le 24/05/14 06:15, Alberto Senna Dias Neto a écrit :
>> I broke in peaces the makefile you showed me and I made the translation
>> inside each folder, this way it would be easier to find any mistakes either
>> done by me or by OmegaT.
>> This way I keep in the same folder the translated .xml, the original in
>> english .en.xml file and the .po file.
>> I intend to write a more efficient and elegant script, but at this moment
>> this is what I need to track errors.
>> So, here are the steps:
>> 1 - Starting a new translation from a brend new checkout of the original
>> lfs book, enter the folder and run the following:
>> ***********************************
>> find . -path "./stylesheets" -prune -o -path "./bootscripts" -prune -o
>> -path "./udev-lfs" -prune -o -name "*.xml" | while read line; do
>>    echo $line
>>    mv $line ${line/.xml/.en.xml}
>>    po4a-gettextize -f docbook -m ${line/.xml/.en.xml} -p ${line/.xml/.po}
>>    done
>> ***********************************
>> With this we end up with a xml, en.xml and a po file.
>> 2 - Translate the po file with the tool you like, I used OmegaT because it
>> keeps a translation memory and it is visually friendly when compared to
>> poedit or virtaal (virtaal made a huge mess in the po file, in fact it
>> changed the original text making it impossible to apply the new translation)
>> To use OmegaT you have to create a project and import the .po files.
>> Here is a trick: When setting up the OmegaT project you can make text
>> segmentation at sentence level. It makes the translation more readable.
>> Do not use OmegaT to translate the xml file. If you do this, it will not be
>> possible to use the translation memory because of the xml entities that are
>> kept in the text. Believe me, I lost a lot of time editing my translation
>> memory.
>> 3 - Once you finish the translation of a chapter inside OmegaT you generate
>> the translated po. Copy the translated po file that is inside the folder
>> target of OmegaT project and overwrite the po file initially generated.
>> 4 - Inside the folder where you have the original en.xml, translated .po
>> and the xml file, run:
>> for i in *.po; do
>>    echo $i
>>    po4a-translate -f docbook -k 0 -m ${i/.po/.en.xml} -p $i -l ${i/.po/.xml}
>> done
>> This will apply the translations to the xml file, in fact it overwrites the
>> xml file.
>> 5 - Edit the tag lang at the index.xml. Remember to take a look at the .ent
>> files, and athe the xreflabel at each chapter0?.xml.
>> 6 - run make to build the book normally.
>> When updating a translation you just have to do the steps 2, 3, 4 and 6.
>> Take a look at: svn co
>> https://lfs-pt-br.googlecode.com/svn/trunk/lfs-OmegaT/
>> Read the file "Instruction OmegaT.txt"
>> After the grammatical review, I will write a more efficient script for
>> dealing with the po and the en.xml files. The book cannot have his mess of
>> files. I think it must be as clean as the original.
>> Regards.

Jean-Philippe MENGUAL
Président de l'association traduc.org
Coordinateur francophone du projet Linux From Scratch
Animateur suppléant du groupe de travail Accessibilité de l'April
Administrateur d'accelibreinfo

-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-traducfr/attachments/20140524/b82b5ba3/attachment.html>

More information about the lfs-traducfr mailing list