[jira] [Updated] (SLING-4547) JcrResourceBundle does not support multiple base names

2017-03-29 Thread Konrad Windszus (JIRA)

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

Konrad Windszus updated SLING-4547:
---
Fix Version/s: i18n 2.5.10

> JcrResourceBundle does not support multiple base names
> --
>
> Key: SLING-4547
> URL: https://issues.apache.org/jira/browse/SLING-4547
> Project: Sling
>  Issue Type: Bug
>  Components: i18n
>Affects Versions: i18n 2.5.8
>Reporter: Andrei Pilets
>Assignee: Konrad Windszus
> Fix For: i18n 2.5.10
>
>
> The sling:basename property may be multi-valued, that is the messages of a 
> mix:language nodes may belong to multiple base names and thus ResourceBundle 
> instances, as stated at 
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
>  
> The latest codebase does not work in that way.
> JcrResourceBundle#loadPotentialLanguageRoots():
> if (baseName == null || baseName.equals(properties.get(PROP_BASENAME, ""))) {
>  paths.add(bundle.getPath());
> }
> In case if property sling:basename have multiple values, only the first base 
> name is considered, others are skipped.
> The correct implementation would be to use properties.get(PROP_BASENAME) - 
> method version without default value parameter, which would return array. You 
> would need to iterate over its items and check equality.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-4547) JcrResourceBundle does not support multiple base names

2017-03-29 Thread Konrad Windszus (JIRA)

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

Konrad Windszus updated SLING-4547:
---
Affects Version/s: i18n 2.5.8

> JcrResourceBundle does not support multiple base names
> --
>
> Key: SLING-4547
> URL: https://issues.apache.org/jira/browse/SLING-4547
> Project: Sling
>  Issue Type: Bug
>  Components: i18n
>Affects Versions: i18n 2.5.8
>Reporter: Andrei Pilets
>Assignee: Konrad Windszus
> Fix For: i18n 2.5.10
>
>
> The sling:basename property may be multi-valued, that is the messages of a 
> mix:language nodes may belong to multiple base names and thus ResourceBundle 
> instances, as stated at 
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
>  
> The latest codebase does not work in that way.
> JcrResourceBundle#loadPotentialLanguageRoots():
> if (baseName == null || baseName.equals(properties.get(PROP_BASENAME, ""))) {
>  paths.add(bundle.getPath());
> }
> In case if property sling:basename have multiple values, only the first base 
> name is considered, others are skipped.
> The correct implementation would be to use properties.get(PROP_BASENAME) - 
> method version without default value parameter, which would return array. You 
> would need to iterate over its items and check equality.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (SLING-4547) JcrResourceBundle does not support multiple base names

2016-10-12 Thread Carsten Ziegeler (JIRA)

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

Carsten Ziegeler updated SLING-4547:

Component/s: (was: Oak)
 (was: Documentation)
 (was: JCR)
 (was: API)
 i18n

> JcrResourceBundle does not support multiple base names
> --
>
> Key: SLING-4547
> URL: https://issues.apache.org/jira/browse/SLING-4547
> Project: Sling
>  Issue Type: Bug
>  Components: i18n
>Reporter: Andrei Pilets
>
> The sling:basename property may be multi-valued, that is the messages of a 
> mix:language nodes may belong to multiple base names and thus ResourceBundle 
> instances, as stated at 
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
>  
> The latest codebase does not work in that way.
> JcrResourceBundle#loadPotentialLanguageRoots():
> if (baseName == null || baseName.equals(properties.get(PROP_BASENAME, ""))) {
>  paths.add(bundle.getPath());
> }
> In case if property sling:basename have multiple values, only the first base 
> name is considered, others are skipped.
> The correct implementation would be to use properties.get(PROP_BASENAME) - 
> method version without default value parameter, which would return array. You 
> would need to iterate over its items and check equality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-4547) JcrResourceBundle does not support multiple base names

2015-03-27 Thread Andrei Pilets (JIRA)

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

Andrei Pilets updated SLING-4547:
-
Description: 
The sling:basename property may be multi-valued, that is the messages of a 
mix:language nodes may belong to multiple base names and thus ResourceBundle 
instances, as stated at 
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
 
The latest codebase does not work in that way.

JcrResourceBundle#loadPotentialLanguageRoots():
if (baseName == null || baseName.equals(properties.get(PROP_BASENAME, ""))) {
 paths.add(bundle.getPath());
}

In case if property sling:basename have multiple values, only the first base 
name is considered, others are skipped.

The correct implementation would be to use properties.get(PROP_BASENAME) - 
method version without default value parameter, which would return array. You 
would need to iterate over its items and check equality.

  was:
The sling:basename property may be multi-valued, that is the messages of a 
mix:language nodes may belong to multiple base names and thus ResourceBundle 
instances, as stated at 
https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
 
The latest codebase does not work in that way. 
JcrResourceBundle#loadPotentialLanguageRoots():
if (baseName == null || 
baseName.equals(properties.get(PROP_BASENAME, ""))) {
paths.add(bundle.getPath());
}
In case if property sling:basename have multiple values, only the first base 
name is considered, others are skipped.
The correct behavior would be to use properties.get(PROP_BASENAME) - method 
version without default value parameter, which would return array and iterate 
over it.


> JcrResourceBundle does not support multiple base names
> --
>
> Key: SLING-4547
> URL: https://issues.apache.org/jira/browse/SLING-4547
> Project: Sling
>  Issue Type: Bug
>  Components: API, Documentation, JCR, Oak
>Reporter: Andrei Pilets
>
> The sling:basename property may be multi-valued, that is the messages of a 
> mix:language nodes may belong to multiple base names and thus ResourceBundle 
> instances, as stated at 
> https://sling.apache.org/documentation/bundles/internationalization-support-i18n.html.
>  
> The latest codebase does not work in that way.
> JcrResourceBundle#loadPotentialLanguageRoots():
> if (baseName == null || baseName.equals(properties.get(PROP_BASENAME, ""))) {
>  paths.add(bundle.getPath());
> }
> In case if property sling:basename have multiple values, only the first base 
> name is considered, others are skipped.
> The correct implementation would be to use properties.get(PROP_BASENAME) - 
> method version without default value parameter, which would return array. You 
> would need to iterate over its items and check equality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)