Skip to site menu.
Skip to site content.
Skip to the footer.

How to translate this project?

First and foremost thank you for your interest in contributing to this project. In most cases before you translate, it's best to contact the pySioGame developer first to get your language added to the program, this will make it easier to test the translation as you go. If the language is already added then usually there is a couple of files to translate. The source language files are stored in the i18n/ directory. The main language files are located in the po/ directory, however some features that were rather hard to be extracted into the po files are located in language files in custom/ directory. In most cases you do not need to worry about anything in the kbrd/ and word_lists/ - these are usually done by the developer.

To edit the *.po files it's best to use the Poedit program - it's very easy to use and creates a compiled *.mo file for you after saving which is pretty convenient because this is the file the program uses. When you complete the translation the *.mo file needs to be moved to the to the language specific directory in locale/. If you run the program it will automatically move all compiled translations for you and also remove all temporary files making the project ready for packaging. You can usually run it by double clicking or alternatively via console.

The custom file is a bit harder because you are essentially editing a python source file. The comments, starting with #, do not need to be translated but in most cases explain how the piece of code that follows the comment needs to be translated. One of the things involves typing the alphabet in your language and then finding words starting with each letter of the alphabet. The tricky bit is the words need to describe the images in res/images/fc/ as the next line contains number of the image that the word is representing. Obviously not always it will be possible to match all letters to existing images so images may need to be added. First place to look for the images would be in res/images/art4apps/. Also there may be a case that no word starts with a particular letter, in such case the letter needs to be anywhere in the word.

There are also 2 functions one of them returns number spellings, the other one returns time as it is read. If you are not sure how to go about changing those please just write the rules how it's being done for 0-100 and also how you read time in your language. You may also have a look at other languages to get a rough idea how to do it.

At the end of the custom file you will find 12 lists/categories of words. If translated the word building activities will not only appear in the English language but also in the language you are translating the program to. Could be pretty useful but may be omitted as it's 589 words to translate. One way to go about it would be to translate it with Google Translate and then correct the bad translations (making sure the word matches the corresponding image in the res/images/art4apps/) and it's going to be quite a few of the bad ones. Google Translate tends to reorder the words so it's important to make sure they are still in the same order.

Please also remember to stay in touch if you get stuck at any point.