-
Notifications
You must be signed in to change notification settings - Fork 35
Translations
Valama uses gettext as localization system. See also the GNU gettext manual.
There are basically two recommended ways to contribute translations:
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).
- Visit Transifex project page (and login).
- Click on "Create language" and follow instructions (select language and select coordinator - either you or Lasall)
- Go back to "Overview", select language resource "po/valama.pot" and start translation with "Translate now".
See also Transifex documentation: Transifex Helpdesk - Translators
- Visit Transifex project page (and login).
- Select your language.
- Select language resource "po/valama.pot" and start translation with "Translate now".
See also Transifex documentation: Transifex Helpdesk - Translators
Install transifex-client (which uses configuration file .tx/config in source directory).
- Update all translation files from Transifex by running following command somewhere in source tree:
tx pull -f -a --disable-overwrite
- 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
- Clean temporary files:
rm po/*.po.new
tx push -s
- First merge related translation file on Transifex to avoid losing translations. Follow Merge translations but additionally use
-l cc_CC
switch wherecc_CC
is your language, e.g.en
oren_GB
. - Push updated translation file:
tx push -l cc_CC
- Checkout the source code and change into
po/
directory. - Create new messages catalog (where
cc_CC
is the target locale you want to translate, e.g.en
oren_GB
). Requires gettext to be installed.
msginit -l cc_CC
- Translate msgid strings to msgstr strings in the newly created
cc_CC.po
file. - 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.)
- Checkout the source code and change into
po/
directory. - Update the messages catalog (where
cc_CC
is the target locale you want to translate, e.g.en
oren_GB
). Requires gettext to be installed.
msgmerge --update --backup=none cc_CC valama.pot
- Translate msgid strings to msgstr strings in the updated
cc_CC.po
file. Remove all fuzzies and commented lines at the end. - 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.)
To update the valama.pot
file run cmake with the pot
target.
mkdir build
cd build
cmake ..
make pot
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.
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.
Ask the authors or drop in on IRC channel #valama on freenode.
- Transifex
- Submit new translations
- Update existing translations
- Repository integration (devs only)
- Merge translations
- Push changed valama.pot
- Push changed po file
- Github
- Submit new translations
- Update existing translations
- Tips
- Update the catalog template
- The context of some strings is not clear
- Some base strings are wrong
- [[WT?#)%@$@#! ?????|Translations#wt-]]