-
Notifications
You must be signed in to change notification settings - Fork 57
Translation HOWTO
We welcome new translations, but please be aware that translations are not just one time jobs. They have to be maintained in order to be useful. Otherwise they quickly get outdated and become obsolete, and useless. That said, we would be happy if you could maintain a new documentation translation.
Make sure you have the GNU gettext package installed. Grab the latest versions of the source files of Xiphos from GitHub:
$ git clone https://github.com/crosswire/xiphos.git
The translation files are in the po/ directory, so go to the po/ directory:
$ cd po
The xiphos.pot file contains the strings to be located, update the pot file:
$ intltool-update --pot
Copy the xiphos.pot file to YOUR-LANG.po file:
$ cp xiphos.pot YOUR-LANG.po
YOUR-LANG = LL_CC combination. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is an ISO 3166 two-letter country code. 'LL_CC' combinations can be abbreviated as 'LL' to denote the language's main dialect.
For example, let's suppose that you speak Portuguese, pt_BR.po is the name of YOUR-LANG.po file if you live in Brazil, but pt.po if you live in Portugal.
Add YOUR-LANG to the LINGUAS file:
$ echo " YOUR-LANG" >> LINGUAS
Editing the file manually (emacs, vi, gedit) or with one of the available programs for this (gtranslator, poedit, emacs po mode...), creating the translation:
$ vi YOUR-LANG.po
Check the file for errors (IMPORTANT! Don't forget this step):
$ msgfmt -cv -o /dev/null YOUR-LANG.po
Updating the .po file is easy
$ intltool-update YOUR-LANG.po
You are now ready to compile Xiphos and check the result of your work!
The help files are in the help/ directory:
$ cd help
There is a directory per YOUR-LANG, so create your own directory:
$ mkdir YOUR-LANG
Edit Makefile.am and add YOUR-LANG to DOC_LINGUAS (FIXME, this is out of date info):
$ vi Makefile.am
Goto YOUR-LANG/ directory
$ cd YOUR-LANG/
Generate po files. For more information on xml2po, check the output of xml2po --help and man xml2po.
$ xml2po -e -o YOUR-LANG.po ../C/*xml
Editing the file manually (emacs, vi, gedit) or with one of the available programs for this (gtranslator, poedit, emacs po mode...), creating the translation:
$ vi YOUR-LANG.po
You can add your localized screenshots. They go into the YOUR-LANG/figures directory.
When a new version of the help file is available, it's easy to update the po file:
$ xml2po -e -u YOUR-LANG.po ../C/*xml
Don't forget to send YOUR-LANG.po files to [email protected], or create a pull request on GitHub.
"..and ye shall be witnesses unto me both in Jerusalem, and in all Judaea, and in Samaria, and unto the uttermost part of the earth. " -- Acts 1:8
The Xiphos Development Team