You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2023/05/06 10:26:00 UTC

[jira] [Resolved] (SLING-3407) ResourceBundleManager API

     [ https://issues.apache.org/jira/browse/SLING-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-3407.
-------------------------------------
    Resolution: Won't Fix

> ResourceBundleManager API
> -------------------------
>
>                 Key: SLING-3407
>                 URL: https://issues.apache.org/jira/browse/SLING-3407
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Alexander Klimetschek
>            Priority: Major
>              Labels: i18n
>         Attachments: SLING-3407.patch
>
>
> Currently there is the ResourceBundleProvider service interface, which really is an SPI, now that you can have multiple of them. The right way of accessing them is to get all service references, sort by service ranking (highest first) and then take the result from the first one that doesn't give you a null result (null resource bundle from getResourceBundle()). This is done in the I18nFilter and is quite a bit of boilerplate that client code should not have to worry about.
> Thus there should be a new API, something like a ResourceBundleManager with the 2 methods for getResourceBundle() (with basename and without).
> [1] http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)