Difference between revisions of "HOWTO-Translate ScummVM GUI"

From ScummVM :: Wiki
Jump to navigation Jump to search
(→‎Limitations: Update limitation list.)
(→‎Existing translations: Update status and add Spanish and Ukrainian translations to the list.)
Line 27: Line 27:
== Existing translations ==
== Existing translations ==
Currently the following translations are present in [http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/po/ our repository]. They may not be complete and improved translations for these languages are welcome.
Currently the following translations are present in [http://scummvm.svn.sourceforge.net/viewvc/scummvm/scummvm/trunk/po/ our repository]. They may not be complete and improved translations for these languages are welcome.
* '''Catalan''': nearly complete (306 messages translated, 6 messages not translated).
* '''Catalan''': nearly complete (305 messages translated, 3 approximative translations, 7 messages not translated).
* '''French''': nearly complete (296 messages translated, 16 approximative translations).
* '''French''': nearly complete (299 messages translated, 16 approximative translations).
* '''German''': nearly complete (292 messages translated, 12 approximative translations, 8 messages not translated).  
* '''German''': nearly complete (312 messages translated, 2 approximative translations, 1 messages not translated).  
* '''Hungarian''': need work (33 messages translated, 19 approximative translations, 260 messages not translated).
* '''Hungarian''': need work (33 messages translated, 21 approximative translations, 261 messages not translated).
* '''Italian''': complete (312 messages translated).
* '''Italian''': nearly complete (311 messages translated, 3 approximative translations, 1 message not translated).
* '''Russian''': complete (312 messages translated).
* '''Russian''': complete (315 messages translated).
* '''Spanish''': complete (315 messages translated).
* '''Ukrainian''': complete (311 messages translated, 4 approximative translations).


== Limitations ==
== Limitations ==

Revision as of 21:49, 1 August 2010

This page contains instructions to translate the ScummVM GUI.Translations from the community are welcome and should be proposed on the patch tracker.

Creating or Updating a translation file

Translations can be produced with the use of the GNU gettext tools. To create or edit a translation file you can for example use Emacs PO-Mode or Poedit which are both free and available for various platforms.

Before starting a translation it would be a good idea to check the list of existing translations and to contact the team on the forum or IRC to know if other persons are already working on a translation for this language. That way if there is already a translation in the work you can avoid duplicate efforts and work together.

For a new translation, use scummvm.pot (from the source code repository) as a template and fill out the header. Then you just have to translate the strings and save your work in a po file.

Please note that:

  • The current implementation in ScummVM supports only single byte encoding. So don't use UTF-8 encoding for the po file. Latin1 (ISO 8859-1) is fine for most western european languages.
  • Some strings (e.g. button labels) contain the definition of a shortcut key using the ~ characters. For example "~S~tart" will display "Start" and use 'S' has a shortcut.
  • '%' character in a string denotes an argument. For example '%d' is an integer and '%s' is a string. They need to be kept unchanged in the translated string and furthermore their order has also to be kept.

Using the translation in ScummVM

ScummVM does not use the po files directly. They need to be compiled in the application instead. To use or test your translation you will therefore need to compile ScummVM. This involves the following steps:

  1. Get ScummVM source code if you don't already have it.
  2. Make your translation available
    1. move or copy your po file into the scummvm source code po/ directory.
    2. run "make update-translations" (you need to have perl and gettext installed to do this).
  3. Compile ScummVM (with translation support, which is the default).

Proposing your translation to the team

You are welcome to propose your new translations (or an update of an existing translation) on our patch tracker.

Existing translations

Currently the following translations are present in our repository. They may not be complete and improved translations for these languages are welcome.

  • Catalan: nearly complete (305 messages translated, 3 approximative translations, 7 messages not translated).
  • French: nearly complete (299 messages translated, 16 approximative translations).
  • German: nearly complete (312 messages translated, 2 approximative translations, 1 messages not translated).
  • Hungarian: need work (33 messages translated, 21 approximative translations, 261 messages not translated).
  • Italian: nearly complete (311 messages translated, 3 approximative translations, 1 message not translated).
  • Russian: complete (315 messages translated).
  • Spanish: complete (315 messages translated).
  • Ukrainian: complete (311 messages translated, 4 approximative translations).

Limitations

  • As noted above, only single byte character encoding is supported.
  • The limitation on reordering format specifiers for fields (the '%d' and '%s' etc. above) may make it difficult to translate certain phrases to some languages, due to difference in grammar. GNU gettext has means to solve this but it is not currently known whether this works (and is portable to all target platforms) in ScummVM.
  • Context based translation is not currently supported. For example only one translation for "None" can be provided and will be used everywhere "None" is used in the english GUI. In french depending on the grammatical gender of the word to which it refers (e.g. Extra Path, Soundfont) the translation should be different but for the moment it is not possible.