You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by calle sollander <ca...@msn.com> on 2016/02/17 09:06:52 UTC

Change text on wizard buttons.

Hello!

I'm trying to get the buttons in the Wizard component to be in Swedish but I can't get it working.
I have added this to my properties file:

datatable.no-records-found=Din sökning gav ingen träff
org.apache.wicket.extensions.wizard.next=Nästa >
org.apache.wicket.extensions.wizard.previous=< Föregående
org.apache.wicket.extensions.wizard.last=Sista
org.apache.wicket.extensions.wizard.finish=Spara
org.apache.wicket.extensions.wizard.cancel=Avbryt

I use a Wizard with two simple WizardSteps like this:

System.out.println("previous: " +Application.get().getResourceSettings().getLocalizer().getString("org.apache.wicket.extensions.wizard.previous", null, null, null, null, "DEFAULT"));
WizardModel m = new WizardModel();
m.add(new DummyStep());
m.add(new DummyStep2());
Wizard w = new Wizard("wizard", m);
add(w);

The sys.out above prints the Swedish word for previous but the button in the wizard is in English.
If I change the Locale to e.g. French the buttons show French texts, it seems like the wizard is always using the Wizard.properties file and since there
is no Swedish version it defaults to the English one.
The "datatable.no-records-found" property works like it is supposed to in a Datatable on the same page.

Is it not possible to override the button texts in a Wizard?
Should I use some other component for my Wizard?

Regards, Calle


Re: Change text on wizard buttons.

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Just follow the steps at http://wicket.apache.org/start/quickstart.html to
create a mini application that reproduces the problem.
Don't forget to add Svedish version of the resource bundle so we can add it
for the next release!
Thank you!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Feb 18, 2016 at 9:48 AM, calle sollander <ca...@msn.com>
wrote:

> Thank you Martin.
> I'll create a ticket, I have never done this before but will read the
> instructions and give it a go next week.
>
> I gave up on the Wizard component and have now built my own little purpose
> built workflow instead.
>
> Regards, Calle
>
> ________________________________________
> From: Martin Grigorov <mg...@apache.org>
> Sent: Thursday, February 18, 2016 7:44 AM
> To: users@wicket.apache.org
> Subject: Re: Change text on wizard buttons.
>
> Hi,
>
> Please create a ticket with a quickstart application.
> I this you are correct - because of the existence of Wizard.properties
> Wicket doesn't consult with MyApplication_sv.properties.
> A workaround would be to introduce org.apache.wicket.extensions.wizard
> package in your application and put there Wizard_sv.properties.xml
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Feb 17, 2016 at 9:06 AM, calle sollander <ca...@msn.com>
> wrote:
>
> > Hello!
> >
> > I'm trying to get the buttons in the Wizard component to be in Swedish
> but
> > I can't get it working.
> > I have added this to my properties file:
> >
> > datatable.no-records-found=Din sökning gav ingen träff
> > org.apache.wicket.extensions.wizard.next=Nästa >
> > org.apache.wicket.extensions.wizard.previous=< Föregående
> > org.apache.wicket.extensions.wizard.last=Sista
> > org.apache.wicket.extensions.wizard.finish=Spara
> > org.apache.wicket.extensions.wizard.cancel=Avbryt
> >
> > I use a Wizard with two simple WizardSteps like this:
> >
> > System.out.println("previous: "
> >
> +Application.get().getResourceSettings().getLocalizer().getString("org.apache.wicket.extensions.wizard.previous",
> > null, null, null, null, "DEFAULT"));
> > WizardModel m = new WizardModel();
> > m.add(new DummyStep());
> > m.add(new DummyStep2());
> > Wizard w = new Wizard("wizard", m);
> > add(w);
> >
> > The sys.out above prints the Swedish word for previous but the button in
> > the wizard is in English.
> > If I change the Locale to e.g. French the buttons show French texts, it
> > seems like the wizard is always using the Wizard.properties file and
> since
> > there
> > is no Swedish version it defaults to the English one.
> > The "datatable.no-records-found" property works like it is supposed to in
> > a Datatable on the same page.
> >
> > Is it not possible to override the button texts in a Wizard?
> > Should I use some other component for my Wizard?
> >
> > Regards, Calle
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Change text on wizard buttons.

