Guidelines for translators - GoldenCheetah/GoldenCheetah GitHub Wiki

Introduction

No programming skills are needed to translate GoldenCheetah and translation testing can be done using the last development builds, there is no need to build by yourself, but familiarity with GoldenCheetah as a user is very important.

Currently supported languages (* marks the less updated for v3.5):

  • French
  • Japanese*
  • Portuguese (Brazil)*
  • Italian
  • German
  • Russian
  • Czech
  • Spanish
  • Portuguese*
  • Chinese (Simplified)
  • Chinese (Traditional)

The corresponding files in the source distribution:

  • Resources/translations/gc_fr.ts
  • Resources/translations/gc_ja.ts
  • Resources/translations/gc_pt-br.ts
  • Resources/translations/gc_it.ts
  • Resources/translations/gc_de.ts
  • Resources/translations/gc_ru.ts
  • Resources/translations/gc_cs.ts
  • Resources/translations/gc_es.ts
  • Resources/translations/gc_pt.ts
  • Resources/translations/gc_zh-cn.ts
  • Resources/translations/gc_zh-tw.ts

Even when these files are text and could be modified using any text editor there is a tool in QT (linguist) to help in the process which is recommended.

What do you need?

Install the last development version for your OS from https://github.com/GoldenCheetah/GoldenCheetah/releases to test your work. Download the source code from the same place to access the translation file (at the location listed above)

Install QT for your OS from: https://www.qt.io/download/ to use the linguist tool, for Windows you can download and install just the linguist tool from: https://download.qt.io/linguist_releases/

How to translate?

Using the linguist tool you open the translation file for the language of your choice (see list above), translate strings in the context they are used, save your work and generate a new binary translation (File->Release or File->Release As), the binary translation should have the same base name as the source but with .qm extension. Help for this task can be found at: http://doc.qt.io/qt-5/linguist-translators.html

How to test your translation?

At startup GoldenCheetah uses the configured language (Tools->Options->Language to change, restart is mandatory) and it looks for a binary translation file (.qm file with the naming conventions listed above) in the "home" folder (where your athlete's folders are, see Help->About), if none is found the translation built in is used, so you need to put the .qm file generated by linguist File->Release on the home folder (parallel to your athlete’s folder), restart GC and you are ready to test.

How to contribute your translation?

Once your work is complete and tested you can contribute the .ts file to be incorporated to the source distribution and in the next builds, only that file is needed and you can open a new issue on github to attach the compressed (zip) file or,

How update the translation files to consider new texts?

When new texts are included or modified in the source code existing translation files can be updated to include them preserving existing translations:

cd src
lupdate src.pro

Update the translation file by removing any obsolete texts.

cd src
lupdate src.pro -no-obsolete 

If some texts cannot be translated even after updating translation files report the issue for developers to fix it.

How to add a new language?

To add a new language requires to generate a new translation file using lupdate tool from Qt and to make some changes to the source code as shown in this commit: Added Dutch translation, if you want to add a new language but you are not a developer we are willing do that part so you can concentrate on the translation part.