Difference between revisions of "GUI translation"
| Line 1: | Line 1: | ||
It's very easy to translate the GUI using [http://www.poedit.net/ poEdit].  | It's very easy to translate the GUI using [http://www.poedit.net/ poEdit].  | ||
| − | + | =Installation=  | |
| + | |||
| + | ==Ubuntu==  | ||
| + | |||
  sudo apt-get install poedit  |   sudo apt-get install poedit  | ||
| − | + | ==Windows==  | |
| + | |||
| + | Download [http://prdownloads.sourceforge.net/poedit/poedit-1.5.2-setup.exe poEdit 1.5.2] and install it.  | ||
| − | + | =Creation of a translation file=  | |
| + | |||
| + | Download [http://diyps3controller.googlecode.com/svn/trunk/GIMX/po/gimx.pot gimx.pot].  | ||
Start poEdit, and click on "File > New Catalog from POT File...".  | Start poEdit, and click on "File > New Catalog from POT File...".  | ||
| − | Select gimx.pot, fill the fields (don't edit the other tabs), validate, and save   | + | Select gimx.pot, fill the fields (don't edit the other tabs), validate, and save as <language_code>.po.  | 
To see what your language code is, check [http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html this page].  | To see what your language code is, check [http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html this page].  | ||
| Line 18: | Line 25: | ||
Translate the messages that are '''not translated''', and save.  | Translate the messages that are '''not translated''', and save.  | ||
| − | + | =Test the translation=  | |
| + | |||
| + | ==Linux==  | ||
| + | |||
  mkdir -p /usr/share/locale/<language_code>/LC_MESSAGES  |   mkdir -p /usr/share/locale/<language_code>/LC_MESSAGES  | ||
  msgfmt -o /usr/share/locale/<language_code>/LC_MESSAGES/gimx.mo <language_code>.po  |   msgfmt -o /usr/share/locale/<language_code>/LC_MESSAGES/gimx.mo <language_code>.po  | ||
| − | + | ==Windows==  | |
| + | |||
| + | Generate gimx.mo with poEdit, and put it in the GIMX installation directory, in a share/locale/<language_code>/LC_MESSAGES directory.  | ||
Start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config, the GUI should be translated.  | Start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config, the GUI should be translated.  | ||
Revision as of 22:09, 24 August 2012
It's very easy to translate the GUI using poEdit.
Contents
Installation
Ubuntu
sudo apt-get install poedit
Windows
Download poEdit 1.5.2 and install it.
Creation of a translation file
Download gimx.pot.
Start poEdit, and click on "File > New Catalog from POT File...".
Select gimx.pot, fill the fields (don't edit the other tabs), validate, and save as <language_code>.po.
To see what your language code is, check this page.
Example for the French language: fr.po.
Translate the messages that are not translated, and save.
Test the translation
Linux
mkdir -p /usr/share/locale/<language_code>/LC_MESSAGES msgfmt -o /usr/share/locale/<language_code>/LC_MESSAGES/gimx.mo <language_code>.po
Windows
Generate gimx.mo with poEdit, and put it in the GIMX installation directory, in a share/locale/<language_code>/LC_MESSAGES directory.
Start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config, the GUI should be translated.