Translation of these non-prose parts of MediaWiki poses multiple challenges:
- These parts are stores in large MessagesXX.php files
- Parsing and modifying of PHP files is challenging and can pose security risks
- Translate does not support well non-dedicated files, as it prefers to regenerate files from scratch during export
- Due to backwards compatibility requirements, it should not be possible to remove existing translations without translation admin approval
- Translate extension does not support well for non-prose data. Custom interface would have to be added with strict checks. The translation needs to be serialized to a string format for storage.
- Translation of some items must be unique, while some items must allow identical translations. This should be configurable, or better yet, defined by developers.
To support these translations, the following steps needs to happen:
- Move each part into dedicated JSON file (per language), with schema for the format
- Implement file format support for these files in Translate
- Implement message validators for the requirements (no removal of existing translations, no conflicting translations, correct syntax)
- (optional) Implement custom non-textarea UI for these in Special:Translate
- Review the existing aliasFile, magicFile etc. annotations as they are bound to be stale now
- Augment message group creation code to read the existing aliasFile, magicFile etc. from the specifications and create appropriate message groups