emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Before l10n, better practices for (message) ?


From: Jean-Christophe Helary
Subject: Re: Before l10n, better practices for (message) ?
Date: Fri, 26 May 2017 23:21:59 +0900

> I believe you meant something like
> 
>  (setq key1 "string1"
>        key2 "string2")
> 
>> (message key1)
>> (message key2)
> 
> One problem with this approach is that the programmer who writes the
> original code and provides the messages in English will have to
> manually create the English message catalog.

It just occurred to me that in gettext, "key" *is* the English string... So all 
gettext really does is create a POT with the key, the PO is created with the 
localized string, and the binary MO provides the localized string if present 
and if not the program displays the original which already is *in* the code...

The key=string format I'm showing above is actually the format Java programs 
use (and until now I was mostly involved with i18n/l10n of FOSS java programs). 
So the programer is actually creating the catalogue leaving only arbitrary key 
names in the source...

> Another problem is how to combine such catalogs from different source
> files, and/or make sure the "keyN" names from different files don't
> clash.

Is it very different from global variables clashing or not between packages?

> IOW, the question of suitable infrastructure is still there, with any
> approach.  That's why it is better to start by using whatever relevant
> infrastructure is provided by gettext, because at least some of these
> issues are already solved there, and because the package itself is
> widely available.

Yes, but to me it looks like gettext works like it does this because C is not 
an interpreted language and forcing Lisp code to use the full gettext process 
does look a bit unnatural.

I can see that we use gettext to extract strings and create POTs to get POs. 
But once the POs are there, do we need to create binary MO blobs ? I'm not sure 
at all. So in the end gettext would be used only for string extraction and a 
few checks. But I may be missing something important here...

Jean-Christophe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]