> > 2. Dynamic loading. > > > > This works as now - i.e. an instance of qx.locale.LocalizedString > > is created and evaluating the string value is carried out in > > "toString". Instances have to listen for changes to the locale and > > reload their values. All localised strings will re-evaluate their > > current values but using the new locale. > > > > I don't see any problems with this. It would be a compile-time > > option. If you want dynamic translation you enable it and take the > > hit of extra objects. If you want fast and lean, you disable > > dynamic loading and predetermine the locale and runtime. > > The problem is that in the second case the type of object routed > between classes is not a string, but a instance of a qooxdoo class. > This is fundamentelly more complex and different. Every type check > must handle this correctly etc.
I looked at the existing code (trunk and legacy_0_7_x) and there are no type checks of qx.locale.LocalizedString outside of the class itself and the translation management code. qx.Locale.LocalizedString handles conversion to a string with toString so it can look like a string object as needed. Where else is type checking needed on the object returned from this.tr etc? If it's type checking in a property it's trivial for you to make qx.locale.LocalizedString be a "String" (and to change the property value when the locale changes). I thought that the issue was that reload is needed on objects which have strings when the locale changes, so they need listeners for that event and so on. But it seems to me that you've done most of the work needed here. Why throw it away when it can easily be made optional as I have described? Your justification for removing this facility, which has been shown to be of real use in some cases, is that it adds overhead for everything. But a simple optional change - just making the this.trn call effectively transparent, fixes all that. 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