Translating — puddletag

# Translating

In order to translate puddletag you need Git, Qt Linguist, the PyQt5 translation tools (specifically pylupdate5) and the ability to copy/paste into the console.

In Ubuntu and Debian-based distros, Git is available in ‘git’ package, Qt Linguist in qttools5-dev-tools and pylupdate5 in pyqt5-dev-tools.

After installing the required tools, you’ll need to retrieve the latest development release. Open up a terminal and paste the following:

    git clone https://github.com/puddletag/puddletag.git

The dev version will downloaded into the puddletag directory. Change into the dev directory with:

    cd puddletag

Then run update_translation.py with your desired locale (eg en_ZA, rus, fr) like so:

    python update_translation.py your_locale

Note

You can later update the dev version without downloading the whole thing again by using the following command in the downloaded puddletag dir:

    git pull origin master

A translation file will be created in puddlestuff/translations/puddletag_your_locale.ts. Open this file in Qt Linguist and translate to your heart’s content.

To test your translation, generate a .qm file using File->Release in Qt Linguist. puddletag_your_locale.qm will be generated in the directory the .ts file you opened is stored.

Copy the .qm to ~/.config/puddletag/translations (you’ll need to create the translations dir). Next time you start puddletag you’ll have the option to switch to the language in Edit->Preferences.

Otherwise just run:

    puddletag --langfile /path/to/your_locale.qm

That being said, I recommend you run the dev version, because the strings used may differ from the latest release. To do so use:

    cd path/to/puddletag_dev_dir
    python ./puddletag

Where path/to/puddletag_dev_dir is the path of the directory you downloaded the dev version of puddletag to.

When you’re done, create an issue on our issue tracker with your translation (the .ts file) and I’ll merge it in.