Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79554

TinyMCE could not load the current language

XMLWordPrintable

    • MOODLE_402_STABLE, MOODLE_403_STABLE

      Suppose a user uses Hebrew or French (Français). In that case, TinyMCE cannot load the language file in the lib/editor/tiny/js/tinymce/plugins/help/js/i18n/keynav/* because TinyMCE uses he_IL instead of he like Moodle did.

      https://github.com/tinymce/tinymce/blob/main/modules/tinymce/src/plugins/help/i18n/keynav/

      Step to reproduce

      1. Log in as Admin
      2. Go to Site admin -> General -> Language - Language Packs
      3. Install Hebrew (he) language pack
      4. Go to any page with a TinyMCE editor on it
      5. Open your browser dev console
      6. Observe the console error about the missing he.js file

      There is a fallback to English (en) when the requested file cannot be loaded. To see where the attempted he.js and resulting fallback file is being displayed, do this:

      1. Observe where the 'Help' menu item is on the Tiny menus
      2. Using the Moodle user dropdown, change the language to Hebrew
      3. Now that we are displaying in Hebrew, it will be RTL displayed, choose where 'Help' would be from the Tiny menus
      4. Choose the only option in that Help dropdown
      5. A modal window will display the help contents.
      6. The second sub-menu item down (Keyboard navigation) displays the contents of lib/editor/tiny/js/tinymce/plugins/help/js/i18n/keynav/he_IL.js (note that this .js file is he_IL.js and not he.js which is why we are getting the 404)
      7. The contents will display in the fallback language of English (en)

        1. he-error.png
          he-error.png
          109 kB
        2. lang_tinymce.png
          lang_tinymce.png
          11 kB
        3. moodle_lang.png
          moodle_lang.png
          16 kB

            Unassigned Unassigned
            meirza.arson@moodle.com Meirza
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 31 minutes
                2h 31m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.