Mozillal10n:en
Orri honetako edukiak zaharkituta daude edo akatsak egon daitezke, beraz informazioa ez da erabat fidagarria.
Edukiak
Mozilla l10n mini-how-to for Basque language
This document has been done by Librezale (Basque community campaigning for the free software in Basque language). We would like to summarize how we translate some mozilla products (Firefox, Thunderbird, Calendar, ...) and remark some obvious things every mozilla translator must know, and sometimes does not. Complains: web.arduraduna@librezale.eus
How we do translate
History
Mozilla products use many .dtd and .properties files to store the strings we have to localize. At the beginning we started using the Mozilla Translator. At some point Mozilla Translator started creating too many problems and it was not mantained any more, so we started to translate using a plain text editor SciTE).
In the majority of OS projects the file format used to do translations is the PO format. It's a kind of standard for translators and there are many tools developed in order to make our live easier (translation databases, dictionaries, etc) using these PO files. One day we found out the Translate Toolkit. This tool allows you convert those mozilla dtd and properties files into PO files, translate them and then convert them back to their original formats. We started using it and we have developed some easy to use scripts in order to speed up the conversion process.
P.S. Actually the Mozilla Translator is mantained by Ricardo and can be downloaded here.
The way we do it
First of all, to use this method you need:
- a CVS client
- register yourself as a Mozilla localizer and get a CVS account for the mozilla server
- a unix shell
- the Translate Toolkit
In your favorite place, create a folder to store all the files involved in the process. We will call to it MOZILLA_L10N. You may want to download the following scripts to the above folder:
- global.sh
- start_cvs_agent.sh
- upgrade-l10n.sh
- upgrade-en.sh
- moz2po.sh
- po2moz.sh
- compare.sh
- cervisia.sh
- bug_diff.sh
Give the correct permisions to the files: chmod +x *.sh
Now we have to configure the global.sh file to our needs. You may want to change the Lang to localize, the Branch ... but the most important line to change is:
CVS_KONTUA=:ext:my_cvs%account@cvs.mozilla.org:/l10n
write your own cvs account there.
Go to the MOZILLA_L10N directory (we will execute all the scripts from there) and follow the steps in order:
1. CVS passphrase
The first script to use is start_cvs_agent.sh
you@your_host:~/MOZILLA_L10N$ ./start_cvs_agent.sh
It'll prompt you the CVS passphrase ... once you write the correct passphrase it'll create an agent to keep your password for this session.
2. Check out your language
Then we execute upgrade-l10n.sh
you@your_host:~/MOZILLA_L10N$ ./upgrade-l10n.sh
This will check out you language from the repository using your CVS account and the branch written in the global.sh file. They will be stored in the l10n folder. Changes made by other people in your language files will be shown and stored in the log folder: l10n-upgrade-[date_stamp].log and l10n-upgrade-[date_stamp].diff files. NOTE: The first time we use the script will show some errors.
3. Check out the English files
Now we execute upgrade-en.sh
you@your_host:~/MOZILLA_L10N$ ./upgrade-en.sh
This will anonymously check out the original english files from the repository. They will be stored in the mozilla folder. Last changes made in those files will be shown and stored in the log folder: en-upgrade-[date_stamp].log and en-upgrade-[date_stamp].diff files. This is very useful to follow up the last strings you have to translate.
NOTE: The first time we use the script will show some errors.
4. Conversion to PO format
The moz2po.sh script will convert your language files into PO format files
you@your_host:~/MOZILLA_L10N$ ./moz2po.sh
They will be stored in the po folder. If you get errors, be careful and take note of them ... those files may not be properly converted.
5. The translation
Here you should use any PO translation tool you like (poedit, KBabel, gtranslator, ...) to keep the PO files up to date. It's very important to use Translation memories from other projects translated into your language. It will help you a lot!
In the near future we'll try to use Pootle to do the translation. We have already upload some mozilla files to out LibrePootle.
Some files (*.inc *.js *.txt *.xhtml ...) will not be converted, so you have to translate them using a text editor. They are just a few of them. (Firefox help is written in xhtml files and it's a pain)
It's important to read the comments written in the files. Sometimes we don't have to translate a certain string. This will be advised in a comment (DO_NOT_LOCALIZE)
Do not translate the Command Keys. They are used to define a shortcut to execute some commands and in general the recommendation is not to translate them (you'll usually find them in this kind of entities: .key Cmd.key .commandkey ...)
Be careful with the Access Keys. You should not repeat the same access key in the same menu/window.
6. Conversion to mozilla format
The po2moz.sh script will convert back our PO files into mozilla files
you@your_host:~/MOZILLA_L10N$ ./po2moz.sh
If you get errors, be careful and take note of them ... those files may not be properly converted.
7. Check it
Now we run the compare.sh script
you@your_host:~/MOZILLA_L10N$ ./compare.sh
This script uses the compare-locales.pl script made by mozilla people to compare our files with the english ones.
8. Upload it to the CVS server
If everything has gone fine until now, the last thing we do is to upgrade our language files in the CVS server. You can use any CVS client you like.
We use cervisia. cervisia.sh launches cervisia with our files.
(in brackets cvs command line client command for every step)
Inside cervisia, first of all we Update (cvs udpate) the repository.
Then we see the changed files and we check if everything is fine. For new files, we have to Add (cvs add New_File) them to the server. If some file has been removed, we have to Remove (cvs remove File) them from the server.
If everything is fine we Commit (cvs commit) the changes writing a description of the changes made: "Typo Correction", "Massive string update for Firefox2" ...
Next time we should start from the first step back again.
Important stuff every mozilla translator should know
The previous content of this page has been migrated to the MDC:
Complains: web.arduraduna@librezale.eus. Feel free to critisize, correct, suggest, ...