Translation Support - Robosturm/Commander_Wars GitHub Wiki

Intro

This page deals with how you can add your own language to Commander Wars. It contains a step by step guide.

Setup

  1. Download the Qt-Downloader from here:

    https://www.qt.io/download

    You can download QT as Open-Source Version.

  2. Select the following Qt-Version only the one shown is required:

  3. You can find the linguist.exe here:

    5.14.1\mingw73_32\bin\linguist.exe

Qt-Linguist

For an in depth guide of QT-Linguist take a look at the docu:

https://doc.qt.io/qt-5/qtlinguist-index.html

Translating

  1. For translating you need the current english translation file from the repository:

https://github.com/Robosturm/Commander_Wars/blob/master/translation/lang_en.ts

Note: If you only download the ts-file. You may get errors that the code files aren't there. You can ignore those errors unless you wanna see the source-files containing the text. If so you need to download the whole repository.

  1. Rename the file to your language using the BCP47 naming convention starting with lang_

  2. Open the file with Qt-Linguist which should look like this.

  3. Once done with translating you can call the tool via cmd

    5.14.1\mingw73_32\bin\lrelease.exe

    Described here under the section Using lrelease:

    https://doc.qt.io/qt-5/linguist-manager.html

    This creates a file called lang_*.qm

  4. Copy the file into resources\translation. Now the language is available in Commander Wars.

  5. For Pre-Beta 12 Releases you can open the ini file and change the entry language=

  6. Send me the *.ts file so i can add the language for others to the game.

Notes/ Good to know

  • For some texts you don't need a translation cause they're only shown in the console but if you're bored you can translate them anyway.
  • Texts without a translation will remain in the english version
  • For some texts there is only a given amount of space. So you may need to use a abreviation
  • Some sentences mainly those for units/terrain and buildings are currently split up with html code. If you can't translate them to make a logical sentence please contact me so i can fix those files.