Difference between revisions of "HOWTO-Translate ScummVM GUI"

Jump to navigation Jump to search
→‎Creating or Updating a translation file: Add instructions for context translation
m (→‎Using the translation in ScummVM: Remove note on perl dependency.)
(→‎Creating or Updating a translation file: Add instructions for context translation)
Line 10: Line 10:
Please note that:
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.
* 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 are attached to a context (defined with msgctxt "context string" before the msgstr "translated text" in the po files). This means the same english string can be translated differently depending on the context. For example:
** "None" is defined with two different contexts: "path" and "soundfont". Therefore the translation can be different if needed depending if "None" refers to a path or a soundfont.
** Some strings are defined both with the "lowres" context and without a context. If the "lowres" string is left empty it will use the translation for the same string without a context. But it can be defined to a shorter translation if needed. The "lowres" translation, if defined, is used when the GUI is in 1x mode (e.g. resolution of 320x200 or 320x240). The translation not associated to a context is used when GUI is in 2x and 3x modes.
* 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.
* 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.
* '%' 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.
TrustedUser
2,147

edits

Navigation menu