Skip to content

Translating Minigalaxy

Wouter Wijsman edited this page Sep 30, 2021 · 5 revisions

For translating Minigalaxy Poedit can be used.

The process of translation contains the following steps:

  1. Install Poedit

  2. Fork the git repository (it's the button on the top right)

  3. Clone your git repository with:

git clone https://github.com/YOURUSERNAME/minigalaxy

Replace YOURUSERNAME with your GitHub username.

  1. Generate the base translation file by running the the following commands in the same terminal:
cd minigalaxy
scripts/update-translation-files.sh
  1. Open minigalaxy/data/po/minigalaxy.pot with Poedit

  2. Select your language

  3. Make the translation by filling out all the fields

  4. Click save and save the translation with the suggested filename

  5. Run the script to compile the translation:

scripts/compile-translations.sh

This should be done on in the terminal inside the Minigalaxy directory

  1. Add your language to the properties menu. This can be done by updating the SUPPORTED_LOCALES variable in minigalaxy/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.

  2. 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.

  1. 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.

  1. 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.

Clone this wiki locally