-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Innocent Bystander edited this page Jul 8, 2015
·
5 revisions
This is a preliminary guide, and subject to change.
- You will need the
gettext
package on your system. For Debian users (and related distros):sudo apt-get install gettext
- 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). - In this repo, make both
update-messages.sh
andmerge-compile.sh
executable with:
chmod +x update-messages.sh
chmod +x merge-compile.sh
- Execute
./update-messages.sh
to updatemessages.pot
- this file is the base template for all other files, and is generated based on file list insidePOTFILES.in
- Create the
<language>/LC_MESSAGES/
folder, replacing<language>
with your desired language code - Copy
messages.pot
into it and rename ithangupsbot.po
- Execute
./update-messages.sh
to updatemessages.pot
- this file is the base template for all other files, and is generated based on file list insidePOTFILES.in
- Use the following command to tell
merge-compile.sh
where to find the existinghangupsbot.po
to merge and compile:export HANGOUTSBOT_LOCALE=<language>
, replacing<language>
with the appropriate language code - Execute
./merge-compile.sh
which should runmsgmerge
on the.po
file and merge latest changes (if any) frommessages.pot
; and subsequently compile the.mo
file withmsgfmt
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.