Translating PyHoca-GUI
======================

Translating with gettext
------------------------

PyHoca-GUI uses gettext as translation service/mechanism (.po/.mo/.pot files).
The translation files can be found in the /po folder of this source project.


New team member --- new language for PyHoca-GUI
-----------------------------------------------
If you are a new member in the x2go-i18n team, the first we say is: WELCOME!!! and
THANKS!!! for the time you give to the X2Go project.

And, if you are new to the team and language files for the language you want to feel
responsible for do not yet exist, please subscribe to this mailing list first:

  https://lists.x2go.org/listinfo/x2go-i18n

Once you are subscribed, send an email to

  x2go-i18n@lists.x2go.org

that explains your willingness to translate this-and-that language.

The developers will then provide a language file for you in the above mentioned /po
folder.


Git cloning
-----------
Next thing to do is to obtained the latest sources from X2Go Git.

  $ # git needs to be installed, on Debian/Ubuntu this is
  $ aptitude install git
  $ # then checkout the code
  $ git clone git://code.x2go.org/pyhoca-gui.git

In your current working directory there should now be a subfolder named ,,pyhoca-gui''.


Editing Your Language File
--------------------------
The recommended tool for editing gettext translation files is ,,poedit''

  $ aptitude install poedit

Run poedit and configure it first (mostly personalizing, full name, email address, etc.).

Now open your language file in <current_dir>/pyhoca-gui/po/<lang>.po and edit it with
poedit.

NOTE: Make sure you translate all boldly marked items: non-translated as well as fuzzy
(i.e. inaccurate) items.


Testing i18n for development...
-------------------------------

First, install pyhoca-gui with all its dependency from our package repository
on your workplace/development machine.

For testing your translations of PyHoca-GUI you have to build the i18n files
with this command in PyHoca-GUI's base directory:

  $ cd <current_dir>/pyhoca-gui
  $ python setup.py build_i18n

If you system already runs with the locale (language setting) that you are
translating for then you simply have to start pyhoca-gui from the source base
folder:

  $ cd <current_dir>/pyhoca-gui
  $ ./pyhoca-gui

Otherwise export the locale you translate for before you execute pyhoca-gui (e.g.
for testing the German translation):

  $ export LANG=de_DE.UTF-8 pyhoca-gui


Sending in the Translation File
-------------------------------
When done, please send the complete translation file

  <current_dir>/pyhoca-gui/po/<lang>.po

to x2go-i18n@lists.x2go.org and remove your working copy of pyhoca-gui from
your system (or read how to use Git and keep the folder).


Other translation files for PyHoca-GUI:
---------------------------------------
The NSIS installer also has some translatable strings. Please take a look at the
subfolder nsis_include/ in the PyHoca-GUI source tree.


Next time...
------------
You will get informed on x2go-i18n if a translation update is necessary. So check
your mails there regularly.

For updating a translation, either keep the pyhoca-gui source project folder and
read more on Git by your self.

Alternatively, just remove the folder (once you have sent in the translation file)
and start with this documentation all over again.

THANKS AGAIN FOR YOUR TIME!!!

light+love,

  Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
