[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3753) SeamResourceBundle.getBundle(String baseName) fails to return correct message based on Locale
Norman Richards (JIRA)
jira-events at lists.jboss.org
Wed Jan 14 13:34:04 EST 2009
[ https://jira.jboss.org/jira/browse/JBSEAM-3753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12447838#action_12447838 ]
Norman Richards commented on JBSEAM-3753:
-----------------------------------------
There's not a lot we can do. That is a static final method on ResourceBundle, so Seam can't override it. I can add a differently named function to do what you are doing, or you can just call the method the way you are, passing in the desired locale.
> SeamResourceBundle.getBundle(String baseName) fails to return correct message based on Locale
> ---------------------------------------------------------------------------------------------
>
> Key: JBSEAM-3753
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3753
> Project: Seam
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.2.SP1, 2.0.3.CR1, 2.1.1.CR1
> Reporter: Samuel Mendenhall
> Assignee: Norman Richards
> Fix For: 2.1.2.CR1
>
>
> When specifying the Locale directly, everything works as expected, when not, the default locale is used, which is incorrect. Ex.
> log.info("SeamResourceBundle.getBundle w/o passing Local: " + SeamResourceBundle.getBundle("ECISConfig").getString("ecis.hello"));
> log.info("SeamResourceBundle.getBundle w passing Local: " + SeamResourceBundle.getBundle("ECISConfig", LocaleSelector.instance().getLocale()).getString("ecis.hello"));
> Produces:
> 15:08:45,438 INFO [TestAction] SeamResourceBundle.getBundle w/o passing Local: Hello from ECISConfig_en.properties
> 15:08:45,439 INFO [TestAction] SeamResourceBundle.getBundle w passing Local: Hello from ECISConfig_en_US_tmwa.properties
> When both should be saying "Hello from ECISConfig_en_US_tmwa.properties" because the locale and resource bundle are defined in components.xml as:
> <international:locale-selector locale-string="en_US_tmwa" />
> <core:resource-loader>
> <core:bundle-names>
> <value>messages</value>
> <value>ECISConfig</value>
> </core:bundle-names>
> </core:resource-loader>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list