Skip to content

Translation Guide

Zense edited this page Jan 4, 2022 · 10 revisions

An Overview of the General workflow when you have everything setup and are translating:

(* Just for reference and won't be present in final guide)

  1. Make changes to a .po file with Poedit.
  2. Save and automatically compile into a .mo file.
  3. Copy and paste .mo file into files/lang in fheroes2 installation folder.
  4. Startup game. (The language will already be set in this case since basic setup should be already done.)

Let's group the documentation into categories in the same style as rest of the wiki:


Terminology/General information:

Terminology:

  • .po/.mo/.pot
  • MO file goes in files/lang folder of installation.
  • PO file is found in files/lang of github source.
  • A String/Key
  • ISO Abbreviation

Info:

  • Currently non-English accents and characters will be replaced with white space (or not?)
    • You should still make the translation using the language specific characters so that no change is needed when the characters are supported.
  • The recent language select implementation by ihhub
  • Setting language using fheroes.cfg in /appdata/fheroes2

Translation Program and Environment Setup:

Windows/Linux/Mac:

  • Poedit - https://poedit.net/download

  • Posting a PR with the translation on github (Ex. Github Desktop for Windows.)

  • Usage of Poedit:

    • Set Poedit to NOT automatically compile to mo when saving
    • Warnings and what to ignore (e.g. strings starting with % will give warning but can be ignored)

In case compiling to .mo using makefile is still necessary:

Windows:

  • Cygwin64 (still needed?) – with packages: gettext -dlevel, sed, iconv, make.

Linux:

  • A way to compile using the makefile and installing the necessary packages.

Mac:

  • A way to compile using the makefile and installing the necessary packages.

Translation tips:

  • Staying within a certain amount of characters for UI - E.g. Speed: Very Fast, needs to be max 9 characters
  • Placeholder references like %{race}
  • #Fuzzy comments
  • Context using pipes – e.g. speed|Very Fast
  • \n – newline character - Usage should usually match English string.
  • Look at other language files
  • Look at other New World Computing Heroes series games.
  • Ask for help in translation channel in fheroes2 Discord server

Current limitations:

  • Upper case for creatures E.g. The Dwarves do 15 points of damage.
  • Noun genders - English only uses "The" while other languages have genders like Italian Il/Lo/La/L'/I/Gli/Le

Contributors for the various languages:

French:

Norwegian:

Zense - https://github.com/zenseii

Polish:

Russian: