Skip to content

Translating

Translations are welcome, for the mod and for this wiki. Today GTNA ships English, Portuguese (Brazil) and Simplified Chinese. A new language starts small and can grow page by page: anything not translated yet falls back to English.

Before a big translation, open an issue or say hello on Discord so two people do not translate the same thing.

The mod

Every name and tooltip in the game comes from one JSON file per language:

src/main/resources/assets/gtna/lang/<locale>.json      e.g. ru_ru.json, de_de.json, ja_jp.json
  1. Fork the repository and create the file for your locale. Use the Minecraft locale code (ru_ru, es_es, fr_fr…).
  2. Copy keys from the English source and translate the values. The full English file is generated by ./gradlew runData into src/generated/resources/assets/gtna/lang/en_us.json; pt_br.json and zh_cn.json in the same folder as yours are good references.
  3. Keep the § colour codes and the %s placeholders exactly as they are.
  4. Check what is still missing:

    python3 tools/check_lang_parity.py --locale ru_ru
    
  5. Open a pull request. Partial files are fine; missing keys show in English.

This wiki

The wiki is built with MkDocs Material and mkdocs-static-i18n. Each page is a Markdown file in docs/; a translation is the same file with a language suffix:

docs/gameplay/systems/bec.md       English (the source)
docs/gameplay/systems/bec.pt.md    Português
docs/gameplay/systems/bec.zh.md    简体中文
docs/gameplay/systems/bec.ru.md    your translation

Small fixes

Every page has an edit button (the pencil at the top). It opens the file on GitHub, where you can propose a change without installing anything.

A new language

  1. Add the language to mkdocs.yml, under plugins → i18n → languages, next to pt and zh:

    - locale: ru
      name: Русский
      build: true
      nav_translations:
        Home: Главная
        Machines: Машины
    
  2. Translate pages by creating <page>.ru.md next to the English file. Start with index, getting-started/ and the pages you use most. Keep links and image paths as they are: they point to the same files in every language.

  3. Some pages are generated, so do not edit them by hand:

    Pages Generator Where the text comes from
    gameplay/machines/catalog/* tools/wiki/generate_machine_pages.py the mod's lang files, so translate the mod first
    gameplay/materials/index* tools/wiki/material_pages.py the mod's lang files and the intro inside the script
    gameplay/systems/forge-of-gods*, eye-of-harmony* tools/wiki/system_pages.py text dictionaries inside the script
    roadmap/index* tools/wiki/roadmap_page.py text dictionaries inside the script

    To add a language to a generator, add an entry to its language list and its text dictionary, then run it.

  4. Preview locally:

    pip install mkdocs-material mkdocs-static-i18n
    mkdocs serve
    

    Open http://127.0.0.1:8000/ru/. mkdocs build --strict must finish without warnings before the pull request.

Style

  • Write the way a player talks; short sentences beat long ones.
  • Use the item and machine names that the game shows in your language. If the mod has no translation for a name yet, keep the English name.
  • Numbers, formulas, config keys and ids stay exactly as in the English page.