-
Notifications
You must be signed in to change notification settings - Fork 71
Translating Minigalaxy
For translating Minigalaxy Poedit can be used.
The process of translation contains the following steps:
-
Install Poedit
-
Fork the git repository (it's the button on the top right)
-
Clone your git repository with:
git clone https://github.com/YOURUSERNAME/minigalaxy
Replace YOURUSERNAME with your GitHub username.
- Generate the base translation file by running the the following commands in the same terminal:
cd minigalaxy
scripts/update-translation-files.sh
-
Open
minigalaxy/data/po/minigalaxy.pot
with Poedit -
Select your language
-
Make the translation by filling out all the fields
-
Click save and save the translation with the suggested filename
-
Run the script to compile the translation:
scripts/compile-translations.sh
This should be done on in the terminal inside the Minigalaxy directory
-
Add your language to the properties menu. This can be done by updating the
SUPPORTED_LOCALES
variable inminigalaxy/constants.py
with a text editor. The first field is the name of the translation file without extension, the second part is the English name for the language. Running step 4 again and updating the translation file with PoEdit again is recommended here, since the language name can be translated. -
Start Minigalaxy with the following command:
bin/minigalaxy
This should be done on in the terminal inside the Minigalaxy directory. Open preferences and set the language. Then exit and start Minigalaxy again to test the translation.
- Commit your changes with the following commands:
git add data/po/youtranslation.po minigalaxy/cpmstants.py
git commit -m "Added translation"
git push
Replace yourtranslation.po
with the filename for your translation here. This should be done on in the terminal inside the Minigalaxy directory.
- Create a pull request. This can be done by going to https://github.com/YOURUSERNAME/minigalaxy and clicking the "new pull request" button. Replace YOURUSERNAME with your GitHub username.
That's it, you have now proposed your translation to the project. Only thing left is to wait for it to be accepted or for some feedback.