For InTense, people are editing group configuration directly on the wiki. We need to validate the configuration on save.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Implement message group configuration validation | mediawiki/extensions/Translate | master | +439 -46 |
Related Objects
Event Timeline
I'm currently experimenting with https://github.com/romaricdrigon/MetaYaml. Seems simple enough and working, so I'm planning to use it. I already found out that our documentation on https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration is out of date:
The node 'root.BASIC' has not allowed extra key(s): codeBrowser
My plan is to add this as dependency in composer.json, but have it optional. I already have schema, but it is not complete as I'm planning to use hooks (or similar, probably an interface) system for different classes (Message groups, FFS, Insertables, StringMangler) to alter the schema. In other words, the static schema would be a bit loose, and when specific classes are used, they can then define what exactly they accept.
This message is really cryptic when out of context ("[the schema] hasn't allowed X" or "[the file] has a disallowed X"?), but I see https://www.mediawiki.org/w/index.php?title=Help%3AExtension%3ATranslate%2FGroup_configuration&diff=1346535&oldid=1019597 is already in use in Translate. Documented: https://www.mediawiki.org/w/index.php?title=Help%3AExtension%3ATranslate%2FGroup_configuration&diff=1346535&oldid=1019597
You also suggested moving this config from BASIC to FILES, as it's Gettext-specific.
Change 184148 had a related patch set uploaded (by Nikerabbit):
Implement message group configuration validation
Change 184148 merged by jenkins-bot:
Implement message group configuration validation