From AMule Project FAQ
Revision as of 13:46, 17 September 2005 by Jacobo221 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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 exitem em entrar na aventura do aMule!

No need to know coding C++ or Klingon to become a translator! You just have to know your native language (!!) and some common english!

Interested? So let's go!

How to proceed

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 :)

How to continue an already began translation

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:

  • Get the new source_strings.po from forum, and the old fr.po already in the previous aMule release.
  • 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.

Testing your translation

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.

Testing only the translation file

To do this, you must first run ./configure.

Now, once you have moved your translation file into the po/ directory, run make as in make

If your translation is ok, it will show sowething like

[~/aMule/amule-dev-cvs/po]$ make
rm -f && /usr/bin/msgfmt -c --statistics -o 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
rm -f && /usr/bin/msgfmt -c --statistics -o 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
rm -f && /usr/bin/msgfmt -c --statistics -o 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
rm -f && /usr/bin/msgfmt -c --statistics -o de.po
de.po:88: number of format specifications in 'msgid' and 'msgstr' does not match
/usr/bin/msgfmt: found 1 fatal error
make: *** [] 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.

Testing with 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.

Advanced translations

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?

  • Uncompress the archive, go to the root directory and generate the Makefiles:

tar -xjf aMule-cvs-20041009.tar.bz2
cd amule-cvs

  • Update the file:

grep -m 1 '_(' `find * -name "*.cpp"` | cut -d: -f1 > po/

  • 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)