old-www/HOWTO/Bangla-HOWTO/devguide.html

866 lines
15 KiB
HTML

<HTML
><HEAD
><TITLE
>Developers' Guide</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Bangla in GNU/Linux HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Users' Guide"
HREF="usersguide.html"><LINK
REL="NEXT"
TITLE="Appendix"
HREF="appendix.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Bangla in GNU/Linux HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="usersguide.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="appendix.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="devguide"
></A
>3. Developers' Guide</H1
><P
> 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.
</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="devproc"
></A
>3.1. The general development process</H2
><P
> The development center is the
<A
HREF="http://www.bengalinux.org"
TARGET="_top"
>www.Bengalinux.org</A
> website. The model followed is
the generic FLOSS type "bazaar" model (slightly localized version ;-), and you get all the
goodies (<SPAN
CLASS="acronym"
>CVS</SPAN
>, shell access, scp, email lists, etc). If you are interested in
developing, send a mail to <TT
CLASS="email"
>&#60;<A
HREF="mailto:core@bengalinux.org"
>core@bengalinux.org</A
>&#62;</TT
> announcing your intentions. </P
><P
> A developer must be subscribed to the mailing list of the project he or she is work
on - please see the <A
HREF="http://www.bengalinux.org/projects"
TARGET="_top"
>Projects</A
> section of
Bengalinux.org. </P
><P
> Usual netiquettes are applicable to all the lists - be polite/gentle, do not send
HTML mails, do not shout, etc. </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="prerequisites"
></A
>3.2. Pre-requisites</H2
><P
>&#13; <P
></P
><UL
><LI
><P
>&#13; Must know how to read and write proper Bangla (at least Grammar should be OK).
</P
></LI
><LI
><P
> 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.)
</P
></LI
><LI
><P
> (This one is optional) - must have basic idea about l10n (if possible,
<SPAN
CLASS="acronym"
>RTFM</SPAN
> by going through the <SPAN
CLASS="application"
>GNU gettext</SPAN
> info page)
</P
></LI
><LI
><P
> Must be willing to follow the general FLOSS philosophy and procedures while
developing for the project - and in general behave like a saint ;-). </P
></LI
></UL
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="transguide"
></A
>3.3. Translators' Guide</H2
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="procedural"
></A
>3.3.1. Procedural Guide</H3
><P
> Translation is pretty straight forward - you need to edit the
<TT
CLASS="filename"
>*.po</TT
> (Portable Object) files. To get the <SPAN
CLASS="acronym"
>PO</SPAN
> files -
check out which files are untranslated from
<A
HREF="http://developer.gnome.org/projects/gtp/status/gnome-2.4/bn/index.html"
TARGET="_top"
>&#13;http://developer.gnome.org/projects/gtp/status/gnome-2.2/bn/index.html</A
>. 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 <A
HREF="http://www.yudit.org"
TARGET="_top"
><SPAN
CLASS="application"
>Yudit</SPAN
>
</A
> - and other possible options are <A
HREF="http://lekho.sourceforge.net"
TARGET="_top"
>&#13;<SPAN
CLASS="application"
>Lekho</SPAN
></A
> and the good old <SPAN
CLASS="application"
> Gedit2</SPAN
>.
</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Before you start working on something, make sure that you announce the file
you are working on at <TT
CLASS="email"
>&#60;<A
HREF="mailto:gnome-translations@bengalinux.org"
>gnome-translations@bengalinux.org</A
>&#62;</TT
>. This may save a lot of
trouble and frustation ;-). </P
></TD
></TR
></TABLE
></DIV
><P
> 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. </P
><P
> You will find some lines like </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;
#: atk/atkobject.c:1183
msgid "invalid"
msgstr ""
</PRE
></FONT
></TD
></TR
></TABLE
><P
> 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</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;
#: atk/atkobject.c:1183
msgid "invalid"
msgstr "bhul"
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="tip"
><P
></P
><TABLE
CLASS="tip"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Here, I have written the word <I
CLASS="foreignphrase"
><EM
>bhul</EM
>
</I
> 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. </P
></TD
></TR
></TABLE
></DIV
><P
> 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
<TT
CLASS="email"
>&#60;<A
HREF="mailto:gnome-translation@bengalinux.org"
>gnome-translation@bengalinux.org</A
>&#62;</TT
>, so that the other developers can also go
through it. </P
><DIV
CLASS="important"
><P
></P
><TABLE
CLASS="important"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/important.gif"
HSPACE="5"
ALT="Important"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Before submitting the translation as final - please check the file with the
command: </P
><P
>&#13; <TT
CLASS="prompt"
>bash$</TT
>
<TT
CLASS="userinput"
><B
>msgfmt -c filename_bn.po -o /dev/null</B
></TT
>
</P
><P
> where <TT
CLASS="filename"
>filename_bn.po</TT
> is the file you are working on.
</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="style"
></A
>3.3.2. Style Guide</H3
><P
> While translating, remember not to <EM
>kill the language</EM
> ;-). Do
not overdo the translation - do not use <I
CLASS="foreignphrase"
><EM
>Sadhu Basha</EM
>
</I
>. Also, when the computer is addressing the user, it is
<I
CLASS="foreignphrase"
><EM
>samman-shuchak (karun, balun, etc)</EM
></I
> while the
computer is addressed by <I
CLASS="foreignphrase"
><EM
>karo, balo, etc</EM
></I
>.
If a Bangla equivalent sounds too out of the ordinary - keep the English word (in Bangla script)
- it can be always changed/improved later. <EM
>DO NOT</EM
> overdo anything. </P
><P
>Also, keep proper nouns and trademarks/brandnames as they are.
(<SPAN
CLASS="application"
>Bourne Again Shell (BASH)</SPAN
> should not be called <I
CLASS="foreignphrase"
>Aabaar
Bourne Shell</I
>). </P
><P
> Use the more common word (<I
CLASS="foreignphrase"
><EM
>jaanlaa</EM
>
</I
> and not <I
CLASS="foreignphrase"
><EM
>gabaakhya</EM
></I
>). 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 <SPAN
CLASS="QUOTE"
>"Save"</SPAN
> can
do in a computer ;-). </P
><P
> If you have comments regarding a certain translated string, please write that
(commented out with a <SPAN
CLASS="QUOTE"
>"#"</SPAN
>), 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. </P
><P
> However, while commenting, remember that you <EM
>cannot</EM
> have
any comments between the <EM
>msgid</EM
> and <EM
>msgstr</EM
> lines.
</P
><P
> That means </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;
#: atk/atkobject.c:1183
msgid "invalid"
# yadayadayada
msgstr "bhul"
</PRE
></FONT
></TD
></TR
></TABLE
><P
>is invalid. Instead you should write-</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;
#: atk/atkobject.c:1183
msgid "invalid"
msgstr "bhul"
# yadayadayada
</PRE
></FONT
></TD
></TR
></TABLE
><P
> Also ...last but in no way the least, spellcheck, spellcheck, spellcheck. During
translation session - always sit with your dictionary, or even better, the <EM
>Bangla
Baanaan Abhidhan</EM
> from the Bangladesh Bangla Academy. The
<SPAN
CLASS="application"
>bspeller</SPAN
> from
<A
HREF="http://www.bengalinux.org/projects/dictionary/bspeller.php"
TARGET="_top"
>Bengalinux</A
> may
be useful here. </P
><P
> Another recommended book is the <EM
>Samartha-ShabdaKosh</EM
> (Bangla
Thesaraus) by Ashok Mukherjee from Sahitya Samsad. </P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="testing"
></A
>3.3.3. Testing the translations</H3
><P
> 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
<EM
>Open</EM
> stands for <I
CLASS="foreignphrase"
>Kholo</I
> or
<I
CLASS="foreignphrase"
>Khola</I
>. 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.
</P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> This process works for most systems with GDM as the login manager. However, I
cannot guarantee that this will work on your system. </P
></TD
></TR
></TABLE
></DIV
><P
> To begin with, setup the <A
HREF="usersguide.html#locale"
>locale for Bangla</A
> and
<A
HREF="usersguide.html#fonts"
>install some</A
> Bangla fonts. </P
><P
> 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 <SPAN
CLASS="acronym"
>MO</SPAN
> files with the
command: </P
><P
>&#13; <TT
CLASS="prompt"
>bash$</TT
>
<TT
CLASS="userinput"
><B
>msgfmt -o file.mo file.version.gnomeversion_bn.po</B
></TT
>
</P
><DIV
CLASS="caution"
><P
></P
><TABLE
CLASS="caution"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/caution.gif"
HSPACE="5"
ALT="Caution"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> While doing this, remember to strip all the version and language information
from the mo file's name, ie, <TT
CLASS="filename"
>gnome-games.gnome-2-4.bn.po</TT
> should be
converted to <TT
CLASS="filename"
>gnome-games.mo</TT
>. </P
><P
> If you are unsure about a package, do a <B
CLASS="command"
>rpm -ql packagename</B
>, and you will get the naming
scheme for the package. For example, a part of the output of <B
CLASS="command"
>rpm <TT
CLASS="option"
>-ql</TT
>
<TT
CLASS="parameter"
><I
>gdm</I
></TT
></B
> reads
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; /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
</PRE
></FONT
></TD
></TR
></TABLE
><P
> From this, it becomes apparent that one has to issue the command
<B
CLASS="command"
>msgfmt <TT
CLASS="option"
>-o</TT
> <TT
CLASS="parameter"
><I
>gdm-2.4.mo gdm2.gnome-2-2.bn.po</I
></TT
>
</B
> for the <SPAN
CLASS="application"
>GDM</SPAN
> package. </P
></TD
></TR
></TABLE
></DIV
><P
> Once you are finished with that, copy the <SPAN
CLASS="acronym"
>MO</SPAN
> files to
<TT
CLASS="filename"
>/usr/share/locale/bn_IN.UTF-8</TT
> or
<TT
CLASS="filename"
>/usr/share/locale/bn_BD.UTF-8</TT
>, depending on how you set up your locale.
</P
><P
> Now, open up <TT
CLASS="filename"
>/etc/X11/gdm/locale.alias</TT
> and add the following
lines to it. </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; Bengali bn_IN.UTF-8,bn_IN
</PRE
></FONT
></TD
></TR
></TABLE
><P
> After this, restart <SPAN
CLASS="application"
>X</SPAN
>, select Bengali in the Languages
menu and relogin into <SPAN
CLASS="application"
><SPAN
CLASS="acronym"
>GNOME</SPAN
></SPAN
>. You will be presented
with a Bangla system. </P
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> 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 <SPAN
CLASS="acronym"
>MO</SPAN
> file in the proper
place. Now, fire up <SPAN
CLASS="application"
>xterm</SPAN
>, and issue the command <B
CLASS="command"
>export
LANG=bn_IN.UTF-8</B
> or <B
CLASS="command"
>export LANG=bn_BD.UTF-8</B
>. After this, from xterm
itself, start the program you want to check, and it will start up with a Bangla interface.
</P
></TD
></TR
></TABLE
></DIV
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="usersguide.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="appendix.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Users' Guide</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Appendix</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>