Hi Luke,

On Monday 07 December 2009 lp1051 wrote:
> I just started to learn qooxdoo, and I like it a lot! 
Thanks for the kudos and welcome to the project!

> Everything works fine so far, but now I came to problem with this.tr(). 
> Snippet of code:
> var title = "Title";
> var icon = "path_to_icon";
> var atom = new qx.ui.basic.Atom(this.tr(title), icon);
> 
> When I try to generate source (or even source-all) I get always following
> error:
>   - Processing translation for 2 locales...
> !!! Could not extract translation from backoffice.fw.baseui.Desktop!
> !!! Unsupported param of type variable at line 145
> 
> I have qooxdoo-0.8.3-sdk. When I do the same, but using this.tr("Title");
> the compilation completes successfully. Why can't I pass variable (which is
> type of string) into tr() method? Any help appreciated.
The translations methods ("tr" is one of them) are added to "qx.core.Object" 
so every qooxdoo object instance has these methods.
Static classes however do not get them as they are no instances of 
"qx.core.Object". You have to use the "tr" method of "qx.locale.Manager" if 
you want to use translation methods within static classes.

--snip-
var i18nString = qx.locale.Manager.tr("title");
--snip--

-> http://demo.qooxdoo.org/current/apiviewer/#qx.locale.Manager 

cheers,
  Alex

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to