You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sv...@meiers.net on 2008/12/16 09:15:00 UTC

Palette, AbstractOptions and localizer


Hi,

is there a reason why AbstractOptions (Palette) uses id and value for localization of options?

  value = getLocalizer().getString(id + "." + value, this, value);

This requires me to duplicate parts of the keys in my property file. If I'm using a ChoiceRenderer("name", "name") for a hypothetical class B it looks like:
  Bar.A.Bar.A = Aaaa
  Bar.B.Bar.B = Bbbb
  Bar.C.Bar.C = Cccc

Could we align AbstractOptions with how AbstractChoice works, localizing the displayValue only without the id?

  display = getLocalizer().getString(displayValue, this, displayValue);

Thanks

Sven


Re: Palette, AbstractOptions and localizer

Posted by Sven Meier <sv...@meiers.net>.
Done:

https://issues.apache.org/jira/browse/WICKET-1982

Igor Vaynberg schrieb:
> yes, i think we can. i am not really sure why it works the way it does
> right now. please create a jira issue. and, btw, this can only be
> fixed in 1.4.
>
> -igor
>
> On Tue, Dec 16, 2008 at 12:15 AM,  <sv...@meiers.net> wrote:
>   
>> Hi,
>>
>> is there a reason why AbstractOptions (Palette) uses id and value for localization of options?
>>
>>   value = getLocalizer().getString(id + "." + value, this, value);
>>
>> This requires me to duplicate parts of the keys in my property file. If I'm using a ChoiceRenderer("name", "name") for a hypothetical class B it looks like:
>>   Bar.A.Bar.A = Aaaa
>>   Bar.B.Bar.B = Bbbb
>>   Bar.C.Bar.C = Cccc
>>
>> Could we align AbstractOptions with how AbstractChoice works, localizing the displayValue only without the id?
>>
>>   display = getLocalizer().getString(displayValue, this, displayValue);
>>
>> Thanks
>>
>> Sven
>>
>>
>>     
>
> ---------------------------------------------------------------------
> 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: Palette, AbstractOptions and localizer

Posted by Igor Vaynberg <ig...@gmail.com>.
yes, i think we can. i am not really sure why it works the way it does
right now. please create a jira issue. and, btw, this can only be
fixed in 1.4.

-igor

On Tue, Dec 16, 2008 at 12:15 AM,  <sv...@meiers.net> wrote:
>
>
> Hi,
>
> is there a reason why AbstractOptions (Palette) uses id and value for localization of options?
>
>   value = getLocalizer().getString(id + "." + value, this, value);
>
> This requires me to duplicate parts of the keys in my property file. If I'm using a ChoiceRenderer("name", "name") for a hypothetical class B it looks like:
>   Bar.A.Bar.A = Aaaa
>   Bar.B.Bar.B = Bbbb
>   Bar.C.Bar.C = Cccc
>
> Could we align AbstractOptions with how AbstractChoice works, localizing the displayValue only without the id?
>
>   display = getLocalizer().getString(displayValue, this, displayValue);
>
> Thanks
>
> Sven
>
>

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