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

Load the translations of xwiki.js with the xwiki-l10n module

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.14
    • None
    • Unknown

    Description

      xwiki.js renders its translations server-side with Velocity, as JavaScript string literals: for instance platform.core.rendering.error.readTechnicalInformation for the rendering errors, edit for the section edit links, and core.create.popup.loading / core.create.ajax.error for the create dialog. The other front-end modules load their translations on the client with the xwiki-l10n RequireJS plugin (e.g. lightbox.js), which keeps the translation keys in one place per module and avoids escaping the translated messages into JavaScript code.

      All the translations of xwiki.js should be loaded with xwiki-l10n, at the same time, so that the file keeps a single way of getting them.

      This was discussed in https://github.com/xwiki/xwiki-platform/pull/4670#discussion_r4402257734.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Lucas C Charpentier Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: