As a user without translator rights, it is possible to insert text from the translation helpers, even though the translation editor text area is read-only.
Steps to reproduce:
- Go to https://translatewiki.net/w/i.php?title=Special:Translate&group=ext-translate-0-all&language=fy&filter=!translated&action=translate as anonymous user
- Click a simple message
Observed:
- Translation editor opens
- Messaging is "You need permission to translate messages."
- Textarea is read-only.
Continued steps:
- In the translation helper area, click "Use as translation" below "Beheer" (or whatever is suggested)
Observed:
- String is inserted in editor, which remains read-only.
Expected:
- Nothing should happen (or something else, but at least no string insertion in the editor).
Solutions
- One way to fix this would be to update suggestionAdder in ext.translate.editor.helpers.js to check whether the textarea is readonly.
- Add cursor: not-allowed for the section displaying Use as translation to avoid giving the user an impression that these are clickable.
Screenshot