Translation

From BibleTime
Jump to: navigation, search

BibleTime has several things to translate (localize) to your own language or other language too. The BibleTime web pages, BibleTime user interface, Bible study How To, HandBook and the biblical booknames. You can find BibleTime translation templates from the BibleTime Gitorious project page [1]. You can read about the tools for editing below.

The translations statistics we used to host at the website are no longer available to us, but believe me when I tell you, almost all languages need some work :)

Translation is not only a contribution. You get experience and you can find many application features which you haven't noticed before!

Contents

Tips

Note that there are sentences from the Bible within the BibleTime documentation and user interface. You do not need to translate them. Instead, just look in your Bible in your language and copy+paste a verse or a sentence from it into the BibleTime translation you are working on! In many cases the basic idea of the sentence is complex to understand. Thus those who have translated the Bible are professional translators. Make use of their high quality work.

Editing

BibleTime uses .po and .ts files for localization.

You can use Poedit (screenshots), Lokalize (screenshots) or Virtaal (screenshots) to localize the .po files.

The BibleTime application has been reworked to use Qt, Qt is more universal and works with a large number of different operating systems. Qt localization files are in xml format. The file extension they use is .ts. Only the BibleTime user interface is programmed with Qt since version 1.7.

You can translate .ts files with following applications:

Tidy

  • set tabstops=2
  • set textwdith=72
  • tidy -xml -indent -wrap 72 -q -m file.xml

Qt Linguist

You can use qt-linguist to translate BibleTime texts to your own language or to other language. If you have used KBabel, linquist maybe is familiar to you. First, you can install linguist translation application in Ubuntu

sudo apt-get install libqt4-dev qt4-designer qt4-doc
File:Linguist-fi.png
Linguist user interface in Kubuntu with finnish translation.

Then you can start it with command

/usr/bin/linguist

Or you can add that to menu of your operating system user interface. Installed packages contains other tools also. When the Linguist is running, you can open a .ts file for translating.

Qt Linguist has a good manual (Help on menu), which contains (for example) a good Qt Reference Documentation.

Virtaal

Virtaal is a powerful translation program suitable for beginners and advanced translators. It can open many formats, including .po and .ts files. The translation memory makes it easier to keep your translations consistent. It also integrates with Open-Tran.eu mentioned below.

Other features that you might be interested in:

  • Terminology support
  • Spell checking
  • Autocomplete
  • Integration with machine translation systems
  • Easy handling of XML tags
  • Easy navigation between strings based on search criteria, or translation status

Read about more powerful features of Virtaal

Testing your translations

  • Verify xml validity with
xmllint -noout -valid file.xml

Test .ts files in your own computer

When you have translated .ts file and if you use Qt Linguist, you can release it. It means that it is saved to .qm format in same directory where .ts is. Then you can copy it to there, where your operating system messages are. For example in Ubuntu you can copy that .qm file to /usr/share/locale/fi/LC_MESSAGES/ directory (if you use Finnish) and then you can start BibleTime and it will use your brand new translation. Here is the copy command:

sudo cp bibletime_ui_fi.qm /usr/share/locale/fi/LC_MESSAGES

Sudo is used, because LC_MESSAGES contains a system-wide set of files that cannot be changed by normal users.

After copying your .qm file, start BibleTime and it will use your brand new translation! I have tested this, and it works with BibleTime 1.6.5.1 version.

Test .po files in your own computer

You can test your translation in your own computer, if you have BibleTime application. If you are translating .po files, you can do following command to take your translation in effect in your computer (example is for Finnish language and for Kubuntu):

msgfmt -o /usr/share/locale/fi/LC_MESSAGES/bibletime.mo bibletime.po

Then start your BibleTime again, and you will see it in your own language.

Test build the Handbook on your computer


#
# Programs needed to generate and validate Handbook translations
#
# git - http://git-scm.com/
#
# po4a - http://po4a.alioth.debian.org/
# xsltproc - http://xmlsoft.org/XSLT/
# docbook-xml - http://www.oasis-open.org/docbook/
# docbook-xsl - http://docbook.sourceforge.net/projects/xsl/
#

