When running MediaWiki/core ResourcesTest with VisualEditor but without TemplateData, a test fails:
1) ResourcesTest::testMissingMessages Message 'templatedata-doc-subpage' required by 'ext.visualEditor.mwtransclusion' must exist Failed asserting that false is true. /workspace/src/tests/phpunit/structure/ResourcesTest.php:121
That comes from VisualEditor:
{ "ResourceModules": { "ext.visualEditor.mwtransclusion": { "group": "visualEditorA", "messages": [ "quotation-marks", "redirectedfrom", "templatedata-doc-subpage", "visualeditor-changedesc-mwtransclusion", ...
quotation-marks and redirectedfrom come from MediaWiki core. templatedata-doc-subpage is not available unless TemplateData is. On CI that forces us to add TemplateData as a dependency for extensions that solely depends on VisualEditor (T389998).
TemplateData shows the message is intentionally not translated:
i18n/en.json: "templatedata-doc-subpage": "doc",
i18n/qqq.json: "templatedata-doc-subpage": "{{notranslate}}\nSub-page of template where documentation is stored by convention on the wiki.",My aim is to have the ResourcesTests to pass for VisualEditor without TemplateData (unless it is really required).
Should VisualEditor requires TemplateData in extension.json?
Should templatedata-doc-subpage be renamed visualeditor-templatedata-doc-subpage and included in VisualEditor? That removes the message dependency of ext.visualEditor.mwtransclusion.
It looks like the message is used to check whether TemplateData is available (instead of mw.loader.getState( 'ext.templateData.templateDiscovery' ) which has the message templatedata-doc-subpage.
I am a bit at lost :] My aim would be, for CI, to avoid adding TemplateData whenever VisualEditor is a dependency.