-
Notifications
You must be signed in to change notification settings - Fork 77
How to translate
This is an howto that explains the steps required to translate Razor-qt.
QT provides a set of tool to internationalize an application. If you never used it, the Qt Linguist Manual may be useful for you. Additional, each sub-project have a small script that makes the translation is really easy.
You need the lupdate and linguist programs. You can install them using your distro's package manager.
You need the source tree. You can download the stable version of Razor-qt at http://razor-qt.org/install/razorqt-0.4.0.tar.bz2. Or latest development version at https://github.com/Razor-qt/razor-qt/tarball/master.
.ts files
Each sub-project, have the translation directory. It contains the translation files like subproject_xx_YY.ts. Where xx is the language and YY is the country code. You don't need to create the this file by hand, just run the translate.sh script. This script create a TS-file for your locale, and open it in the linguist program.
.desktop files
The project uses a number of .desktop files. This is a text file, like:
[Desktop Entry]
...
Name=Razor Configuration Center
Name[pl]=Panel sterowania Razor
...
Comment=Configure Razor-Qt modules
Comment[pl]=Wszystkie ustawienia Razor-Qt
...
GenericName=Razor Configuration
GenericName[pl]=Panel sterowania Razor
...
Just add a lines for your language.
If you want to test the translation you need to do some additional steps. Generate .qm file:
lrelease razorpanel_clock_ru_RU.tsNow you have the razorpanel_clock_ru_RU.qm file, copy it into the application share directory. The path to it starts with /usr/share/razor or /usr/local/share/razor, followed by the sub-project name and possibly the plugin name. For example, directory for the panel clock plugin is /usr/share/razor/razor-panel/clock/.
Run the program and test translation.
razor-panel
Note: I hope we will simplify this step in the next release.
Please open the issue or send your .ts file to the Razor-qt group. And get international fame :)