Skip to content
Dominique Lasserre edited this page Sep 2, 2013 · 3 revisions

Valama uses gettext as localization system. See also the GNU gettext manual.

There are basically two recommended ways to contribute translations:

  1. Transifex
  2. Github

If you don't want to create a Transifex or Github account to submit or update translations you are welcome to send mail to Dominique Lasserre (see the authors) (preferable with a git-format-patch). Follow Github instructions but instead of proposing a pull request send your po file or your commit (with git-format-patch).

Transifex

Submit new translations

  1. Visit Transifex project page (and login).
  2. Click on "Create language" and follow instructions (select language and select coordinator - either you or Lasall)
  3. Go back to "Overview", select language resource "po/valama.pot" and start translation with "Translate now".

See also Transifex documentation: Transifex Helpdesk - Translators

Update existing translations

  1. Visit Transifex project page (and login).
  2. Select your language.
  3. Select language resource "po/valama.pot" and start translation with "Translate now".

See also Transifex documentation: Transifex Helpdesk - Translators

Repository integration (developers only)

Install transifex-client (which uses configuration file .tx/config in source directory).

Merge translations

  1. Update all translation files from Transifex by running following command somewhere in source tree:
tx pull -f -a --disable-overwrite
  1. Merge translations (bash command executed from root of source directory):
for pofile in po/*.po.new; do \
  msgmerge -C $pofile ${pofile%.new} po/valama.pot -o ${pofile%.new} \
done
  1. Clean temporary files:
rm po/*.po.new

Push changed valama.pot

tx push -s

Push changed po file

  1. First merge related translation file on Transifex to avoid losing translations. Follow Merge translations but additionally use -l cc_CC switch where cc_CC is your language, e.g. en or en_GB.
  2. Push updated translation file:
tx push -l cc_CC

Github

Submit new translations

  1. Checkout the source code and change into po/ directory.
  2. Create new messages catalog (where cc_CC is the target locale you want to translate, e.g. en or en_GB). Requires gettext to be installed.
msginit -l cc_CC
  1. Translate msgid strings to msgstr strings in the newly created cc_CC.po file.
  2. Add your translation file to git, commit and make a pull request. (You have to push it to your own repository first, so you might want to fork Valama. Otherwise you also can submit a git-format patch.)

Update existing translations

  1. Checkout the source code and change into po/ directory.
  2. Update the messages catalog (where cc_CC is the target locale you want to translate, e.g. en or en_GB). Requires gettext to be installed.
msgmerge --update --backup=none cc_CC valama.pot
  1. Translate msgid strings to msgstr strings in the updated cc_CC.po file. Remove all fuzzies and commented lines at the end.
  2. Add your changed translation file to the git index, commit and make a pull request. (You have to push it to your own repository first, so you might want to fork Valama. Otherwise you also can submit a git-format patch.)

Tips

Update the catalog template

To update the valama.pot file run cmake with the pot target.

mkdir build
cd build
cmake ..
make pot

The context of some strings is not clear

If translation of some strings is difficult because the context is not obvious you are welcome to comment in the valma.pot file directly using the Github infile comment feature. We will then add a gettext comment to make the string easier to translate.

Some base strings are wrong

If some base strings are misspelled or grammatically wrong or simply doesn't make any sense, please report this issue or make a pull request.

WT?#)%@$@#! ?????

Ask the authors or drop in on IRC channel #valama on freenode.