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

git clone git://github.com/schneegans/Gnome-Pie.git

Your current locale can be obtained with

echo $LANG

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.

  1. 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.
  2. 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 of de-DE.UTF8.
  3. 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 "".
  4. 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 file resources/locale/[your locale]/LC_MESSAGES/gnomepie.mo to /usr/share/locale/[your locale]/LC_MESSAGES/gnomepie.mo before.

Updating an existent translation

Updating a language which already has been translated is easy as well. Just follow the steps below.

  1. 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.
  2. 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.
  3. 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 ".
  4. 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 file resources/locale/[your locale]/LC_MESSAGES/gnomepie.mo to ´/usr/share/locale/[your locale]/LC_MESSAGES/gnomepie.mo</code> before.

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!

Comments

blog comments powered by Disqus