TransGaming Point2Play Translation HowTo 1.2 ============================================ Point2Play can now be localized. If you would like to volunteer a translation to your native language, we would much appreciate it! If accepted you will have your name credited within Point2Play and on our translations website, as well as the appreciation of other Point2Play users who share your mother tongue. The main homepage for the Point2Play Volunteer Translations initiative is available at: http://transgaming.org/i18n/. From there you can see what languages already have translations, who translated them, and their status. How to do a translation: ======================== 1) Ensure you have the gettext suite of applications installed on your Linux machine. You will require msgfmt and msgmerge, at the very least. If these aren't installed on your machine, you will need to install whatever package gettext's tools are contained in on your particular Linux distribution. 2) A blank template of all the strings in Point2Play is packaged within the retail version of Point2Play. It is installed by default at: /usr/lib/transgaming_point2play/p2p_localized_msg.po Make a copy of this file somewhere so that you can edit it. 2A) Go to http://transgaming.org/i18n/, and see if someone has already completed a translation. You can see from the table on that page which languages have been translated, as well as which version of Point2Play was targeted, and the revision of the translation. 2B) If there is an older translation already available, download the .po file for your locale to a local directory on your machine. You can merge the strings that are already translated into the blank templated provided with Point2Play, leaving just the new strings that were added in subsequent versions of Point2Play to be translated. To do this you need to process the file with msgmerge: msgmerge -o new_translation_file.po old_translation.po p2p_localized_msg.po Where: - new_translation_file.po is the output file with the old translated strings and strings that still need translating - old_translation.po is the existing translation for your language that you downloaded from http://transgaming.org/i18n - p2p_localized_msg.po is the blank translation template that comes packaged with Point2Play, installed by default to: /usr/lib/transgaming_point2play/p2p_localized_msg.po 3) Edit the .po file in your editor of choice. Your editor must support saving in UTF8 format. Enter the translated equivalent below each English phrase listed. For example, you will see a collection of lines like: #: joystick_config_gui.py:94 msgid "Configure Joysticks" msgstr "" The msgid is the English phrase from Point2Play that needs translating. The msgstr portion is where you would plug in the equivalent of the phrase in your language. If you want to leave it untranslated (maybe its not translatable) you can either remove the msgid/msgstr pair from the .po file, or comment it out: #: joystick_config_gui.py:94 #msgid "Configure Joysticks" #msgstr "" Any string that isn't translated will be displayed in its default English form. There are also a number of tools which can help with the editing of your translation. For instance PoEdit (http://poedit.sourceforge.net/) and Ftplugin for VIM (http://vim.sourceforge.net/scripts/script.php?script_id=695) are just a couple. 4) Save your translation file. Be sure to use UTF8 format - otherwise the gettext tool you will use, msgfmt, will give you errors. How to test your translation: ============================= 1) When completed, run the file through msgfmt: msgfmt p2p_localized_msg.po This will create a file called messages or messages.mo (depending on your build of msgfmt) - assuming there are no errors. 2) Inside your ~/.point2play directory create the following directory structure: ~/.point2play/.languages//LC_MESSAGES Where locale code is the locale code for the language that you translated. Rename the generated .mo file from step 1 to be p2p_localized_msg.mo, and copy it into the directory you just created. 3) Set up the following environment variables: export LANG= export LC_MESSAGES= and then start Point2Play as normal. You should now have Point2Play in your native language. Note: your language will not show up in the Languages tab by using the above testing procedure, however Point2Play will load your language resource and make use of it if it is placed in the directory structure described above. How to submit a new or updated translation: =========================================== Please submit a gzipped translation file (gzip p2p_localized_msg.po) or any questions to the Cedega development mailing winex-devel@lists.transgaming.org. Be sure to include how you want to be credited inside Point2Play. You can subscribed to this list at http://lists.transgaming.org/cgi-bin/mailman/listinfo/winex-devel Please note that by providing a translation for Point2Play you are assigning the copyrights to that translation to TransGaming Technologies and are expressly giving us the rights to redistribute your translation. ------------------------------------------------------------------------------ This document, TransGaming Point2Play Translation Howto Guide 1.2 - 1.1.3.1.en, is Copyright(c) 2004, TransGaming Technologies Inc. Redistribution is permitted for non-commercial use only.