[
https://issues.apache.org/jira/browse/SLING-7421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335677#comment-16335677
]
Konrad Windszus edited comment on SLING-7421 at 1/23/18 12:06 PM:
------------------------------------------------------------------
I think the base name handling should be rethought a bit.
Currently it is not possible to explicitly select a dictionary not having a
base name (compare with
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html#resourcebundle-with-base-names).
But the IT in
https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/blob/master/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java#L341
is relying on that. It expects that with a given basename of {{null}} the i18n
bundle always returns the value of the dictionary in
https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/blob/91e9397133eea906372aae2ea1f4a1e2e46f4c70/src/main/resources/SLING-INF/apps/sightly/locales/de.json#L25
(i.e. the one from the dictionary without the basename). But theoretically the
i18n bundle might also return the value from the dictionary with another
basename according to the semantics defined in
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html#resourcebundle-with-base-names.
I will try to come up with an IT covering the actual fault here but I still
think that the Sightly IT needs to be revised or we need to rethink the
basename handling more globally. [~radu.cotescu] Please give your input.
was (Author: kwin):
I think the base name handling should be rethought a bit.
Currently it is not possible to explicitly select a dictionary not having a
base name (compare with
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html#resourcebundle-with-base-names).
But the IT in
https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/blob/master/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java#L341
is relying on that. It expects a basename of {{null}} to always return the
value of the dictionary in
https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/blob/91e9397133eea906372aae2ea1f4a1e2e46f4c70/src/main/resources/SLING-INF/apps/sightly/locales/de.json#L25
(i.e. the one from the dictionary without the basename). But theoretically the
i18n bundle might also return the value from the dictionary with the basename
according to the semantics defined in
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html#resourcebundle-with-base-names.
I will try to come up with an IT covering the actual fault here but I still
think that the Sightly IT needs to be revised or we need to rethink the
basename handling more globally. [~radu.cotescu] Please give your input.
> JcrResourceBundle does not correctly support multiple base names
> ----------------------------------------------------------------
>
> Key: SLING-7421
> URL: https://issues.apache.org/jira/browse/SLING-7421
> Project: Sling
> Issue Type: Bug
> Components: i18n
> Reporter: Robert Munteanu
> Assignee: Robert Munteanu
> Priority: Major
> Fix For: i18n 2.5.12
>
>
> The fix for SLING-4547 is incompete - the {{baseNames}} property is read but
> not used.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)