Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-78320

AUI module loader does not append languageId into url-s in developer mode


    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: AMD Module Loader
    • Labels:
    • Fix Priority:


      LanguageFilter.java should translates js files on the fly. It changes the Liferay.Language.get('...') strings with their translated values. It also should take into account bundles.

      When we use aui:script tag with use, for example
      <aui:script use="liferay-export-import-export-import">

      The AUI/YUI loader should add the languageId parameter for the query string to let internal/LanguageFilter.java processes the file.

      Now the loader loads js files without the languageId parameter which prevents internal\LanguageFilter.java catch the file, only the old (deprecated) language\LanguageFilter.java got the file.

      How to check it easily:

      1. run master
      2. type into the browser's bar: http://localhost:8080/o/exportimport-web/js/main.js
      3. find process-details in the document
      4. You should find it:
        if (!title) { title = 'process-details'; }

        Originally this was
        title = Liferay.Language.get('process-details');
        Which means, language\LanguageFilter.java ran, processed the file, but did not find the translation (because this is in an OSGi bundle)

      5. Now type http://localhost:8080/o/exportimport-web/js/main.js?languageId=en_US
      6. You should find
        title = 'Process\x20Details';
        Which means, that internal\LanguageFilter.java processed the file and found the translation in it's bundle.

      testing with portal

      see LPS-76614


          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  2 years, 29 weeks, 5 days ago


                  Version Package