Re: qxtransformer and i18n

2 views
Skip to first unread message

Christian Boulanger

unread,
Nov 2, 2009, 6:08:52 AM11/2/09
to Cajus Pollmeier, qxtran...@googlegroups.com
Hi Cajus,

in a previous version, we had automatic translation of label -- qxt
automatically wrapped label-like properties in this.tr(...).
Unfortunately, as far as I recall, the rewritten engine has not
re-implemented this behavior, although that is on the agenda. Siarhei,
can you confirm?

Cheers,

Christian

2009/11/2 Cajus Pollmeier <ca...@naasa.net>:
> Hi,
>
> I'm currently playing around with qxtransformer and found it really useful
> for future projects. Since I'm doing internationalized applications, I was
> looking for a possibility of translating labels, etc. but couldn't find docs
> about it.
>
> Is it possible to add translation requests to the xml files?
>
> Thanks,
> Cajus
>

Siarhei Barysiuk

unread,
Nov 2, 2009, 6:54:28 AM11/2/09
to qxtran...@googlegroups.com
Yes, we haven't such a feature in 0.4 version. Christian, is this
still this.tr(...) structure in 0.8?
I don't think that it's hard to implement.

Siarhei

Christian Boulanger

unread,
Nov 2, 2009, 7:07:26 AM11/2/09
to qxtran...@googlegroups.com, Cajus Pollmeier
Yes, it should be still the same. Question to the community - what do
you think would be the best solution:

- for example, we could have a global attribute on the application or
widget level qxt:translate="true" which would force qxt to wrap all
attribute names that are in a list of translateables (label, caption,
title ...) in this.tr();
- additionally, on the widget level, we could add an attribute
qxt:translateAttributes="attribute1,attribute2,.." which will then
wrap only the given attributes, for non-standard cases.

Any other ideas?

C.

2009/11/2 Siarhei Barysiuk <s.bar...@gmail.com>:

Siarhei Barysiuk

unread,
Nov 2, 2009, 7:09:53 AM11/2/09
to qxtran...@googlegroups.com
Also it's possible to add
qxt:translateAttributes="attribute1,attribute2,.." on the application
level. Because mainly these attributes are the same for different
widgets.

Burak Arslan

unread,
Nov 2, 2009, 8:03:02 AM11/2/09
to qxtran...@googlegroups.com
On Mon, November 2, 2009 14:07, Christian Boulanger wrote:
>
> Yes, it should be still the same. Question to the community - what do
you think would be the best solution:
>
> - for example, we could have a global attribute on the application or
widget level qxt:translate="true" which would force qxt to wrap all
attribute names that are in a list of translateables (label, caption,
title ...) in this.tr();
> - additionally, on the widget level, we could add an attribute
> qxt:translateAttributes="attribute1,attribute2,.." which will then wrap
only the given attributes, for non-standard cases.
>

in jsqt, i have widget attributes that emit "String"s or
"TranslatableString"s. the decision is hard-coded. it's not really a
problem, because if you don't provide any translation, the string inside
this.tr() is returned intact anyway.

oh, to get the this.tr function, you need the translation mixin included.
see qooxdoo's i18n page.

best,
burak


Reply all
Reply to author
Forward
0 new messages