-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.8, 4.1.10, 4.1.11, 4.3.5, 4.4
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.
- has been marked as being related by
-
MDL-77012 Unable to select Heading options in new TinyMCE editor
- Closed
- links to