[Etoys] work around layout checking of msgfmt

Bert Freudenberg bert at freudenbergs.de
Thu Sep 27 07:52:14 EDT 2007


On Sep 27, 2007, at 13:36 , korakurider wrote:

> --- Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>     a) for the lookup of #translated, how to know
>> correct
>>> domain of the receiver of #translated. without
>> this b)
>>> can't be executed in real.
>>
>> Can we use the class category as text domain, and if
>> the translation
>> is not found there, fall back to the one in global
>> file?
>
>    By specification of gettext, each domain has its MO
> (file name of MO includes domain name).  One PO can't
> include msgs for multiple domains.  So we will have still
> too many POs as long as class categories are used for
> domain, I think.

No, what I meant is that we look up twice. First in the domain  
provided by the class, and if not found, in the default domain.

We would only provide one po file for the default domain. But the  
mechanism above means someone could amend the system-provided  
translations with their own files.

Say, in Object we have "translationDomainFor: aSelector" returning  
'default' (or 'Squeak' or 'Etoys' or whatever our default domain is).  
Then a class wishing to override the translation domain could do so,  
we would not even have to hard-code the category name as translation  
domain. Or we could change that method in Object to look at the  
category later.

Don't you see some mechanism to allow additional translations is  
necessary?

>    Do you have reduction target for number of domains?

For now let's just have one.

- Bert -




More information about the Etoys mailing list