Openoffice translation
From LocalizationWiki
This Page describes the steps to update the openoffice translation from various milestones/releases to the next and creating dzongkha sdf
A. Translation Updation and Status Checking
1.Download the latest openoffice pot files. It comes in a tar.gz file. Ex. OpenOffice.org-SRC680_m202-POT.tar
2. Save the tar.gz pot file in a directory. Then untar it with tar xzf OpenOffice.org-SRC680_m202-POT.tar. This creates a
directory named pot containing the openoffice pot files and the en-US.sdf file which will be needed to create
the dzongkha sdf.
3. Now we need our own latest translated files to be merged with the above pot files. Checkout our own latest translation from
the local cvs repo. Rename our own translation folder to po. Ex : Checking out our own translation :
cvs -d :pserver:translator@192.168.0.123:/CVS co opneoffice-m199.
Now rename openoffice-m199 to po : mv openoffice-m199 po
4. After step 3, our present working directory should have the folders po, pot and the file en-US.sdf in it.
5. The actual merging of translation is done by POT2PO script. Copy the POT2PO to the working directory, i.e. with the po and pot
folders. Now run POT2P : ./POT2PO or sh POT2PO. This script merges and updates the translations in the po directory
with those of the new files in the pot. After the script is run, the po directory contains the updated translation.
6. Now put the po directory as a new repository in the local cvs with appropriate name and start translating it.
7. To check the status of the translation, we again use another script named checktranslation. This scripts checks the translation
status of all the po files in a directory recursively and generates a html file giving the detail status of each file. Modify
checkstatus script to point to the appropraite directory on your system which contains the openoffice translations and also the
path where the output html file is to be generated. Then just run the script : ./checktranslation.
A. Building Dzongkha sdf
Once the translation is complete, we need to generate dzongkha sdf for openoffice. The steps are as follows.
1. We make use of translate-toolkit (po2oo) to generate dzongkha sdf from our translations. First of all, create the following
directory tree :
mkdir openoffice
cd openoffice
mkdir errors
mkdir gsi
Note: On the build machine used for the dzongkha linux project, the above directories are already created in
/home/bhutan/builds/openoffice.
2. The errors directory is where all the build errors are redirected. The dzongkha gsi is created in the gsi directory. The
en-US.sdf file that comes with the openoffice pot(see A2 above) should be copied into the sdf directory.
3. checkout the dzongkha translation for which the sdf to be generated into the openoffice folder. Eg:
cvs -d :pserver:translator@192.168.0.123:/CVS co openoffice-m202
Now rename openoffice-m202 to po : mv openoffice-m202 po
4. The actual creating of dzongkha sdf files is done by a script named sdfgenerate.sh whick contains the following :
#!/bin/sh
po2oo -i po -o gsi/GSI_dz.sdf -t gsi/en-US.sdf -l dz 2>&1 | tee errors/errorpo
As can be seen from the script above, it takes the translation in the po dir as the input, and generates GSI_dz.sdf in the gsi
directory as the output. Besides, it also takes the en-US.sdf file in the gsi directory (see B2 above) as the template and
directs the errors to errorpo file in the error directory.
5. Once the dzongkha sdf file is created, we need to check it for gsi error. This is done by the gsicheck.static. Copy the
gsicheck.static file in the sdf directory and run it as follows: ./gsicheck.static -c GSI_dz.sdf > ../errors/gsierro
If there are any gsi errors to be corrected, it is given in the errors/gsierror file after the above command is run.
6. Once all the errors if any are corrected and the dzongkha sdf created, we can then upload it to savannah.
