Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This is a guide to adding or updating translations for Drawpile.
Drawpile loads the translation for the current preferred language of the operating system, or the language selected from the settings dialog. If no translations for the selected language are available, the default English text will be used.
Installing the translation tools
Translation files are edited with Qt Linguist.
linguist-qt5 is usually available in the distro repositories:
dnf install qt5-qttools-devel
pacman -S qt5-tools
- Debian & Ubuntu:
apt-get install qttools5-dev-tools
zypper install libqt5-linguist
On Windows and Mac OS X, install the Qt SDK from qt.io. Linguist is included as part of the Qt Creator IDE.
For the convenience of those Windows users who do not want to download hundreds of megabytes worth of tools they will not need, you can get just the Linguist executable extracted from the SDK package. Simply unpack it into Drawpile's directory to use.
Getting latest Drawpile sources
The best way to get the most up to date version of Drawpile's source code is to use Git and clone the repository. Another option is to download the latest master branch package.
Having the full source code is not strictly required, but it will help because you will be able to see the context in which the words and phrases are used.
Starting a new translation
Translation files are located in the source code directory
The easiest way to start a translation is to just make a copy of an existing one
and modify that. The file should be named
drawpile_XX.ts, where XX is a two letter
ISO-639-1 language code.
If you have the development tools installed, a better way is to use lupdate to create
an empty translation file. For example, running
lupdate-qt5 .. -recursive -ts drawpile_ru.ts
i18n source directory will produce a new file
drawpile_ru.ts ready for translating.
Open the .ts file with Qt Linguist. If you are creating a translation for a new language, first go to Edit->Translation file settings and set the correct language and country.
The translators section of Qt Linguist's manual contains lots of useful tips and instructions.
Testing and contributing translations
Save a release version of the translation file to Drawpile's
i18n/ directory using
the File->Release as... menu action.
The location of this directory depends on the platform:
- Linux: Typically in
/usr/local/share/drawpile/drawpile/(or in the same folder as the binary)
- Windows: In the same folder as the executable (usually
- OSX: Inside the app bundle
Make sure your operating system language is set to the target language, or select the language explicitly from Drawpile's settings dialog and (re)start Drawpile. It should now use your translation!