| 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. |