Translation for the new editor_tiny in Moodle 4.1

Translation for the new editor_tiny in Moodle 4.1

by Ralf Krause -
Number of replies: 8
Picture of Language pack maintainers

Hi,

just two hours ago we got a message about the translation of the new editor tiny in Moodle 4.1. It's the Editor TinyMCE 6 so I can believe that we have to translate everything again. https://lang.moodle.org/mod/forum/discuss.php?d=8712

As I understand the technical hints the translation for the editor tiny is not done in the AMOS translation tool. Bad thing! There are currently 404 strings which we should translate in an external tool? Why should it be impossible to get the strings into AMOS?

Best regards,
Ralf

In reply to Ralf Krause

Re: Translation for the new editor_tiny in Moodle 4.1

by koen roggemans -
Picture of Language pack maintainers
hm, weird.

I think this is the relevant part of the Readme. Is that the documentation how to get the translation in the editor?  And does every site admin have to do that? Or is that still to be done?

I think we need more info.

44 ## Update procedure for included TinyMCE translations
45
46 1. Visit https://www.tiny.cloud/get-tiny/language-packages/ and download a translation which has been fully translated, for example the German translation.
47 2. If you did not download the German translation, update the final line of `tools/getOriginals.mjs` to the language code for the relevant translation.
48 3. Unzip the translation into a new directory:
49
50 ```
51 langdir=`mktemp -d`
52 cd "${langdir}"
53 unzip path/to/de.zip
54 ```
55
56 4. Run the translation tool:
57
58 ```
59 node "${MOODLEDIR}/tools/getOriginals.mjs"
60 ```
61
62 This will generate two files
63
64 5. Copy the `tinystrings.json` file into the Moodle directory
65
66 ```
67 cp tinystrings.json "${MOODLEDIR}/tinystrings.json"
68 ```
69
70 6. Copy the content of the `strings.php` file over the existing tiny strings:
71
72 ```
73 sed -i "/string\['tiny:/d" "${MOODLEDIR}/lang/en/editor_tiny.php"
74 cat strings.php >> "${MOODLEDIR}/lang/en/editor_tiny.php"
75 ```
76
77 7. Commit changes
78
79 ---
80
81 **Note:** You will need to manually check for any Moodle-updated language strings as part of this change (for example any from the en_fixes).
82
83 ---
In reply to koen roggemans

Re: Translation for the new editor_tiny in Moodle 4.1

by Andrew Nicols -
This is the instruction set to update the English language pack which is a part of core. I need to make a few changes to the scripts to get it to generate other language packs, which I’ll be looking at in the very near future.
In reply to Ralf Krause

Re: Translation for the new editor_tiny in Moodle 4.1

by Andrew Nicols -
Hi Ralf, I have written some tooling to bring the TinyMCE langpacks in and turn them into Moodle language strings. I need to do a little bit of work to get them to apply to other languages, but it’s on my agenda for the next few days. Unfortunately I’ve had a sick wife and child over the past few weeks which has pushed a few things down my list and I’m tryin got get everything done before the release.

I need to speak to Koen or Victor to find out the best format to incorporate these, and I’m looking into an optimization that we may also need to make to accommodate a limitation in AMOS.

I’d advise holding off a few days before translating TinyMCE while I try and get things sorted.

Best wishes,

Andrew
In reply to Andrew Nicols

Re: Translation for the new editor_tiny in Moodle 4.1

by koen roggemans -
Picture of Language pack maintainers
Any time Andrew, just give me a ping smile.

We don't have a really good solution for the translation of third party integrated components in Moodle - I don't think it is even possible.
Included in core are the H5P-components, which are terrible to translate the last time I looked, there is BigBlueButton and now TinyMCE - may be I missed one. The integrations with plugins are sometimes closed source components not available in your language at all - I think of things like plagiarism plugins with a translatable Moodle interface, but sending back untranslatable reports.

As for TinyMCE - it is of course right in your face as soon as you start using Moodle - it's everywhere. So no compromises possible in the quality of the translation. Wording, capitalisation etc should be in sync with the rest of the language pack. From your post and the post by the bot, earlier mentioned, I get the impression that the strings for TinyMCE will be available in AMOS, which would be great. At the moment there are only two new strings on top of the loads of 2.4 TinyMCE-strings.
In reply to koen roggemans

Re: Translation for the new editor_tiny in Moodle 4.1

by Ralf Krause -
Picture of Language pack maintainers
Hi Andrew,
I translated all strings of the "Editor Tiny" for the german language pack. How do we get the translated editor? I think we will find better translations for some strings but we should see these strings in the platform.
Berst regards,
Ralf
In reply to Ralf Krause

Re: Translation for the new editor_tiny in Moodle 4.1

by Anderson Blaine -
Hi Ralf, found your tracker about the error MDL-76986. Added information about the error, identified that all language locale variations do not work.

For example, locales containing only 2 characters like es, du, fr, ja and pt the translation loads correctly. But the variations es_mx, de_du, fr_ca, ja_kids and pt_br the translation doesn't work.

I am also posting this here with the hope that this issue will gain more visibility. ;)

Suggestion: It would be more appropriate to update the issue to refer to Tiny6 instead of TinyMCE.
In reply to Anderson Blaine

Re: Translation for the new editor_tiny in Moodle 4.1

by Ralf Krause -
Picture of Language pack maintainers
Yes, the problem exists for the child languages. The german child package de_du is made for schools, de_kids is made specially for primary schools. In these cases the untranslated tiny editor is a blocker!