Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24163

Localization are not loaded from webjars installed as extensions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 17.10.5, 18.3.0-rc-1
    • 6.0-milestone-1
    • Localization
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Reproduction steps

      1. Add an ApplicationResources.properties file in the resource folder of a webjar
      2. Install the webjar extension on an instance
      3. Try to translate a translation key from the webjar

      Expected

      The translation key is found.

      Actual

      The translation key fails to resolve.

      Explanations

      https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-jar/src/main/java/org/xwiki/localization/jar/internal/JARTranslationBundleFactoryListener.java only check for jar and not webjars or any other supported extensions.
      org.xwiki.extension.jar.internal.handler.JarExtensionHandler#isSupported must be used to determine of the resource can be handled as a jar.

      Attachments

        Activity

          People

            mleduc Manuel Leduc
            mleduc Manuel Leduc
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: