You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Thomas Herzog (JIRA)" <ji...@apache.org> on 2012/07/07 21:52:33 UTC

[jira] [Created] (DELTASPIKE-230) Fallback stragtegy for resource bundles and locales

Thomas Herzog created DELTASPIKE-230:
----------------------------------------

             Summary: Fallback stragtegy for resource bundles and locales
                 Key: DELTASPIKE-230
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-230
             Project: DeltaSpike
          Issue Type: New Feature
          Components: I18n-Module
    Affects Versions: 0.2-incubating
            Reporter: Thomas Herzog


Maybe it would be nice to have an fallback strategy for the resolving of the resource bundles for given locale.
For those usecases where the locale cannot be modified to an supported locale an fallback strategy would be fine.

If resources bundle with message_LANGUAGE.properties is present but Locale would be LANGUAGE_COUNTRY or LANGUAGE_COUNTRY_VARIANT it would result in an Exception because resource bundles for these kinds of Locales wouldn't be defined.
It would be sensless to define resource bundles for all kind of possible locales such as de_DE, de_AT, de_CH, maybe just in some special cases. Cal10N didn't provided this feature, but i think if would be fine if deltaspike could. For sure this behavior should be enable and disable able via @MessageContextConfig.

Another question: 
Does message module support merging of resource bundles such as cal10n does?
Means resouce bundles with _de.properties, _de_DE.properties are handled as a single one in cal10n and if key is not present in de_DE.properties but Locale is de_DE it takes the one defined in _de.properties.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DELTASPIKE-230) Fallback stragtegy for resource bundles and locales

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned DELTASPIKE-230:
----------------------------------------

    Assignee: Mark Struberg
    
> Fallback stragtegy for resource bundles and locales
> ---------------------------------------------------
>
>                 Key: DELTASPIKE-230
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-230
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: I18n-Module
>    Affects Versions: 0.2-incubating
>            Reporter: Thomas Herzog
>            Assignee: Mark Struberg
>
> Maybe it would be nice to have an fallback strategy for the resolving of the resource bundles for given locale.
> For those usecases where the locale cannot be modified to an supported locale an fallback strategy would be fine.
> If resources bundle with message_LANGUAGE.properties is present but Locale would be LANGUAGE_COUNTRY or LANGUAGE_COUNTRY_VARIANT it would result in an Exception because resource bundles for these kinds of Locales wouldn't be defined.
> It would be sensless to define resource bundles for all kind of possible locales such as de_DE, de_AT, de_CH, maybe just in some special cases. Cal10N didn't provided this feature, but i think if would be fine if deltaspike could. For sure this behavior should be enable and disable able via @MessageContextConfig.
> Another question: 
> Does message module support merging of resource bundles such as cal10n does?
> Means resouce bundles with _de.properties, _de_DE.properties are handled as a single one in cal10n and if key is not present in de_DE.properties but Locale is de_DE it takes the one defined in _de.properties.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DELTASPIKE-230) Fallback stragtegy for resource bundles and locales

Posted by "Thomas Herzog (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DELTASPIKE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409245#comment-13409245 ] 

Thomas Herzog commented on DELTASPIKE-230:
------------------------------------------

Thank you, will take a look.
                
> Fallback stragtegy for resource bundles and locales
> ---------------------------------------------------
>
>                 Key: DELTASPIKE-230
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-230
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: I18n-Module
>    Affects Versions: 0.2-incubating
>            Reporter: Thomas Herzog
>            Assignee: Mark Struberg
>             Fix For: 0.3-incubating
>
>
> Maybe it would be nice to have an fallback strategy for the resolving of the resource bundles for given locale.
> For those usecases where the locale cannot be modified to an supported locale an fallback strategy would be fine.
> If resources bundle with message_LANGUAGE.properties is present but Locale would be LANGUAGE_COUNTRY or LANGUAGE_COUNTRY_VARIANT it would result in an Exception because resource bundles for these kinds of Locales wouldn't be defined.
> It would be sensless to define resource bundles for all kind of possible locales such as de_DE, de_AT, de_CH, maybe just in some special cases. Cal10N didn't provided this feature, but i think if would be fine if deltaspike could. For sure this behavior should be enable and disable able via @MessageContextConfig.
> Another question: 
> Does message module support merging of resource bundles such as cal10n does?
> Means resouce bundles with _de.properties, _de_DE.properties are handled as a single one in cal10n and if key is not present in de_DE.properties but Locale is de_DE it takes the one defined in _de.properties.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DELTASPIKE-230) Fallback stragtegy for resource bundles and locales

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DELTASPIKE-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved DELTASPIKE-230.
--------------------------------------

       Resolution: Not A Problem
    Fix Version/s: 0.3-incubating

This can already be done by providing a simple MessageResolver as @Alternative. 

The DefaultMessageResolver relies on java.util.ResourceBundle and the mechanics defined therein.
                
> Fallback stragtegy for resource bundles and locales
> ---------------------------------------------------
>
>                 Key: DELTASPIKE-230
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-230
>             Project: DeltaSpike
>          Issue Type: New Feature
>          Components: I18n-Module
>    Affects Versions: 0.2-incubating
>            Reporter: Thomas Herzog
>            Assignee: Mark Struberg
>             Fix For: 0.3-incubating
>
>
> Maybe it would be nice to have an fallback strategy for the resolving of the resource bundles for given locale.
> For those usecases where the locale cannot be modified to an supported locale an fallback strategy would be fine.
> If resources bundle with message_LANGUAGE.properties is present but Locale would be LANGUAGE_COUNTRY or LANGUAGE_COUNTRY_VARIANT it would result in an Exception because resource bundles for these kinds of Locales wouldn't be defined.
> It would be sensless to define resource bundles for all kind of possible locales such as de_DE, de_AT, de_CH, maybe just in some special cases. Cal10N didn't provided this feature, but i think if would be fine if deltaspike could. For sure this behavior should be enable and disable able via @MessageContextConfig.
> Another question: 
> Does message module support merging of resource bundles such as cal10n does?
> Means resouce bundles with _de.properties, _de_DE.properties are handled as a single one in cal10n and if key is not present in de_DE.properties but Locale is de_DE it takes the one defined in _de.properties.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira