Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-3167

Services with .i18n.js (think about)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0M5
    • 3.3, 4.0 alpha
    • None
    • None

      When a service use a js with i18n keys, it loads a .i18n.js file
      but the language of this file may not be the same as the one of the page (crawling french site with an english browser)

      Moreover this file is not cachable

      We should add the language in the url, so services could load the right language and files could be cachable

      e.g. /plugins/foo/resources/js/myi18nizejfile.i18n-fr.js
      as this file is not existing it would look out for the /plugins/foo/resources/js/myi18nizejfile.i18n.js file configured in locale fr

      This can be done in the runtime directly. (except for the cachable part, that then could be done in the Site directly without looking the cachable header

      Moreover the ametys:pluginResourceURL helper could find .i18n.js, to add the language automaticall

          [CMS-3167] Services with .i18n.js (think about)

          Such files are only present in:

          • the calendar plugin (already served by a specific language-dependant pipeline)
          • the survey plugin
          • the odf-web plugin

          For the 3.x fix, we could just serve those files with a plugin-specific pipeline to avoid breaking compatibility. For the 4.x fix, a standard language-dependent pipeline should be introduced.

          Nicolas Gavalda (Inactive) added a comment - Such files are only present in: the calendar plugin (already served by a specific language-dependant pipeline) the survey plugin the odf-web plugin For the 3.x fix, we could just serve those files with a plugin-specific pipeline to avoid breaking compatibility. For the 4.x fix, a standard language-dependent pipeline should be introduced.

            quentin Quentin Glinel-Mortreuil (Inactive)
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: