Translate Gnome-Pie!
It would be really cool if you could create a translation of Gnome-Pie into your language! It is quite easy and involves the following steps.
Translating Gnome-Pie (deprecated)
The information below is deprecated. For a much more convenient way to translate Gnome-Pie refer to the new blog post!
All you need is the source code of Gnome-Pie and the locale string for your language. You can get the source code with the terminal command
Your current locale can be obtained with
Creating a new translation
A translation of Gnome-Pie is done by editing a *.po file. This has to be generated first. Just follow the four steps below.
- Update the gnomepie.pot file:
- Navigate with a terminal to the directory
resources/locale
inside of the source directory of Gnome-pie. - Then enter the command
./gen-pot.sh
to create an updated template file.
- Navigate with a terminal to the directory
- Create your translation file:
- Still being in this directory enter the command
./gen-po.sh
. - Follow the instructions displayed in your terminal. You will have to insert your locale from above. You can also use a more general version of your locale, e.g.
de
instead ofde-DE.UTF8
.
- Still being in this directory enter the command
- Translate to your language:
- The steps above created an translation file. Open the file
resources/locale/[your locale]/ LC_MESSAGES/[your locale].po
with your favorite text editor. - Now create translations for every string in this file. There is the English string for each sentence in Gnome-Pie. Put your translation just beneath it in the empty
""
.
- The steps above created an translation file. Open the file
- Compile translations:
- Enter the command
./compile-po.sh
. When you now launch Gnome-Pie it should display in your language! If you installed it globally, you will have to copy the the fileresources/locale/[your locale]/LC_MESSAGES/gnomepie.mo
to/usr/share/locale/[your locale]/LC_MESSAGES/gnomepie.mo
before.
- Enter the command
Updating an existent translation
Updating a language which already has been translated is easy as well. Just follow the steps below.
- Update the gnomepie.pot file:
- Navigate with a terminal to the directory
resources/locale
inside of the source directory of Gnome-pie. - Then enter the command
./gen-pot.sh
to create an updated template file.
- Navigate with a terminal to the directory
- Update the translation file:
- Still being in this directory enter the command
./update-po.sh
. - Follow the instructions displayed in your terminal. You will have to insert the locale you want to update.
- Still being in this directory enter the command
- Translate to your language:
- The steps above updated the content of the translation file. Open the file
resources/locale/[your locale]/ LC_MESSAGES/[your locale].po
with your favorite text editor. - Now create translations for every string in this file which does not already have a translation. There is the English string for each sentence in Gnome-Pie. Put your translation just beneath it in the empty
"
.
- The steps above updated the content of the translation file. Open the file
- Compile translations:
- Enter the command
./compile-po.sh
. When you now launch Gnome-Pie it should display in your language! If you installed it globally, you will have to copy the the fileresources/locale/[your locale]/LC_MESSAGES/gnomepie.mo
to ´/usr/share/locale/[your locale]/LC_MESSAGES/gnomepie.mo</code> before.
- Enter the command
When this has been done you’re ready to send the updated translation file to code[at]simonschneegans.de! I’m looking forward to many translations!