[etoys-dev] Translation support

Bert Freudenberg bert at freudenbergs.de
Tue May 4 14:23:30 EDT 2010

On 04.05.2010, at 10:26, Hilaire Fernandes wrote:
> Bert Freudenberg a écrit :
>> I'm just talking about an implementation detail. You do not have to worry about it, just use #translated in your code as usual.
> But I am interested by the implementation detail. I also want it ported to pharo.

Ah, okay.

>> "Method properties" are additional state you can attach to a compiled method. Similar to pragmas, but invisible. They are not created by tags in the source code while compiling, but are attached later. 
> Ok, thanks to explain.
>> I'm just proposing to use them to cache the translation domain for a method.
> Ok, what is exactly translation domain, is it text domain?

Yes - this determines in which mo file this is looked up.

>> Figuring this out properly at runtime is expensive (the code needs to work its way from the compiled method to the package it belongs to).
> Right.
> Is it really expensive ? I can't evaluate.

We should time building a viewer before and after the changes to see how much the changes affect this. I think a viewer is the most expensive thing to construct.

- Bert -

More information about the etoys-dev mailing list