cd /var/tmp # or somewhere else more permenant to suit you needs

git clone git://gitorious.org/bibletime/bibletime.git

cd bibletime

cp /path/to/translated/handbook-XX.po i18n/handbook # XX is your localisation code

#
# this will expend your translation into the appropriate docbook format
# it will update other languages too, do not be concerned
#
po4a -v --no-backups -k 0 cmake/docs/handbook_po4a.conf

cd docs/handbook/XX/html # same localisation code as above

xsltproc ../../../../cmake/docs/docs.xsl ../docbook/index.docbook

#
# you should now have html handbook
# watch for errors
#

Test build the HOWTO on your computer

#
# Programs needed to generate and validate Handbook translations
#
# git - http://git-scm.com/
#
# po4a - http://po4a.alioth.debian.org/
# xsltproc - http://xmlsoft.org/XSLT/
# docbook-xml - http://www.oasis-open.org/docbook/
# docbook-xsl - http://docbook.sourceforge.net/projects/xsl/
#

cd /var/tmp # or somewhere else more permenant to suit you needs

git clone git://gitorious.org/bibletime/bibletime.git

cd bibletime

cp /path/to/translated/howto-XX.po i18/howto # XX is your localisation code

#
# this will expend your translation into the appropriate docbook format
# it will update other languages too, do not be concerned
#

po4a -v --no-backups -k 0  cmake/docs/howto_po4a.conf

cd docs/howto/XX/html # same localisation code as above

xsltproc ../../../../cmake/docs/docs.xsl ../docbook/index.docbook

#
# you should now have html handbook
# watch for errors
#

Tools

Are you a real translator?

  • We would love to have your insights. There are lot of untranslated languages.
  • Have you translated BibleTime before? There has been active developing period. It causes lots of fuzzy translations with a large amount of languages. Thus fuzzies don't appear in business. So, there is some work to do. Make fuzzies translated and then untranslated to translated.

Difficulties of translating from one language to another

The technical things are relatively easy to learn. The most difficult and important part is to create an understandable high quality translation. You may find out that there are words or sentences in BibleTime which are difficult to translate to a particular language. If you find it difficult to understand what something means at all, it doesn't mean you are stupid. The original message may be badly chosen. Don't hesitate to ask.

There may also be clauses which are hardcoded so that they are difficult to put in another order. If your language uses different word order than English and the original code makes it impossible to create a good translation, don't hesitate to ask if the original code could be changed.

DIY

If you are a DIY (Do It Yourself) computer user, you may be able to do some more advanced things with the UI translation.

Updating the .ts file from the source code

The .ts files will go out of date when the UI is evolved. They are updated periodically by an administrator but you can do it yourself, too.

  • Install a command line program called lupdate. If you have Qt Linguist, it's probably installed already.
  • Download the BibleTime source code with svn.
  • Run lupdate from command line: "lupdate src/ -ts i18n/messages/bibletime_ui_XX.ts" (if you are in the source code root folder).

If the UI strings (messages) have been changed in the source code the .ts file is now updated.

Getting rid of obsolete messages

If classes inside the source code are renamed/removed or the original strings (messages) are changed/removed, the messages in the .ts file become obsolete. They are grayed out in Qt Linguist. They may still be useful if you use the "guesses" given by Linguist: the obsolete message texts may be still valid for new messages. For example, if a class is renamed from "CClass" to "BtClass" and it has messages "Click this" and "Read this", the messages become obsolete but there appears a new context in Linguist which has those same messages. Linguist is not intelligent enough to know that the messages are still valid, so you have to retranslate them. However, Linguist gives guesses and you can use them.

In some phase you want to get rid of obsolete messages. It's easy with lupdate:

  • lupdate -noobsolete src/ -ts i18n/messages/bibletime_ui_XX.ts

You can also ask the translation administrator to remove the obsolete messages.

Useful links

  • open-tran.eu - helps to translate some common GUI-related strings already translated in some other open-source programs. Virtaal integrates results from Open-Tran.eu as you translate.
Personal tools