You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/04/05 00:06:27 UTC

[jira] Created: (SLING-363) Add support for ResourceBundle base names

Add support for ResourceBundle base names
-----------------------------------------

                 Key: SLING-363
                 URL: https://issues.apache.org/jira/browse/SLING-363
             Project: Sling
          Issue Type: New Feature
          Components: Core
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: 2.0.0


>From http://markmail.org/message/6ikv4wfabqtnmajk:

1) Base Names

The concept for ResourceBundle base names is derived from the ResourceBundle.getBundle(String baseName) factory method, which returns a ResourceBundle for the given base name. While the ResourceBundle.getBundle factory method looks for ResourceBundle implementations (e.g. ListResourceBundle class or a properties file for the PropertyResourceBundle class), the Sling implementation of a new

        ResourceBundle ResourceBundleProvider.getResourceBundle(String baseName, Locale locale)

method uses an extended query to find the matching resources.

The basic query is to find the resources below nodes which have a node type of mix:language and a property jcr:language whose value is the string representation of the Locale. The extended query would also consider a new property sling:basename: A lanugage node is considered if the jcr:language property matches the Locale and the sling:basename property matches the baseName.

The sling:basename property is defined in a new mixin node type

          [sling:Language] > mix:language
              mixin
            - sling:basename (string)
            - sling:basename (string) multiple

That is the sling:basename may be a single-valued or multi-valued property. Thus a language node may apply to multiple basenames.

The base name generally is an application identifier.

In addition the SlingHttpServletRequest interface should be extended with:

    ResourceBundle getResourceBundle(String baseName, Locale locale)

which allows requests to easily get "base-named" resource bundles. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-363) Add support for ResourceBundle base names

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

Felix Meschberger closed SLING-363.
-----------------------------------

    Resolution: Fixed

Updated the documentation on the site. Thus closing this issue.

> Add support for ResourceBundle base names
> -----------------------------------------
>
>                 Key: SLING-363
>                 URL: https://issues.apache.org/jira/browse/SLING-363
>             Project: Sling
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> From http://markmail.org/message/6ikv4wfabqtnmajk:
> 1) Base Names
> The concept for ResourceBundle base names is derived from the ResourceBundle.getBundle(String baseName) factory method, which returns a ResourceBundle for the given base name. While the ResourceBundle.getBundle factory method looks for ResourceBundle implementations (e.g. ListResourceBundle class or a properties file for the PropertyResourceBundle class), the Sling implementation of a new
>         ResourceBundle ResourceBundleProvider.getResourceBundle(String baseName, Locale locale)
> method uses an extended query to find the matching resources.
> The basic query is to find the resources below nodes which have a node type of mix:language and a property jcr:language whose value is the string representation of the Locale. The extended query would also consider a new property sling:basename: A lanugage node is considered if the jcr:language property matches the Locale and the sling:basename property matches the baseName.
> The sling:basename property is defined in a new mixin node type
>           [sling:Language] > mix:language
>               mixin
>             - sling:basename (string)
>             - sling:basename (string) multiple
> That is the sling:basename may be a single-valued or multi-valued property. Thus a language node may apply to multiple basenames.
> The base name generally is an application identifier.
> In addition the SlingHttpServletRequest interface should be extended with:
>     ResourceBundle getResourceBundle(String baseName, Locale locale)
> which allows requests to easily get "base-named" resource bundles. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-363) Add support for ResourceBundle base names

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585815#action_12585815 ] 

Felix Meschberger commented on SLING-363:
-----------------------------------------

Committed the extensions. See "Subversion Commits" for details.

Not closing this issue yet because the doc page [1] needs update.

[1] http://incubator.apache.org/sling/site/internationalization-support.html

> Add support for ResourceBundle base names
> -----------------------------------------
>
>                 Key: SLING-363
>                 URL: https://issues.apache.org/jira/browse/SLING-363
>             Project: Sling
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> From http://markmail.org/message/6ikv4wfabqtnmajk:
> 1) Base Names
> The concept for ResourceBundle base names is derived from the ResourceBundle.getBundle(String baseName) factory method, which returns a ResourceBundle for the given base name. While the ResourceBundle.getBundle factory method looks for ResourceBundle implementations (e.g. ListResourceBundle class or a properties file for the PropertyResourceBundle class), the Sling implementation of a new
>         ResourceBundle ResourceBundleProvider.getResourceBundle(String baseName, Locale locale)
> method uses an extended query to find the matching resources.
> The basic query is to find the resources below nodes which have a node type of mix:language and a property jcr:language whose value is the string representation of the Locale. The extended query would also consider a new property sling:basename: A lanugage node is considered if the jcr:language property matches the Locale and the sling:basename property matches the baseName.
> The sling:basename property is defined in a new mixin node type
>           [sling:Language] > mix:language
>               mixin
>             - sling:basename (string)
>             - sling:basename (string) multiple
> That is the sling:basename may be a single-valued or multi-valued property. Thus a language node may apply to multiple basenames.
> The base name generally is an application identifier.
> In addition the SlingHttpServletRequest interface should be extended with:
>     ResourceBundle getResourceBundle(String baseName, Locale locale)
> which allows requests to easily get "base-named" resource bundles. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.