Translating Moondust into other languages

This guide is intended to help interested contributors with translating the PGE applications into various languages.

Introduction
PGE Applications are created using the Qt framework. Qt Translator is a sub-system translator for this framework. The editor/engine and related applications contain translatable text pieces (which in the sourcecode are arguments for special functions) and to collect those translatable phrases, the lupdate utility has been used. This utility scans the source code and creates *.ts files which contain a list of translatable phrases. This means that when an application has newly added strings, lupdate should be run to append new phrases into existing TS-files that retain previously finished translations. These TS-files are made complete by translators with the Qt Linguist utility (that's included with all Qt versions). Once a translation is completed, it must be compiled into a special binary qm-file in order to directly be used by PGE applications.

Translating via Weblate (Easiest way)
Since October 12, 2019, PGE Project started to use Weblate platform - a web-based continuous localization platform for cooperative work on translations. Getting started using of Weblate doesn't requires you to install any software and download or clone any repositories: you need to log-in into Weblate and start translation work now!

PGE Project on a hosted Weblate is located here: https://hosted.weblate.org/projects/pge-project/

Some tips

 * You should login Weblate to work with translations
 * While registering an account, you will not be asked for password until email link activation and a terms of use accepting on a following page.
 * On a first password setup, you'll see "Current password". Leave field empty as, obviously, you never set any password while registration.
 * If you want to keep your personality in a secret (stay be anonymouse), please create a new account from scratch (even please use a different mailbox) and give your pseudonyme/nickname that can be used to refer you as a translator instead of your real/usual one.

Important notes

 * Please don't forget about grammar and spelling as this is important. I recommend creating the translation if you are a native-speaker of the target translation language. All speakers must know about the grammar and spelling for the language he/she is trying to translate to. Best translators for a language (IMO) - native-speakers of the language.
 * In developing process can be added new strings, what need to append to translations. Is recommended to sometimes check updates in the source codes and in your TS files (by URLs above), are being added new strings? If there added, you will see a gray or yellow question icons in Qt Linguist as "exists undone" translation(s) of strings.
 * If you don't understand sense of some phrase, feel free to leave a comment in the Weblate system with your question. Also you can directly ask Wohlstand in chat or in the discussion thread to get detailed explanation of it. Is recommended to get a full source code of PGE to be able see place where currently selected string is used (see below).

Notes for Qt Linguist users

 * Important note: If you no more have time to done your translation or you no more wish do it, please upload your working version in current draft state to give possible continue this translation by other people. Together we can do everything!
 * Source strings - a strings written in the source code and in the UI forms. In the Editor, those strings are keys. Be careful while you editing them, you will break translations of them. If you want to update a source string, you will must also update same source string in the every translation file to keep the translations working. If you doing a proof-reading of English translation, please edit the English language .ts files instead of editing the text in the code directly. Editing TS files is safe. Editing source strings will cause breaking of other translations.

Fresh translation files
There are most-fresh translation files from development branch on official PGE repository

Note 1: Outdated translations are translations which are done for previous versions, but wasn't updated by translators and has many untranslated strings

Note 2: If blank for your language is absence, please request creating it in the translation discussion or via PM or email to any PGE developer

Note 3: To download the translation file opened from a links below, click the right mouse button on a page of an XML text you will see and choose "Save As", and save it as text file with ".ts" extension, or just save as "All-Files" without of name change.

Note 4: ''Some languages are requiring Right-To-Left direction are need to set QObject:LTR string into RTL to switch Editor's layout into right-to-left direction when specific language was switched. Keep this string blank if your language doesn't reuiqres Right-To-Left layout direction.''

Editor
Here is a list of some translation files used by Editor. If you need a complete set of translations are may not being listed here yet, please visit this page.


 * Bosnian ( blank )
 * Bulgarian ( blank )
 * Chinese (Completed)
 * Dutch (Completed)
 * English (Completed)
 * French (Completed)
 * German (Completed, outdated)
 * Israeli Hebrew ( blank )
 * Indonesian ( blank )
 * Italian (Completed)
 * Japanese ( blank )
 * Norsk (Bokmål) ( blank )
 * Polish (Completed)
 * Portuguese (Brazilian) (Completed, outdated)
 * Portuguese (European) (Completed, outdated, copy-pasta of Brazilian for now)
 * Russian (Completed)
 * Romanian ( blank )
 * Serbian ( blank )
 * Spanish (Completed)
 * Swedish ( blank )
 * Ukrainian ( Completed )

Engine
Here is a list of some translation files used by Engine. If you need a complete set of translations are may not being listed here yet, please visit this page.


 * Bosnian ( blank )
 * Chinese (Completed)
 * Dutch (Completed)
 * English (Completed)
 * French (Completed)
 * German ( blank )
 * Israeli Hebrew ( blank )
 * Norsk (Bokmål) ( blank )
 * Polish ( blank )
 * Russian (Completed)
 * Romanian ( blank )
 * Serbian ( blank )
 * Swedish (Completed)
 * Spanish (Completed)
 * Ukrainian (Completed)

Calibrator
You can get a translation file for any available language for a Playable character calibrator here: https://github.com/WohlSoft/PGE-Project/tree/master/PlayableCalibrator/languages

Maintainer
You can get a translation file for any available language for a Maintainer tool here: https://github.com/WohlSoft/PGE-Project/tree/master/Maintainer/languages

How to do translation (Standalone Qt Linguist way)
Alternatively, you are able to do work on translations locally, without using of Internet. For that you need to have the Qt Linguist tool to simplify the work and at least two translation *.ts files (English and your Native language).

Step 1: Download latest .TS file which you can get in list above
To start translation first which you need a .ts file which contains working translation data. If your language is not listed, ask me and I will add them.

Optional: If you want to see sources and forms where translating phrase is used, you need take entire source code of PGE Project and edit TS-files directly in their folders (Editor/languages and Engine/languages).  You need to clone the repository with all it's submodules with using of the Git (You can install it from here https://git-scm.com/) from command line:

Step 2: Download QtLinguist tool
You can get it here: https://wohlsoft.ru/docs/Software/Qt_Linguist_5.6.zip When you will download archive, unpack it into any directory. (If you have troubles with running them on your machine, report me, I will fix bug and will update it), but instead you can download completed Qt build where it is included to use it.

Step 3: Run Qt-linguist and do translation
When you opened the Qt Linguist application, and open .TS file which you got or open it from sources in the Editor/languages/ folder. It's recommended to open multiple files at one: one with any understandable by you language which is currently done now (or English), and your .TS file which you got to create the translation into your language.

Hint: You also can read more about using of Qt Linguist utility here: http://doc.qt.io/qt-5/linguist-translators.html

Step 4: Compile translation to test it in work now
If you are done with the translation, you can compile your translation in a *.qm file and test it in compiled pge_editor (you need for latest laboratory version which you can get here). Use the File -> Compile menu item in Qt Linguist to compile your translation.

Step 5: Send translation to official PGE repository
If you have completed a translation, please send us your .TS-file by any convenient way:
 * Via PM on any forums to Wohlstand (PGE Forums, SMBX Forums, Talkhaus) or to Kevsoft.
 * Via pull-request on the GitHub (at first you must fork PGE repository and clone it. Then commit your translation and push changes to origin, then create a pull request to send translation directly to official repository)
 * via email (you can find email address in READMEs and inside source code).
 * Attach into post to the translation discussion thread

You will be added into PGE's credits list (can be seen in the PGE Editor's about dialog in Help -> About ) as translator with your nick-name, (Optionally) therefore we suggesting you send us your real name and/or email which are will be added into public credits list. Optionally you can make own avatar character in pixel-art style, (recommended maximum size is 128x128) which will be also shown in the credits list ( Please don't use copyrighted characters or make it be very different, not just copy or recolor ).

Misc stuff

 * Archive of flag icons
 * PGE translation discussion

List of translators
This is a list of people who contributed into translation of the PGE applications.

Completed translations

 * Chinese (快乐爱的小精灵)
 * Dutch (Gameinsky via WebLate)
 * English as default (Wohlstand, CaptainSwag101, Nexia)
 * French (NathanBnm via WebLate)
 * German (Kevsoft)
 * Italian (ImperatoreXx, Darkonius Mavakar, AndrewPixel)
 * Polish (Mario_and_Luigi_55, P4VL0VSKEY)
 * Portuguese (Brazilian) (tb1024)
 * Russian (Wohlstand)
 * Spanish (hacheipe399)
 * Ukrainian (h2643)

Incomplete translations

 * Norsk (Allan Nordhøy via WebLate)
 * Swedish (rasmusolle via WebLate)