I was confronted with the problem that there is absolutely no description of how to internationalize gadgets and scripts for RTL languages on MediaWiki.org. What classes and variables should be used to determine the direction.
For example, what problems I faced when internationalizing Convenient-Discussions gadget:
- It was not immediately clear when to refer to the project language, and when to the interface language: for example, the translation of control buttons should always be based on the interface language, and the location in the project language.
- It was not clear which class I should use to indicate the direction: .ltr, .sitedir-ltr, .mw-content-ltr, or I should have used the "direction" attribute at all.
- How OOUI block layout works in RTL; when they change direction and when they don't. How to make them work correctly in RTL when you're not only using OOUI forms.
- The most correct and convenient localization scheme has not been described: T238386
- It's not clear where is the best place to publish your gadget: MediaWiki, Commons, Meta?
- No recommendation for quality of strings: (taken from translatewiki.net )Should avoid spelling mistakes, bad grammar; No lego messages (constructing messages with string concatenation); Consistency with punctuation, letter casing and terminology; Minimal mark-up inside the strings.
- There are no recommendations for creating documentation for the gadget
- There is no information in which cases it is necessary to replace icons for RTL languages, and in which not
- Should I use Gerrit or Github to develop a gadget? Should I create Phabricator project for it?
I think this is the minimum list of what should be.