You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (JIRA)" <ji...@apache.org> on 2016/02/28 16:34:18 UTC

[jira] [Updated] (SLING-5137) Locale in Sightly I18N RuntimeExtension is not used correctly

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

Radu Cotescu updated SLING-5137:
--------------------------------
    Affects Version/s: Scripting Sightly Engine 1.0.0

> Locale in Sightly I18N RuntimeExtension is not used correctly
> -------------------------------------------------------------
>
>                 Key: SLING-5137
>                 URL: https://issues.apache.org/jira/browse/SLING-5137
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Sightly Engine 1.0.0
>            Reporter: Michael Kreis
>
> When using a locale option with country in an i18n sightly expression (e.g. ${'label.key' @ i18n, locale='de_CH'}) the locale is not created correctly. 
> See following line:
> https://github.com/apache/sling/blob/trunk/bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/engine/extension/I18nRuntimeExtension.java#L84
> new Locale(locale) only sets the language but never a country.
> Should use something like Apache Commons LocaleUtils.toLocale() (https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/LocaleUtils.html#toLocale(java.lang.String))



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