You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2015/06/18 10:17:00 UTC

[jira] [Updated] (SLING-4814) i18n translations not working unless server is restarted

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

Konrad Windszus updated SLING-4814:
-----------------------------------
    Attachment: SLING-4814-v01.patch

> i18n translations not working unless server is restarted
> --------------------------------------------------------
>
>                 Key: SLING-4814
>                 URL: https://issues.apache.org/jira/browse/SLING-4814
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: i18n 2.4.2
>            Reporter: Nitin Goyal
>         Attachments: SLING-4814-v01.patch
>
>
> We have deployed an AEM package where the i18n translations are defined in the standard way under /apps/myapp/i18n as sling:key/sling:value pairs.
> After installing the package on AEM 6.1 we found that none of the strings (not even the English ones) get translated properly. Once we restart the AEM server all translations works fine.
> It works fine in AEM 6.0 without requiring any server restart.
> I tried to capture the logs after setting the org.apache.sling.i18n to DEBUG level.
> When I install the app bundle I see the following entry in the log file:
> 17.06.2015 11:54:14.438 INFO [0:0:0:0:0:0:0:1 [1434522253131] GET /libs/granite/core/content/login.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider Currently loaded dictionaries across all locales: [/libs/foundation/components/mobilefooter/i18n/en, /libs/cq/searchpromote/components/pagination/i18n/en, /libs/foundation/components/search/i18n/en, /libs/commerce/components/search/i18n/en]
> It does not list the dictionary of my app bundle. There is no other log related to loading dictionaries.
> However when I restart the server after installing my package I see the entry in the log file related to loading the dictionaries corresponding to my application bundle /apps/connect/i18n/en/strings. Pasting the log entries below:
> 17.06.2015 11:14:38.232 INFO [0:0:0:0:0:0:0:1 [1434519877679] GET /libs/granite/core/content/login.html HTTP/1.1] org.apache.sling.i18n Service [3279, [java.util.ResourceBundle]] ServiceEvent REGISTERED
> 17.06.2015 11:14:38.234 DEBUG [0:0:0:0:0:0:0:1 [1434519877679] GET /libs/granite/core/content/login.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider registerResourceBundle(Key(null, en), ...): added service registration and language roots [/libs/foundation/components/mobilefooter/i18n/en, /libs/cq/searchpromote/components/pagination/i18n/en, /libs/foundation/components/search/i18n/en, /libs/commerce/components/search/i18n/en, /apps/connect/i18n/en/strings]
> 17.06.2015 11:14:38.234 INFO [0:0:0:0:0:0:0:1 [1434519877679] GET /libs/granite/core/content/login.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider Currently loaded dictionaries across all locales: [/libs/foundation/components/mobilefooter/i18n/en, /libs/cq/searchpromote/components/pagination/i18n/en, /apps/connect/i18n/en/strings, /libs/foundation/components/search/i18n/en, /libs/commerce/components/search/i18n/en]
> 17.06.2015 11:14:38.267 DEBUG [0:0:0:0:0:0:0:1 [1434519877679] GET /libs/granite/core/content/login.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider getResourceBundleInternal(Key(null, en)): got cache hit on first try



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