I've started to patch gnucash to use gettext for internationalization.
There are some design problems.

1- Currently, for all languages, there is a file messages_<lang>.h. in
   which messages are defined by macros. But xgettext (used to extract 
   translatable strings from sources) doesn't take preprocessor
   directives in to account. According to me there are 2 solutions:

   * the standard way: we can replace all macros in sources by the
     corresponding strings marked as translatable (with directive _).
     i.e. ACC_CODE_STR will be replaced by _("Account Code")

   * the simplest way: we can produce a pseudo C file from
     message_en.h and apply xgettext on it.

   I prefer the first solution but it implies to change all files that 
   include translatable strings.

2- Strings in messages_nolang.h are translatable strings concated with 
   colons or elipses. With gettext, strings are no longer constant and
   is impossible to concat such strings with colon at compile time.

   I propose to add two functions (with_colon, with_elipse). All
   macros in messages_nolang.h will be replaced as follow:
        ACC_CODE_C_STR ->    with_colon(ACC_CODE_STR)
                          or with_colon(_("Account Code"))

I wish I was clear enough. A temporary patch is available for testing at
        http://perso.wanadoo.fr/jl.pelecq/gnucash.html
(remark: strings with colons or elipses are not translated)

Regards,

Laurent Pelecq



----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to