Add new language

Christian Stimming stimming at tuhh.de
Fri Dec 16 04:39:48 EST 2005


Dear Anousak,

by the way, what is the language code for the Lao language, and in which 
countries is it spoken?

The command to "build a new .po file" is simply to copy the gnucash.pot 
file to the corresponding filename and start working:

   cp gnucash.pot <newlang>.po

Please read some of the gettext documentation -- it should explain how 
to work with these files. For example, one explanation (from here 
http://www.iro.umontreal.ca/translation/HTML/translators.html):

OK, let's say you decided to translate gnucash. Start by copying the 
file gnucash.pot into a work file named LL.po, where LL is your language 
code as explained earlier in this text, and just edit this file. It 
starts like:

         # SOME DESCRIPTIVE TITLE.
         # Copyright (C) YEAR Free Software Foundation, Inc.
         # This file is distributed under the same license as the 
PACKAGE package.
         # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
         #
         #, fuzzy
         msgid ""
         msgstr ""
         "Project-Id-Version: PACKAGE VERSION\n"
         "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
         "POT-Creation-Date: 2002-12-10 22:11+0100\n"
         "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
         "Language-Team: LANGUAGE <LL at li.org>\n"
         "MIME-Version: 1.0\n"
         "Content-Type: text/plain; charset=CHARSET\n"
         "Content-Transfer-Encoding: ENCODING\n"


Replace all the words in capitals with something appropriate. In this 
case, you will be the first author of the translation, and also the last 
translator of it. Please, don't use your own language to replace SOME 
DESCRIPTIVE TITLE; this line is meant to be read also by people not 
speaking your language. CHARSET may be utf8 for example, and ENCODING is 
often 8bit. Remove the `#, fuzzy' line once you have specified the items 
in capitals, because once this is done the header entry is no longer fuzzy.

Each message to translate is then given in turn in the PO file. For 
example, an untranslated entry might be:

         #: lib/error.c:88
         msgid "Unknown system error"
         msgstr ""


The empty msgstr string has to be filled with the translation for the 
string shown after msgid. If you were a German speaker, say, the entry 
once translated might look like:

         #: lib/error.c:88
         msgid "Unknown system error"
         msgstr "unbekannter Systemfehler"


You just produce a translation for all entries in the PO file, one after 
another, respecting the overall file format and the quoting needed for 
special characters, when needed. Observation and intuition may allow you 
to grasp what the format should be; the precise rules for PO files are 
given in the GNU gettext manual. The msgfmt program is helpful for 
pinpointing formatting errors.

Christian

Anousak Souphavanh schrieb:
> Thanks, Derek, for your info.
> 
> However accourding to TRANSLATION-HOWTO section 3, there is a FIXME: 
> Command to build a new .po file is missing. What is the command?
> Thanks in advance.
> 
> Anousak
> 
> On 12/15/05, *Derek Atkins* <warlord at mit.edu <mailto:warlord at mit.edu>> 
> wrote:
> 
>     http://wiki.gnucash.org/wiki/Translation
> 
>     Quoting Anousak Souphavanh <anousak at gmail.com
>     <mailto:anousak at gmail.com>>:
> 
>      > Hi Everyone,
>      >
>      > My team and I would like to translate GnuCash for Lao language.
>     What is the
>      > process to add new language?
>      >
>      > Thanks,
>      >
>      > --
>      > Anousak Souphavanh



More information about the gnucash-devel mailing list