Hi Derrell, On Monday February 14 2011 16:40:56 Derrell Lipman wrote: > Having never had to do any internationalization of apps before (the whole > world does, in fact, speak English, doesn't it? :-) ), I just spent some > quality debugging time trying to figure out why most stuff in my > application was translating when I switched the locale, but not a few > things. I discovered the following: > > label = new qx.ui.basic.Label(this.tr<http://this.tr>("Language") + > ": "); > > Here, I figured that the colon should always be there and should be > language-independent, so separated it from the string requiring > translation. Unfortunately, the Label code checks its value when a > changeLocale event is received and discovers that the value, "Language:" > is not a translatable string, so does not provide the replacement from the > newly-selected language. Yes, that's right. The label indeed does use the whole value and tries to translate it. However, we do not have a possibility to distinguish between the localized string and - in this particualar case - the colon. The label only stores the whole string as its value.
> I understand what's happening, and my very simple label here is easily > corrected by simply including the colon in the translatable string. It > seems, though, that there are many times when a string (in a label) is > composed of multiple textual parts that should or could be translated > separately. What are "best practices" for dealing with this sort of thing? I do not know of any. In my experience you would go for the pragmatic solution and add the colon to the translatable string, since separating those two strings (and maybe in another issue more than two parts) is not worth the effort. Are there any other experiences/thoughts here on the list? Regards, Alex ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
