It's been rumoured that Laurent P�lecq said:
> 
> 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.

I think the second is a lot better.  It allows spell-checking
(which first alternative does not).  It avoids the elipses problem you describe
below.  It avoids the propagation of similar but slightly different messages
(e.g. having a grammer correction not being propagated to all the places
where it occurs).  It avoids the loss of translation when a minor change
is made in the native-language string.  It provides a centralized dictionary.  
It allows two different words to have the same translation, or v.v. (the same 
english word to have two different translations in another language).

I think gettext was designed for the lowest-common-denominator of programming, 
for programs that had a mess that was too painful to cleanup by any other means.  
It would be a step back to loose a centralized dictionary.

> 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)

I noticed that it includes a lot of source code in a directory 'intl'

-- if this is automatically generated code, it shouldn't be included
   at all.

-- if this is cut and paste from a pacakge that is not widely available
   or is buggy or poorly supported, it belongs in the lib subdirectory.

However, it looked like neither, it looked like the source for libgettext,
so I hope this code will go away ?! in the final version.

--linas


----- %< -------------------------------------------- >% ------
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