Having Xfce translated into as many languages as possible and maintaining translations of high quality is essential. People will not use a desktop environment that they do not understand! The Xfce i18n Project is in charge of this task and always needs new contributors. You do not need any particular skill, except understanding English, writing your own language correctly and motivation.
Let's see how you can contribute to this project.
First step: contact any existing translators for your language
Reference: the Language Maintainers page on the Xfce i18n Wiki.
Their might already be contributors to the translation of Xfce into your language listed on this page. If this is the case, you should get in touch with them and ask them how you can help. If the page is not up to date, you should warn us or update it yourself.
Let's see how to translate an application or to update a translation now.
Second step: download the translation files
The applications are translated using pot files, with a 'po' extension: those files basically contain each English string and its translation. There is also a template for creating a pot file for a new translation: it is the file which has a 'pot' extension. Every time a developper changes a string in the application, he will update the pot files and the translation will have to be updated accordingly.
Those files are located on the Xfce SVN to ease cooperation and distribution. We will use a script to ease the downloading of those files, this script will also allow you to update your pot files easily. This script requires Subversion to work.
Download the script and move it to a folder where you want to store the pot files. Then run the following command in this directory to make the script executable:
chmod +x xdt-i18n
Then, use this command to get the pot files for the core applications for the first time:
xdt-i18n init xfce/trunk
And for the goodies:
xdt-i18n init goodies/trunk
You should always make sure that you are using the latest pot files when starting to translate a project. This command allows you to update the pot files quickly:
Third step: start translating
The script above downloaded the latest translation files and put them in separate folder. Go to the folder of the application you want to translate or or of the application whose translation you want to improve. The translation files will be available in a po folder. If there is a file for your language, you will be able to start translating directly. If not you will have to create a file for your language by copying the pot file and renaming it to your_locale_identifier.po. To find the locale identifier, you can use this page.
To translate, open the po file using your favorite text editor. You will see a main header composed of likes similar to this:
"POT-Creation-Date: 2009-01-11 00:20+0100\n"
"PO-Revision-Date: 2009-02-11 13:20+0100\n"
"Last-Translator: Mike Massonnet <firstname.lastname@example.org>\n"
"Language-Team: French <email@example.com>\n"
"Content-Type: text/plain; charset=utf-8\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
Update the PO-Revision-Date field with the current date and time and the Last-Translator field with your name and your email so that the next translator can contact you if he has some questions. After that you can start the real translation job.
Every sentence already translated is displayed in the po file as the following one:
msgid "Invalid file name"
msgstr "Nom de fichier non valide"
Untranslated strings are displayed as this one:
msgid "Only local files may be renamed"
Some strings may also be marked as fuzzy, which means that the original sentence has changed a bit and that the translation is not totally wrong but still needs to be checked and/or fixed. Make sure to remove the '#,fuzzy' after fixing the string.
msgstr " Screenshot"
msgid allows you to identify the original string and msgstr to identify the translated strings. Modifying the msgid strings will have no effect, if you see a typo in one of them, file a bug. To translate a string or update a translation, just modify the text between the "" in the msgstr field.
Some strings may contain slashes or weird characters such as "%s" or "%i". You should always make sure that those characters are also present in the translated string in the same order, or the application will be broken in your language. To check if your translation is valid, the xdt-i18n script offers a check option which will check all po files for your language:
xdt-i18n check your_language_code.po
If it displays any warning, you must fix it before sharing your translation.
You can also use this script to see the stats for a given language, that is to say the number of translated messages, the number of fuzzy and untranslated ones:
xdt-i18n stat your_language_code.po
You can also use Poedit to modify the po files. It updates the po headers automatically, sorts the strings by category (translated, fuzzy and untranslated) and provides a friendly interface.
Fourth step: get your translation in
Once you are done with your translations, go to the root of your xfce/trunk folder or goodies/trunk folder and use the following command to create a patch named my_language.diff containing your translations:
svn diff > my_language.diff
If there is a maintainer for your language, you should send him this file asking him politely to review it and get it in. If not, you should send it to the Xfce i18n mailing list where someone will review it and get it in.
Fourth step: this tutorial sucks and you need more information
The Xfce i18n Wiki contains a lot of information but some of it may be outdated. If you have any questions, please ask them on the Xfce i18n mailing list.
I hope that I was clear enough and that we will be flooded with new or improved translations! We need you!