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

editor_tiny: "Heading X" strings are not translated

XMLWordPrintable

      Preface

      This issue was shared on the Moodle Dev Chat on Telegram/Matrix.

      With the help of Marina Glancy and Andrew Lyons, Andrew found the problem.

      Context

      Inside the editor_tiny, menu options are translatable.

      Problem

      There are some strings, like those related to "Heading X", are not translated. Curiously, the first one "Paragraph" is properly translated.

      Proposal/Solution

      Andrew found that the problem are the whitespaces after ";" on the defined strings in https://github.com/moodle/moodle/blob/main/lib/editor/tiny/amd/src/editor.js#L271C1-L272C1.

      So, currently, the string definition on the Javascript file is like block_formats: 'Paragraph=p; Heading 3=h3; Heading 4=h4; Heading 5=h5; Heading 6=h6; Preformatted=pre',. According to the problem definition, the system currently is asking for the string " Heading 3" and so on, and not "Heading 3". And this is the reason for not being translated.

      Considerations

      Personally, I would propose to look for other similar strings being translated, too, just in case Moodle is not suffering from the same issue on other places.

            pholden Paul Holden
            jpahullo Jordi Pujol-Ahulló
            Jordi Pujol-Ahulló Jordi Pujol-Ahulló
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Mathew May Mathew May
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m

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