Posted by calle sollander <ca...@msn.com>.
Thank you Martin.
I'll create a ticket, I have never done this before but will read the instructions and give it a go next week.

I gave up on the Wizard component and have now built my own little purpose built workflow instead.

Regards, Calle

________________________________________
From: Martin Grigorov <mg...@apache.org>
Sent: Thursday, February 18, 2016 7:44 AM
To: users@wicket.apache.org
Subject: Re: Change text on wizard buttons.

Hi,

Please create a ticket with a quickstart application.
I this you are correct - because of the existence of Wizard.properties
Wicket doesn't consult with MyApplication_sv.properties.
A workaround would be to introduce org.apache.wicket.extensions.wizard
package in your application and put there Wizard_sv.properties.xml

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Feb 17, 2016 at 9:06 AM, calle sollander <ca...@msn.com>
wrote:

> Hello!
>
> I'm trying to get the buttons in the Wizard component to be in Swedish but
> I can't get it working.
> I have added this to my properties file:
>
> datatable.no-records-found=Din sökning gav ingen träff
> org.apache.wicket.extensions.wizard.next=Nästa >
> org.apache.wicket.extensions.wizard.previous=< Föregående
> org.apache.wicket.extensions.wizard.last=Sista
> org.apache.wicket.extensions.wizard.finish=Spara
> org.apache.wicket.extensions.wizard.cancel=Avbryt
>
> I use a Wizard with two simple WizardSteps like this:
>
> System.out.println("previous: "
> +Application.get().getResourceSettings().getLocalizer().getString("org.apache.wicket.extensions.wizard.previous",
> null, null, null, null, "DEFAULT"));
> WizardModel m = new WizardModel();
> m.add(new DummyStep());
> m.add(new DummyStep2());
> Wizard w = new Wizard("wizard", m);
> add(w);
>
> The sys.out above prints the Swedish word for previous but the button in
> the wizard is in English.
> If I change the Locale to e.g. French the buttons show French texts, it
> seems like the wizard is always using the Wizard.properties file and since
> there
> is no Swedish version it defaults to the English one.
> The "datatable.no-records-found" property works like it is supposed to in
> a Datatable on the same page.
>
> Is it not possible to override the button texts in a Wizard?
> Should I use some other component for my Wizard?
>
> Regards, Calle
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Change text on wizard buttons.

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please create a ticket with a quickstart application.
I this you are correct - because of the existence of Wizard.properties
Wicket doesn't consult with MyApplication_sv.properties.
A workaround would be to introduce org.apache.wicket.extensions.wizard
package in your application and put there Wizard_sv.properties.xml

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Feb 17, 2016 at 9:06 AM, calle sollander <ca...@msn.com>
wrote:

> Hello!
>
> I'm trying to get the buttons in the Wizard component to be in Swedish but
> I can't get it working.
> I have added this to my properties file:
>
> datatable.no-records-found=Din sökning gav ingen träff
> org.apache.wicket.extensions.wizard.next=Nästa >
> org.apache.wicket.extensions.wizard.previous=< Föregående
> org.apache.wicket.extensions.wizard.last=Sista
> org.apache.wicket.extensions.wizard.finish=Spara
> org.apache.wicket.extensions.wizard.cancel=Avbryt
>
> I use a Wizard with two simple WizardSteps like this:
>
> System.out.println("previous: "
> +Application.get().getResourceSettings().getLocalizer().getString("org.apache.wicket.extensions.wizard.previous",
> null, null, null, null, "DEFAULT"));
> WizardModel m = new WizardModel();
> m.add(new DummyStep());
> m.add(new DummyStep2());
> Wizard w = new Wizard("wizard", m);
> add(w);
>
> The sys.out above prints the Swedish word for previous but the button in
> the wizard is in English.
> If I change the Locale to e.g. French the buttons show French texts, it
> seems like the wizard is always using the Wizard.properties file and since
> there
> is no Swedish version it defaults to the English one.
> The "datatable.no-records-found" property works like it is supposed to in
> a Datatable on the same page.
>
> Is it not possible to override the button texts in a Wizard?
> Should I use some other component for my Wizard?
>
> Regards, Calle
>
>