Skip to content
Innocent Bystander edited this page Jul 8, 2015 · 5 revisions

Hangoutsbot Translation Project

This is a preliminary guide, and subject to change.

initialising your environment

  1. You will need the gettext package on your system. For Debian users (and related distros): sudo apt-get install gettext
  2. Check out the super-project (hangoutsbot) and initialise the locale submodule (this repo). Note: Don't forget to set up locale project tracking with git checkout master (or whichever branch you are working on).
  3. In this repo, make both update-messages.sh and merge-compile.sh executable with:
chmod +x update-messages.sh
chmod +x merge-compile.sh

creating a new translation

  1. Execute ./update-messages.sh to update messages.pot - this file is the base template for all other files, and is generated based on file list inside POTFILES.in
  2. Create the <language>/LC_MESSAGES/ folder, replacing <language> with your desired language code
  3. Copy messages.pot into it and rename it hangupsbot.po

updating existing translations

  1. Execute ./update-messages.sh to update messages.pot - this file is the base template for all other files, and is generated based on file list inside POTFILES.in
  2. Use the following command to tell merge-compile.sh where to find the existing hangupsbot.po to merge and compile: export HANGOUTSBOT_LOCALE=<language>, replacing <language> with the appropriate language code
  3. Execute ./merge-compile.sh which should run msgmerge on the .po file and merge latest changes (if any) from messages.pot; and subsequently compile the .mo file with msgfmt

Note: ./merge-compile.sh will check for the existence of the .po file and the HANGOUTSBOT_LOCALE environment variable before executing.

You can run these steps any time there is an update in the super-project that affects the translation project.