> > Why don't you simplify this: have the property system 
> automatically link
> > to the locale manager if a property value "string" is not a 
> > string but an
> > instance of qx.locale.LocalisedString? Then if the locale changes,
> > automatically call the apply function with the "toString" value 
> > of the
> > property. Similarly when calling getProperty convert to a string 
> > and
> > return that.
> 
> To me that solution sounds brilliant. The complexity is then still
> contained at one place.
> But please don't overload the behavior for 'string', rather use some
> other name.
> Like 'phrase' (to distingish it with the possible not human-readable
> string datatype).
> 
> This would also remove all the need for this.tr calls. This special
> property would just try to lookup a translation, or, if unavailable,
> just the expression as is. So, if  myWidget has a property called 
> name of type 'phrase', i could just do:

The trouble with that is that the dynamic substitution of parameters into
the translated string would be lost. They are only available when the
translation object is created with the this.tr call. They are retained,
and are put into the translation string when the locale is changed.

Hugh

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to