Skip to content

Latest commit

 

History

History
54 lines (46 loc) · 1.47 KB

Translation.adoc

File metadata and controls

54 lines (46 loc) · 1.47 KB

Translating EasyRPG Editor

Adding a language

  • Add the file with corresponding language code (e.g. "es") to CMakeLists.txt:

    set(TRANSLATION_SOURCES
      [...]
      translations/editor_es.ts
    )
  • Add the name to translations/editor.qrc

    <qresource prefix="/i18n">
      [...]
      <file alias="easyrpg-editor_es.qm">editor_es.qm</file>
    </qresource>
  • Run cmake --build --target translations if you have a build tree ready.

    Or invoke lupdate manually from root directory of the repository: lupdate src -ts translations/editor_es.ts

(Further) translating an already added language

  • Open translations/editor_<lang>.ts in Qt Linguist

  • Translate strings and save file

    💡
    There are good external tutorials.
  • Commit to git repository and make a pull request

Running Editor in a specific language for testing

  • Build Editor in Debug configuration

  • Compile the translation file (QM format) with lrelease or CMake

  • Set environment variable EASYRPG_EDITOR_LANG_FILE to the desired file, e.g.

    env EASYRPG_EDITOR_LANG_FILE=test.qm easyrpg-editor