You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Igor Vaynberg <ig...@gmail.com> on 2008/10/30 07:00:51 UTC

improved resource bundles in 1.4

i just committed a patch for WICKET-1103 which greatly improves i18n in wicket.

first: you can have validators provide their own bundles. eg
MyValidator.properties that is next to MyValidator.java. These keys
are searched last - after the application.properties - which will
allow you to override validator bundle values if needed.

second: there is now support for package-level properties, which live
in a bundle called package.properties. this means that you can have
each logical application module have its own global bundle rather then
having to stick everything into application.properties.

this is a first pass so i am looking forward to any problems you guys
find. enjoy.

-igor

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


Re: improved resource bundles in 1.4

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Awesome!  Thanks!!

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Thu, Oct 30, 2008 at 1:00 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> i just committed a patch for WICKET-1103 which greatly improves i18n in
> wicket.
>
> first: you can have validators provide their own bundles. eg
> MyValidator.properties that is next to MyValidator.java. These keys
> are searched last - after the application.properties - which will
> allow you to override validator bundle values if needed.
>
> second: there is now support for package-level properties, which live
> in a bundle called package.properties. this means that you can have
> each logical application module have its own global bundle rather then
> having to stick everything into application.properties.
>
> this is a first pass so i am looking forward to any problems you guys
> find. enjoy.
>
> -igor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: improved resource bundles in 1.4

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yeah, really cool:)

Igor Vaynberg wrote:
> i just committed a patch for WICKET-1103 which greatly improves i18n in wicket.
>
> first: you can have validators provide their own bundles. eg
> MyValidator.properties that is next to MyValidator.java. These keys
> are searched last - after the application.properties - which will
> allow you to override validator bundle values if needed.
>
> second: there is now support for package-level properties, which live
> in a bundle called package.properties. this means that you can have
> each logical application module have its own global bundle rather then
> having to stick everything into application.properties.
>
> this is a first pass so i am looking forward to any problems you guys
> find. enjoy.
>
> -igor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: improved resource bundles in 1.4

Posted by Igor Vaynberg <ig...@gmail.com>.
no. i18n resources depend on the component hierarchy which is not
known in a constructor of a component.

-igor

On Mon, Jun 29, 2009 at 12:40 PM, OjO<fa...@washington.edu> wrote:
>
> I wonder if it is possible to simply make "getString" work for retrieving
> localized string in constructor in the next patch. The code would be much
> cleaner without the "new ResourceModel" or "getLocalizer().getString...".
>
>
> igor.vaynberg wrote:
>>
>> i just committed a patch for WICKET-1103 which greatly improves i18n in
>> wicket.
>>
>> first: you can have validators provide their own bundles. eg
>> MyValidator.properties that is next to MyValidator.java. These keys
>> are searched last - after the application.properties - which will
>> allow you to override validator bundle values if needed.
>>
>> second: there is now support for package-level properties, which live
>> in a bundle called package.properties. this means that you can have
>> each logical application module have its own global bundle rather then
>> having to stick everything into application.properties.
>>
>> this is a first pass so i am looking forward to any problems you guys
>> find. enjoy.
>>
>> -igor
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/improved-resource-bundles-in-1.4-tp20241339p24259941.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: improved resource bundles in 1.4

Posted by OjO <fa...@washington.edu>.
I wonder if it is possible to simply make "getString" work for retrieving
localized string in constructor in the next patch. The code would be much
cleaner without the "new ResourceModel" or "getLocalizer().getString...".


igor.vaynberg wrote:
> 
> i just committed a patch for WICKET-1103 which greatly improves i18n in
> wicket.
> 
> first: you can have validators provide their own bundles. eg
> MyValidator.properties that is next to MyValidator.java. These keys
> are searched last - after the application.properties - which will
> allow you to override validator bundle values if needed.
> 
> second: there is now support for package-level properties, which live
> in a bundle called package.properties. this means that you can have
> each logical application module have its own global bundle rather then
> having to stick everything into application.properties.
> 
> this is a first pass so i am looking forward to any problems you guys
> find. enjoy.
> 
> -igor
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/improved-resource-bundles-in-1.4-tp20241339p24259941.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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


RE: improved resource bundles in 1.4

Posted by Kai Mütz <km...@googlemail.com>.
Igor Vaynberg <ma...@gmail.com> wrote:
> On Thu, Oct 30, 2008 at 5:13 AM, Kai Mütz <km...@googlemail.com>
> wrote:
>> package-level properties sounds good. This is what I am looking for
>> currently. Is there a plan to port PackageStringResourceLoader to
>> 1.3.x branch?
>
> no plan so far. this is a new feature and we dont generally roll new
> features into a maintenance release.
>
>> If not, what is the best way to provide properties for multiple
>> Pages/WebResources in 1.3.x if I do not want to put them into
>> application.properties?
>
> there is no way to do that in core. you can take my mods from above
> commit and build a new istringresourceloader and add it to your
> application.

Ok, I have added a PackageStringResourceLoader to my application and it
works for WebPages. Thanks.

Now I want to use those resources within a DynamicWebResource via Localizer
which seems to be impossible because Localizer.getString() requires a
component. Is there another way to implement internationalized webresource?

Regards, Kai


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


Re: improved resource bundles in 1.4

Posted by Igor Vaynberg <ig...@gmail.com>.
On Thu, Oct 30, 2008 at 5:13 AM, Kai Mütz <km...@googlemail.com> wrote:
> package-level properties sounds good. This is what I am looking for
> currently. Is there a plan to port PackageStringResourceLoader to 1.3.x
> branch?

no plan so far. this is a new feature and we dont generally roll new
features into a maintenance release.

> If not, what is the best way to provide properties for multiple
> Pages/WebResources in 1.3.x if I do not want to put them into
> application.properties?

there is no way to do that in core. you can take my mods from above
commit and build a new istringresourceloader and add it to your
application.

-igor


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

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


RE: improved resource bundles in 1.4

Posted by Kai Mütz <km...@googlemail.com>.
Igor Vaynberg <ma...@gmail.com> wrote:
> i just committed a patch for WICKET-1103 which greatly improves i18n
> in wicket.
>
> first: you can have validators provide their own bundles. eg
> MyValidator.properties that is next to MyValidator.java. These keys
> are searched last - after the application.properties - which will
> allow you to override validator bundle values if needed.
>
> second: there is now support for package-level properties, which live
> in a bundle called package.properties. this means that you can have
> each logical application module have its own global bundle rather then
> having to stick everything into application.properties.

package-level properties sounds good. This is what I am looking for
currently. Is there a plan to port PackageStringResourceLoader to 1.3.x
branch?

If not, what is the best way to provide properties for multiple
Pages/WebResources in 1.3.x if I do not want to put them into
application.properties?

Cheers, Kai


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