Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4814

i18n translations not working unless server is restarted

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: i18n 2.4.2
    • Fix Version/s: i18n 2.4.4
    • Component/s: Extensions
    • Labels:
      None

      Description

      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

        Attachments

        1. SLING-4814-v01.patch
          4 kB
          Konrad Windszus

          Issue Links

            Activity

              People

              • Assignee:
                kwin Konrad Windszus
                Reporter:
                ngoyal@adobe.com Nitin Goyal
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: