Translations-pt
Contents
Introdução
aMule é muito fácil de ser traduzido para o seu idioma, ele agora é sustentado por Unicode, assim ele não possui limitações de caracteres de tradução em Chines, Coreano, Árabe ... todas traduções são possiveis.
Mais a Tradução precisa de tradutores, então não hesitem em entrar na aventura do aMule!
Não necessita de saber programar C++ ou Klingon para ser tradutor! Apenas precisa de saber a sua própria língua (!!) e algum inglês básico!
Interessado? Então vamos!
Como começar
From time to time (about once a month) we post a text file called source_strings.po on Translation forum.
Just download it and open it with KBabel if you use KDE, PoEdit or gTranslator if you use Gnome.
Previously, don't forget to set your preferences in KBabel, PoEdit or gTranslator to set your name, email, character set, and so on...
That is what you will see with KBabel:
On up left corner, you have the english string.
On up right corner, the name of the file from which come the string.
So, you just have now to type the translated string in the left down corner like this:
Be VERY carefull to copy all special characters like &, %i, \n, etc... in the translated string also and to keep starting and ending spaces.
PLEASE, take a look at this document to know what are the characters which shouldn't be modified.
Proceed like this for all strings, save your file and...
Translation is finished! Just post it on aMule's translations forum and thousands of people will thank you :)
Como continuar uma tradução já iniciada
When a translation have begun, you will not re-write all the already translated strings in the previous source_strings.po !
So, the process is automated to mix the already translated strings in the new source_strings.po
For example, imagine you want to continue the french translation:
- Mix the old and new file by typing:
msgmerge --no-fuzzy-matching -o new_fr.po fr.po source_strings.po
You can also use the built-in merging tools in KBabel or PoEdit (consult their respective help page)
Then, proceed with the merged new_fr.po like the initial source_srings.po, except that you will just have to translate the newly added strings.
Testando a sua tradução
First notes
After you're done with translating the file, you can just recompile aMule, or you can you can first test to see if the file you've done is ok (this step is done automatically when compiling aMule).
What's good about the latter option, is that you don't have to build the whole aMule, but only generate a binnary of your translation.
The recommended procedure is to try translation file test until it succeeds, and then compile aMule with the translation to see how it works.
Testando apenas o ficheiro de tradução
To do this, you must first run ./configure.
Now, once you have moved your translation file into the po/ directory, run make translation_language.gmo as in make en_GB.gmo
If your translation is ok, it will show sowething like
[~/aMule/amule-dev-cvs/po]$ make en_GB.gmo rm -f en_GB.gmo && /usr/bin/msgfmt -c --statistics -o en_GB.gmo en_GB.po 1354 translated messages
The above example is a successful and complete translation.
As "successful" you must understand any translation which, either complete or not, can be used since it contains no syntax errors.
A successful but incomplete translation would be this other example:
[~/aMule/amule-dev-cvs/po]$ make ru.gmo rm -f ru.gmo && /usr/bin/msgfmt -c --statistics -o ru.gmo ru.po 1333 translated messages, 79 untranslated messages.
As you can see, 79 lines in that translation still need to be translated.
Also, you could have some fuzzy translations. Fuzzy translations are those which have been guessed by gettext, but are probably wrong (allthough possibly close). They are marked by adding a line containing #, fuzzy right over the translation. So, if you see you have fuzzy translations, search for those lines and fix them (or just remove the #, fuzzy line if the lines were ok).
An example of a fuzzy translation output is:
[~/aMule/amule-dev-cvs/po]$ make hr.gmo rm -f hr.gmo && /usr/bin/msgfmt -c --statistics -o hr.gmo hr.po 544 translated messages, 412 fuzzy translations, 443 untranslated messages.
Finally, your translation could contain errors. In such cases, you will be reported all errors in your file and an explanation of each of them:
[~/aMule/amule-dev-cvs/po]$ make de.gmo rm -f de.gmo && /usr/bin/msgfmt -c --statistics -o de.gmo de.po de.po:88: number of format specifications in 'msgid' and 'msgstr' does not match /usr/bin/msgfmt: found 1 fatal error make: *** [de.gmo] Error 1
In the above example, the translation has an error in line 88, so no binnary translation will be generated from it until it is fixed.
Testando com aMule
You can test your translation by recompiling aMule and seeing how it looks.
If your language wasn't available in aMule, you must add it to the database, so that aMule knows it exists and compiles with it. To do so, add your language's code to the po/LINGUAS file (one language per line).
Now compile aMule normally. If you need help, follow this guide.
Traduções Avançadas
If you aren't a newbie in development and under Linux or you are impatient and always want to have an up-to-date translation...
Generate your source_strings.po yourself!
How to proceed?
- Download the latest aMule CVS snapshot from http://amule.hirnriss.net
- Uncompress the archive, go to the root directory and generate the Makefiles:
tar -xjf aMule-cvs-20041009.tar.bz2
cd amule-cvs
./configure
- Update the POTFILE.in file:
grep -m 1 '_(' `find * -name "*.cpp"` | cut -d: -f1 > po/POTFILES.in
- Generate the new source_strings.po:
cd po
mv amule.pot amule.pot.old
make amule.pot
mv amule.pot source_strings.po
mv amule.pot.old amule.pot
--Thepolish 22:46, 9 Oct 2004 (CEST)