You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/06/08 23:43:45 UTC
[jira] Commented: (TAPESTRY-1997) PersistentLocale is lower-casing
locales
[ https://issues.apache.org/jira/browse/TAPESTRY-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603439#action_12603439 ]
Howard M. Lewis Ship commented on TAPESTRY-1997:
------------------------------------------------
I still can't find anything that lower-cases locale names.
I've changed my app to use support a locale of "en_US" and it seems to work fine.
> PersistentLocale is lower-casing locales
> ----------------------------------------
>
> Key: TAPESTRY-1997
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1997
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0.6
> Reporter: Geoff Callender
> Assignee: Howard M. Lewis Ship
>
> An issue affecting localization: PersistentLocale is converting locales from mixed case to all lower case, which is useless for formatting. For example, if page 1 sets the locale like this:
> @Inject
> private PersistentLocale _persistentLocaleService;
> Locale locale = Locale.UK;
> _persistentLocaleService.set(locale);
> System.out.println("locale is " + locale + " - " + locale.getDisplayName());
>
> then this is what prints:
> locale is en_GB - English (United Kingdom)
> But when I'm in page 2 I get the locale and find it has mutated...
> Locale locale = _persistentLocaleService.get();
> System.out.println("locale is " + locale + " - " + locale.getDisplayName());
> ...this is what prints:
> locale is en_gb - en_gb
> This mutated locale in page 2 is useless for formatting. Code like the following produces default-styling instead of the styling for en_GB:
> _myDateFormat = DateFormat.getDateInstance(DateFormat.LONG, locale);
> System.out.println(_myDateFormat.format(new Date()));
> It seems this has also adversely affected how supported-locales are declared (maybe in previous releases only). See http://thread.gmane.org/gmane.comp.java.tapestry.user/56526/focus=56527
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
Re: [jira] Commented: (TAPESTRY-1997) PersistentLocale is
lower-casing locales
Posted by Andy Blower <an...@proquest.co.uk>.
Howard,
This is definitely still an issue in 5.0.13 - I think I've figured it out,
see what you think. I added a comment explaining all to the JIRA issue.
Andy.
Tapestry - Dev mailing list wrote:
>
>
> [
> https://issues.apache.org/jira/browse/TAPESTRY-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603439#action_12603439
> ]
>
> Howard M. Lewis Ship commented on TAPESTRY-1997:
> ------------------------------------------------
>
> I still can't find anything that lower-cases locale names.
>
> I've changed my app to use support a locale of "en_US" and it seems to
> work fine.
>
>> PersistentLocale is lower-casing locales
>> ----------------------------------------
>>
>> Key: TAPESTRY-1997
>> URL: https://issues.apache.org/jira/browse/TAPESTRY-1997
>> Project: Tapestry
>> Issue Type: Bug
>> Components: tapestry-core
>> Affects Versions: 5.0.6
>> Reporter: Geoff Callender
>> Assignee: Howard M. Lewis Ship
>>
>> An issue affecting localization: PersistentLocale is converting locales
>> from mixed case to all lower case, which is useless for formatting. For
>> example, if page 1 sets the locale like this:
>> @Inject
>> private PersistentLocale _persistentLocaleService;
>> Locale locale = Locale.UK;
>> _persistentLocaleService.set(locale);
>> System.out.println("locale is " + locale + " - " +
>> locale.getDisplayName());
>>
>> then this is what prints:
>> locale is en_GB - English (United Kingdom)
>> But when I'm in page 2 I get the locale and find it has mutated...
>> Locale locale = _persistentLocaleService.get();
>> System.out.println("locale is " + locale + " - " +
>> locale.getDisplayName());
>> ...this is what prints:
>> locale is en_gb - en_gb
>> This mutated locale in page 2 is useless for formatting. Code like the
>> following produces default-styling instead of the styling for en_GB:
>> _myDateFormat = DateFormat.getDateInstance(DateFormat.LONG, locale);
>> System.out.println(_myDateFormat.format(new Date()));
>> It seems this has also adversely affected how supported-locales are
>> declared (maybe in previous releases only). See
>> http://thread.gmane.org/gmane.comp.java.tapestry.user/56526/focus=56527
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/-jira--Created%3A-%28TAPESTRY-1997%29-PersistentLocale-is-lower-casing-locales-tp14478095p18005768.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org