sorry I forgot to tell that I am using Qooxdoo 1.0-beta1
regards
Hansjoerg
2010/2/24 Qoodary Doo <[email protected]>
> Hi Daniel,
>
> This is the some code of my application.js
>
> In the moment there is only a menu (which is nearly same as from
> demobrowser) and the Welcome Label
>
> Strange thing is that only the menu "Search" is translated from German to
> English.
> All other stuff remains in German.
>
> ==>var searchMenu = new qx.ui.menubar.Button(this.tr("Search"), null);
>
> --------------------------------------------------------------------
> qx.Class.define("mobilewebjobticket.Application",
> {
> extend : qx.application.Standalone,
> /*
>
> *****************************************************************************
> MEMBERS
>
> *****************************************************************************
> */
> members :
> {
> /**
> * This method contains the initial application code and gets called
> * during startup of the application
> */
> main : function()
> {
> // Call super class
> this.base(arguments);
>
> // Enable logging in debug variant
> if (qx.core.Variant.isSet("qx.debug", "on"))
> {
> // support native logging capabilities, e.g. Firebug for Firefox
> qx.log.appender.Native;
> // support additional cross-browser console. Press F7 to toggle
> visibility
> qx.log.appender.Console;
> }
>
> /*
>
> -------------------------------------------------------------------------
> Below is your actual application code...
>
> -------------------------------------------------------------------------
> */
>
> * qx.locale.Manager.getInstance().setLocale('en'); *
>
> var doc = this.getRoot();
>
> var scroller = new qx.ui.container.Scroll();
> var container = new qx.ui.container.Composite(new
> qx.ui.layout.Canvas);
> container.setPadding(5);
> container.setAllowStretchX(false);
> scroller.add(container);
> this.getRoot().add(scroller, {edge : 0});
>
> this.createCommands();
>
> container.add(this.getMenuBar());
>
> var mainContainer = new qx.ui.container.Composite(new
> qx.ui.layout.HBox(40));
>
> this.getRoot().add(mainContainer, { top:220, left: 20 });
>
> var Welcomelabel = new qx.ui.basic.Label(this.tr("Welcome to the
> first Qooxdoo app"));
> doc.add(Welcomelabel,{
> left : 100,
> top : 50
> });
>
> },//main function
>
>
> debugRadio : function(e) {
> this.debug("Change selection: " + e.getData()[0].getLabel());
> },
>
> debugCommand : function(e) {
> this.debug("Execute command: " + this.getShortcut());
> },
>
> debugButton : function(e) {
> alert('Druecke Button' + this.getLabel());
> this.debug("Execute button: " + this.getLabel());
>
> },
>
> debugCheckBox : function(e) {
> this.debug("Change checked: " + this.getLabel() + " = " +
> e.getData());
> },
>
>
>
> getMenuBar : function()
> {
> var frame = new qx.ui.container.Composite(new qx.ui.layout.Grow);
>
> var menubar = new qx.ui.menubar.MenuBar;
> menubar.setWidth(600);
> frame.add(menubar);
>
> var fileMenu = new qx.ui.menubar.Button(this.tr("File"), null,
> this.getFileMenu());
> var editMenu = new qx.ui.menubar.Button(this.tr("Edit"), null);
> var searchMenu = new qx.ui.menubar.Button(this.tr("Search"), null);
> var viewMenu = new qx.ui.menubar.Button(this.tr("View"), null);
> var optionsMenu = new qx.ui.menubar.Button(this.tr("Options"), null,
> this.getOptionsMenu());
> var helpMenu = new qx.ui.menubar.Button(this.tr("Help"), null);
>
> menubar.add(fileMenu);
> menubar.add(editMenu);
> menubar.add(searchMenu);
> menubar.add(viewMenu);
> menubar.add(optionsMenu);
> menubar.add(helpMenu);
>
> return frame;
> },
>
> ....
>
> --------------------------------------------------------------------
>
> 2010/2/24 Daniel Wagner <[email protected]>
>
>> Hi again,
>>
>>
>> I'm fresh out of ideas :(
>> Could you please post a small code snippet so we can reproduce the
>> problem? BTW, which version of qooxdoo are you using?
>>
>> Regards,
>> Daniel
>>
>> Qoodary Doo schrieb:
>> > Hi Stefan,
>> >
>> > thanks for your help.
>> >
>> > Yes, first step was adding the locales in config.json
>> > "LOCALES" : [ "en", "fr", "de" ],
>> >
>> > Then I prepared all strings with this.tr <http://this.tr
>> >("myEnglishString")
>> > The I did generate.py /translate
>> > After that I edit the de.po file and translate all strings.
>> > After that I did generate.py /source again.
>> >
>> > I think the translation works, because after translation QX recognize my
>> > German browser and shows all in German.
>> > But for future I want to switch the Language in a menu.
>> > So I try with;
>> >
>> > qx.locale.Manager.getInstance().setLocale('en');
>> >
>> > to switch to English.
>> > The strange thing is, that only one menu "Search" changes. Nothing else.
>> >
>> > best regards
>> > Hansjoerg
>> >
>> >
>> > 2010/2/24 Stefan Volbers <[email protected] <mailto:[email protected]
>> >>
>> >
>> > Hi Hansjoerg,
>> >
>> > I must confess I haven't really tried the localization, but one
>> thing
>> > comes to my mind:
>> > Did you add the 'en' locale in your application's config.json before
>> > generating? I believe this is mandatory before you can select
>> another
>> > locale.
>> >
>> > HTH,
>> >
>> > greetings
>> > Stefan
>> >
>> > On 24.02.2010 16:04, Qoodary wrote:
>> > >
>> > > Hi list,
>> > > I have a little menu and just a label for testing.
>> > > All strings are made with tr().
>> > > After that, I did generate.py /translate.
>> > > The po files are created and I have translated the de.po file.
>> > > After refresh the page all is in German language now.
>> > >
>> > > But if I try to change the language to English and add:
>> > >
>> > > qx.locale.Manager.getInstance().setLocale('en');
>> > >
>> > > var Welcomelabel = new qx.ui.basic.Label(this.tr
>> > <http://this.tr>("Welcome to the first
>> > > App"));
>> > > doc.add(Welcomelabel);
>> > >
>> > > nothing happens: All will stay in German.
>> > > Except the second menu "Suchen" will change to "Search" but
>> > nothing else.
>> > >
>> > > I am a little bit confused about that.
>> > > Can anybody help me?
>> > >
>> > > thanks a lot
>> > > best regards
>> > > Hansjoerg
>> > >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Download Intel® Parallel Studio Eval
>> > Try the new software tools for yourself. Speed compiling, find bugs
>> > proactively, and fine-tune applications for parallel performance.
>> > See why Intel Parallel Studio got high marks during beta.
>> > http://p.sf.net/sfu/intel-sw-dev
>> > _______________________________________________
>> > qooxdoo-devel mailing list
>> > [email protected]
>> > <mailto:[email protected]>
>> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>> >
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Download Intel® Parallel Studio Eval
>> > Try the new software tools for yourself. Speed compiling, find bugs
>> > proactively, and fine-tune applications for parallel performance.
>> > See why Intel Parallel Studio got high marks during beta.
>> > http://p.sf.net/sfu/intel-sw-dev
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > qooxdoo-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel