1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<!-- ============= Xiphos SVN ============-->
<sect2 id="svn-preparation">
<title>Preparation</title>
<para>Make sure that you have the GNU gettext package installed. Grab the
latest versions of the source files of &app; in Subversion: </para>
<para><command>
git clone https://github.com/crosswire/xiphos.git</command>
</para>
</sect2>
<sect2 id="svn-translating">
<title>Translating</title>
<para>The translation files are in the po directory. Go to the po directory: </para>
<para><command>
cd po</command>
</para>
<para>The xiphos.pot file contains the strings to be located. Update the pot file:</para>
<para><command>
intltool-update --pot</command>
</para>
<para> Copy the xiphos.pot file to YOUR-LANG.po file: 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 Portugual.</para>
<para><command>
cp xiphos.pot YOUR-LANG.po</command>
</para>
<para>
Add YOUR-LANG to the LINGUAS file:
</para>
<para><command>
echo "YOUR-LANG" >> LINGUAS</command>
</para>
<para>
Edit the file manually (emacs, vi, gedit) or with one of the available
programs for this (gtranslator, poedit, emacs po mode...), creating the translation:
</para>
<para><command>
vi YOUR-LANG.po</command>
</para>
<para>
Check the file for errors (IMPORTANT! Don't forget this step):
</para>
<para><command>
msgfmt -cv -o /dev/null YOUR-LANG.po</command>
</para>
<para>
Update the .po file from the latest source code
</para>
<para>
<command>
intltool-update YOUR-LANG.po
</command>
</para>
<para>
Or update it from the .pot file
</para>
<para>
<command>
msgmerge YOUR-LANG.po xiphos.pot > YOUR-LANG.po.new
</command>
</para>
<para>
Compile the translation (you will probably have to be root to do this)
</para>
<para>
<command>
msgfmt -o /usr/share/locales/YOUR-LANG/LC_MESSAGES/xiphos.mo YOUR-LANG.po
</command>
</para>
<para>
/usr/share/locales should be changed to whereever your prefix is for building Xiphos (eg, /usr/local/share/locales by default).
</para>
</sect2>
|