Difference between revisions of "GUI translation"

From GIMX
Jump to: navigation, search
(Translation status)
 

(21 intermediate revisions by the same user not shown)

Line 1: Line 1:
 +
This page is only applicable for GIMX 0.50 or higher.
 +
 
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].
  
To install it in Ubuntu:
+
=Translation status=
 +
 
 +
* French: GIMX 7
 +
* Spanish: GIMX 7
 +
* Brazilian Portuguese: GIMX 6 - needs to be updated to GIMX 7
 +
 
 +
=poEdit installation=
 +
 
 +
==Ubuntu==
 +
 
 +
In a terminal:
 
  sudo apt-get install poedit
 
  sudo apt-get install poedit
  
To install it in Windows, download [http://prdownloads.sourceforge.net/poedit/poedit-1.5.2-setup.exe the installer] and launch it.
+
==Windows==
  
To create a translation file, download [http://diyps3controller.googlecode.com/svn/trunk/GIMX/po/gimx.pot gimx.pot].
+
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 [https://raw.githubusercontent.com/matlo/GIMX/master/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 the .po file (name it <lang_id>.po).
+
Select gimx.pot, fill the fields (Team, Team's email address, Language), validate, and save as <language_code>.po.
To see what your language id is, type "locale" in a terminal (without quotes).
+
 
Example for the french language id: the result is "LANG='''fr'''_FR.UTF-8", the language id is "fr".
+
To see what your language code is, check [http://www.gnu.org/software/gettext/manual/html_node/Usual-Language-Codes.html this page].
 +
 
 +
Example for the French language: fr.po.
  
 
Translate the messages that are '''not translated''', and save.
 
Translate the messages that are '''not translated''', and save.
  
To test the translation in Linux, execute the following commands:
+
=How to update a translation file=
  mkdir -p /usr/share/locale/<lang_id>/LC_MESSAGES
+
 
  msgfmt -o /usr/share/locale/<lang_id>/LC_MESSAGES/gimx.mo <lang_id>.po
+
The gimx.pot file will be updated for each release in case new messages need to be translated.
 +
 
 +
It's possible to update .po files from the gimx.pot file using the "Catalog>Update from POT file" tool in poEdit.
 +
 
 +
This adds new messages to translate.
 +
 
 +
=Test the translation=
 +
 
 +
==Linux==
 +
 
 +
In a terminal:
 +
  mkdir -p /usr/share/locale/<language_code>/LC_MESSAGES
 +
  msgfmt -o /usr/share/locale/<language_code>/LC_MESSAGES/gimx.mo <language_code>.po
 +
 
 +
Start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config, the GUI should be translated according to your system language.
 +
 
 +
==Windows==
 +
 
 +
Generate gimx.mo with poEdit (check "File>Preferences>Editor>Automatically compile .mo on save", and save).
 +
 
 +
Copy-paste gimx.mo to:
 +
*Windows 32bits: C:\Program Files\GIMX\share\locale\<language_code>\LC_MESSAGES
 +
*Windows 64bits: C:\Program Files (x86)\GIMX\share\locale\<language_code>\LC_MESSAGES
 +
 
 +
Start gimx-serial, gimx-fpsconfig or gimx-config, the GUI should be translated according to your system language.
 +
 
 +
=Share your translation=
  
To test the translation in Windows, generate gimx.mo with poEdit, and put it in the GIMX installation directory, in a share/locale/<lang_id>/LC_MESSAGES directory.
+
Make sure to share the .po file.<br />
 +
.po files contain the translated messages as plain text.<br />
 +
.mo files cannot be accepted as they are binary file that cannot be updated easily.
  
and start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config.
+
You can either post your translation on the forum, or send it to the GIMX creator directly (email address is in the .pot file).

Latest revision as of 16:10, 11 February 2018

This page is only applicable for GIMX 0.50 or higher.

It's very easy to translate the GUI using poEdit.

Translation status

  • French: GIMX 7
  • Spanish: GIMX 7
  • Brazilian Portuguese: GIMX 6 - needs to be updated to GIMX 7

poEdit installation

Ubuntu

In a terminal:

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 (Team, Team's email address, Language), 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.

How to update a translation file

The gimx.pot file will be updated for each release in case new messages need to be translated.

It's possible to update .po files from the gimx.pot file using the "Catalog>Update from POT file" tool in poEdit.

This adds new messages to translate.

Test the translation

Linux

In a terminal:

mkdir -p /usr/share/locale/<language_code>/LC_MESSAGES
msgfmt -o /usr/share/locale/<language_code>/LC_MESSAGES/gimx.mo <language_code>.po

Start gimx-serial, gimx-bluetooth, gimx-fpsconfig or gimx-config, the GUI should be translated according to your system language.

Windows

Generate gimx.mo with poEdit (check "File>Preferences>Editor>Automatically compile .mo on save", and save).

Copy-paste gimx.mo to:

  • Windows 32bits: C:\Program Files\GIMX\share\locale\<language_code>\LC_MESSAGES
  • Windows 64bits: C:\Program Files (x86)\GIMX\share\locale\<language_code>\LC_MESSAGES

Start gimx-serial, gimx-fpsconfig or gimx-config, the GUI should be translated according to your system language.

Share your translation

Make sure to share the .po file.
.po files contain the translated messages as plain text.
.mo files cannot be accepted as they are binary file that cannot be updated easily.

You can either post your translation on the forum, or send it to the GIMX creator directly (email address is in the .pot file).