Xiphos Bible

Translation Guidelines

# This file is distributed under the same license as the PACKAGE package.

Translating Xiphos

Like all other Gnome programmes Xiphos is translated by creating a "po" file
for it in the relevant language.

1.) po files structure
2.) getting ready to create/update a po file
3.) creating a po file from scratch
4.) updating a po file
5.) Translators IDE

1.) Po files are essentially text files with an entry for each string which
requires translation. 

Each entry consists of three or four parts:

#: ../xiphos.desktop.in.in.h:1
msgid "Xiphos Bible Guide"
msgstr "زیفوس-نرم·افزار·مطالعه·کتابمقدس"

A comment line pointing towards the exact origin of the particular string
within the source code
A msgid line which quotes the original string 
A msgstr line which contains the relevant translation.

A tranlation which is doubtful can carry a second comment line, declaring it
as "fuzzy":

#: ../ui/prefs.glade.h:21
#, fuzzy
msgid "Base text size"
msgstr "سایز قلم بنیادی"  

2.) Before working on a po file, first you must make sure that you have
all the current strings ready to process.  This is in the file xiphos.pot.
It is updated by cd'ing into the "po" directory and using

intltool-update --pot

It will write a file called untitled.pot.  Use this command to see if the
new version is sane:

diff -u xiphos.pot untitled.pot

If it's OK, then...

mv untitled.pot xiphos.pot

3.) To create a new translation simply copy the file xiphos.pot to your
working copy:

cp xiphos.pot xx.po

where xx stands for the relevant ISO code for your target language,
e.g. fa.po for Farsi, de.po for German etc.

4.) If you need to update your file to the newest strings you can use the
command msgmerge:

msgmerge xx.po xiphos.pot > xx.po.new

5.) Suitable programmes to make translation easy are 

poedit   (both on Linux)