Translation Tools

In this page, a useful tool for the translation of Ampache and Howto concerning the translation are listed.

Poedit

Poedit is a recommendation tool to treat the file of gettext.

This tool will work perfectly on your OS even if your OS is Windows, Linux(required GUI), and MacOS X.

How to use Poedit?

Any OS is the same as a basic operation of Poedit. It is an example in Windows as follows. Also, Poedit Installation is required to be completed. You can disregard these Japanese in running though a part of Japanese is written.

In this page, I explain only basic directions. Please visit an official site of Poedit about more information.

Setting up Poedit

First, if you start Poedit for the first time, the following dialogs will be displayed. Here, you select your prefered language and click OK.

www.momo-i.org_image_ampache_00_language_selection.jpg

Next, enter your name and email address.

www.momo-i.org_image_ampache_02_01_preferences_personalize.jpg

Next, click “Editor” tab and check CR/LF Conversion that is “Unix”.

www.momo-i.org_image_ampache_02_02_preferences_editor.jpg

Update existing Language

The language that you want to translate already exists in Ampache, and it is possible to edit a file in the following steps to edit the language.

First, open existing language. You double-click an existing po file or select the po file clicking “File” → “Open” after starting Poedit. You will see the following three color words.

www.momo-i.org_image_ampache_03_01_update_pofile.jpg

Green words(No translation words) are not translated. You should chiefly edit here. Yellow words(Fuzzy words), Gettext inserted the word that looked like from the word that had been automatically translated in this. Black words(Translated words), As for you, this is a word that has already been translated, and no do be known whether there is the necessity for editing this.

You find the character that starts by ”#~“ in the po file occasionally might. This is a word that has not already been used with Ampache, and you can delete this.

#~ msgid "files removed"
#~ msgstr ""

To delete it, you click “Purge deleted translations” as shown in the following images.

www.momo-i.org_image_ampache_03_02_delete_obsolete.jpg

New create Language

If your language is not used with Ampache, you can make the file that becomes an origin from the pot file to use your language with Ampache.

First, you run Poedit, and click “File” → “New catalog from POT file…”. And Select ”/locale/base/messages.pot” or ”(YOURDRIVE)C:\AMPACHE BASE PATH\locale\base\messages.pot”.

www.momo-i.org_image_ampache_04_01_new_po_create.jpg

After opening pot file, you can see following dialog.

www.momo-i.org_image_ampache_04_02_preference.jpg

Please set “Project and version” and “Charset” to following.

Project and version: Ampache SVN
Charset UTF-8

Please set the thing unified to your country for Plural Forms.

Plural forms

http://www.gnu.org/software/hello/manual/gettext/Plural-forms.html


After setting up, you save file as po file: ”/locale/xx_XX/LC_MESSAGES/message.po” xx_XX is your language name that is “lauguage code” + _ + “country code”. (ex. ja_JP, pt_BR, pt_PT, es_ES, etc..)

language code(ISO 639-1), country code(ISO 3166-1 Alpha2

www.momo-i.org_image_ampache_04_03_saveas_po.jpg

Let's translate!

www.momo-i.org_image_ampache_04_04_translating.jpg

After translating and saving, Poedit will automatically create mo file.

www.momo-i.org_image_ampache_04_05_done.jpg

When you open as a text file, the part that you edited is as follows.

www.momo-i.org_image_ampache_05_text.jpg

dev/translation/tools.txt · Last modified: 2009/05/11 00:59 by momo-i
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki