Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search

3. Developers' Guide

This part of the HOWTO is mainly for developers - though the user who is interested in the internals can also go through it ;-). However, the developer should not start from here - he/she should at first read the preceding section to setup the system for Bengali support.

3.1. The general development process

The development center is the www.Bengalinux.org website. The model followed is the generic FLOSS type "bazaar" model (slightly localized version ;-), and you get all the goodies (CVS, shell access, scp, email lists, etc). If you are interested in developing, send a mail to announcing your intentions.

A developer must be subscribed to the mailing list of the project he or she is work on - please see the Projects section of Bengalinux.org.

Usual netiquettes are applicable to all the lists - be polite/gentle, do not send HTML mails, do not shout, etc.

3.2. Pre-requisites

  • Must know how to read and write proper Bangla (at least Grammar should be OK).

  • Must have some sort of editor which can be used to edit Unicode encoded Bangla. (Proprietary editors are not advisable - no support will be provided.)

  • (This one is optional) - must have basic idea about l10n (if possible, RTFM by going through the GNU gettext info page)

  • Must be willing to follow the general FLOSS philosophy and procedures while developing for the project - and in general behave like a saint ;-).

3.3. Translators' Guide

3.3.1. Procedural Guide

Translation is pretty straight forward - you need to edit the *.po (Portable Object) files. To get the PO files - check out which files are untranslated from http://developer.gnome.org/projects/gtp/status/gnome-2.2/bn/index.html. Download any one of the untranslated files and open it in an editor that supports Bangla (sorry - vi/emacs won't work here). I personally use Yudit - and other possible options are Lekho and the good old Gedit2.

Note

Before you start working on something, make sure that you announce the file you are working on at . This may save a lot of trouble and frustation ;-).

At the beginning of the file you will see some fields for filling in the translators' name, email, translation time, package name, etc. Fill them up, and proceed to the next part.

You will find some lines like


#: atk/atkobject.c:1183
msgid "invalid"
msgstr ""

        

The first line specifies the filename and the position in which the string in the second line occurs. The second line contains the actual string that is to be translated and the third line is the placeholder for the translated string in Bangla. Thus, in a translated file this set would look like


#: atk/atkobject.c:1183
msgid "invalid"
msgstr "bhul"

        
Tip

Here, I have written the word bhul in English due the limitations of present day technology. However, when you do the actual translation, you will need to write the translated strings in Bangla - and not English.

You will have to translate all the sets in a po file before it is considered to be complete. When it is complete, mail it to the translation list , so that the other developers can also go through it.

Important

Before submitting the translation as final - please check the file with the command:

bash$ msgfmt -c filename_bn.po -o /dev/null

where filename_bn.po is the file you are working on.

3.3.2. Style Guide

While translating, remember not to kill the language ;-). Do not overdo the translation - do not use Sadhu Basha . Also, when the computer is addressing the user, it is samman-shuchak (karun, balun, etc) while the computer is addressed by karo, balo, etc. If a Bangla equivalent sounds too out of the ordinary - keep the English word (in Bangla script) - it can be always changed/improved later. DO NOT overdo anything.

Also, keep proper nouns and trademarks/brandnames as they are. (Bourne Again Shell (BASH) should not be called Aabaar Bourne Shell).

Use the more common word (jaanlaa and not gabaakhya). Also always remember that the words need not be very much applicable to the actual action - an Englishman from the nineteenth century could not even have guessed what "Save" can do in a computer ;-).

If you have comments regarding a certain translated string, please write that (commented out with a "#"), so that we can go through it later. If you have more than one equivalent string in your mind, write all of them, and comment all of them except the one you think is the best.

However, while commenting, remember that you cannot have any comments between the msgid and msgstr lines.

That means


#: atk/atkobject.c:1183
msgid "invalid"
# yadayadayada
msgstr "bhul"

        

is invalid. Instead you should write-


#: atk/atkobject.c:1183
msgid "invalid"
msgstr "bhul"
# yadayadayada

        

Also ...last but in no way the least, spellcheck, spellcheck, spellcheck. During translation session - always sit with your dictionary, or even better, the Bangla Baanaan Abhidhan from the Bangladesh Bangla Academy. The bspeller from Bengalinux may be useful here.

Another recommended book is the Samartha-ShabdaKosh (Bangla Thesaraus) by Ashok Mukherjee from Sahitya Samsad.

3.3.3. Testing the translations

One of the most tricky things for a translator is understanding the context. For example, by simply looking at a pofile, a translator will have no clue whether Open stands for Kholo or Khola. To do context sensitive translation, a translator has to check out his/her translations in action, that is, in the application interfaces. This section describes a hack to see the translations without having to recompile the program.

Note

This process works for most systems with GDM as the login manager. However, I cannot guarantee that this will work on your system.

To begin with, setup the locale for Bangla and install some Bangla fonts.

Once that is done, get all the translated pofiles in a single folder in your machine (to avoid mess), and one by one convert them into MO files with the command:

bash$ msgfmt -o file.mo file.version.gnomeversion_bn.po

Caution

While doing this, remember to strip all the version and language information from the mo file's name, ie, gnome-games.gnome-2-4.bn.po should be converted to gnome-games.mo.

If you are unsure about a package, do a rpm -ql packagename, and you will get the naming scheme for the package. For example, a part of the output of rpm -ql gdm reads


          /usr/share/locale/ru/LC_MESSAGES/gdm-2.4.mo
          /usr/share/locale/sk/LC_MESSAGES/gdm-2.4.mo
          /usr/share/locale/sl/LC_MESSAGES/gdm-2.4.mo
          /usr/share/locale/sv/LC_MESSAGES/gdm-2.4.mo
          /usr/share/locale/ta/LC_MESSAGES/gdm-2.4.mo
          

From this, it becomes apparent that one has to issue the command msgfmt -o gdm-2.4.mo gdm2.gnome-2-2.bn.po for the GDM package.

Once you are finished with that, copy the MO files to /usr/share/locale/bn_IN.UTF-8 or /usr/share/locale/bn_BD.UTF-8, depending on how you set up your locale.

Now, open up /etc/X11/gdm/locale.alias and add the following lines to it.


        Bengali                 bn_IN.UTF-8,bn_IN
        

After this, restart X, select Bengali in the Languages menu and relogin into GNOME. You will be presented with a Bangla system.

Note

For testing a single application, you don't have to go through all this stuff. Just setup the locale, install the font and put the MO file in the proper place. Now, fire up xterm, and issue the command export LANG=bn_IN.UTF-8 or export LANG=bn_BD.UTF-8. After this, from xterm itself, start the program you want to check, and it will start up with a Bangla interface.