Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.79 KB

TRANSLATING.md

File metadata and controls

55 lines (42 loc) · 1.79 KB

Translating Inochi Creator

Inochi Creator uses gettext to handle translation, currently pluralization is not support but will be added soon(TM).
You'll need a distribution of gettext to work on translation files.
Currently the language support within Inochi Creator is limited, as such there may be rendering errors for some languages.
We do not support languages that are right-to-left due to limitations within our UI library.

   

Creating a translation file for a new language

To create a new translation file, run

msginit --locale=<langcode> --input=tl/template.pot -o tl/<langcode>.po

replace <langcode> with your language's language code.

NOTE

  • Make sure to update the charset variable in your .po file to UTF-8. Inochi Creator only supports UTF-8.

   

Merging information from latest template

msgmerge -o tl/<langcode>_merged.po tl/<langcode>.po tl/template.pot

Check if the merges make sense, if so replace <langcode>.po with <langcode>_merged.po.

   

I need to reorder format parameters

To specify which format parameter you're indexing, use the <index>$ operator.
Eg. %2$s will index the second entry of the format string.

   

Generating output file

msgfmt tl/<langcode>.po -o <langcode>.mo

The <langcode>.mo file can be put in the configuration directory, or next to the executable for testing.

   

Translation Storage

Final translations will be stored in the .inochi-creator folder, which resides in

  • ~/.config/.inochi-creator on Linux
  • ~/Library/Application Support/.inochi-creator on macOS
  • %AppData%/.inochi-creator on Windows

But Inochi Creator will also try to locate translation files in the current executable directory, as well as the current working directory.