diff --git a/TemplateData.php b/TemplateData.php index aeabcbde..acc34e5d 100644 --- a/TemplateData.php +++ b/TemplateData.php @@ -99,6 +99,7 @@ $wgResourceModules['ext.templateDataGenerator.core'] = array( 'templatedata-modal-table-param-required', 'templatedata-modal-table-param-suggested', 'templatedata-modal-table-param-type', + 'templatedata-modal-table-param-type-file', 'templatedata-modal-table-param-type-number', 'templatedata-modal-table-param-type-page', 'templatedata-modal-table-param-type-string', diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index bad0faab..c6dc2aa8 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -102,12 +102,14 @@ class TemplateDataBlob { 'unknown', 'wiki-page-name', 'wiki-user-name', + 'wiki-file-name', ); static $typeCompatMap = array( 'string/line' => 'line', 'string/wiki-page-name' => 'wiki-page-name', 'string/wiki-user-name' => 'wiki-user-name', + 'string/wiki-file-name' => 'wiki-file-name', ); if ( $data === null ) { diff --git a/i18n/en.json b/i18n/en.json index 930966e4..c928f5f7 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -46,6 +46,7 @@ "templatedata-modal-table-param-required": "Required", "templatedata-modal-table-param-suggested": "Suggested", "templatedata-modal-table-param-type": "Type", + "templatedata-modal-table-param-type-file": "File", "templatedata-modal-table-param-type-number": "Number", "templatedata-modal-table-param-type-page": "Page", "templatedata-modal-table-param-type-string": "String", diff --git a/i18n/qqq.json b/i18n/qqq.json index fde764da..f6cbbcd7 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -47,6 +47,7 @@ "templatedata-modal-table-param-required": "Label for a table heading: Required status of the parameter", "templatedata-modal-table-param-suggested": "Label for a table heading: Suggested status of the parameter", "templatedata-modal-table-param-type": "Label for a table heading: Type of the parameter", + "templatedata-modal-table-param-type-file": "A possible parameter type: File", "templatedata-modal-table-param-type-number": "A possible parameter type: Number", "templatedata-modal-table-param-type-page": "A possible parameter type: Page", "templatedata-modal-table-param-type-string": "A possible parameter type: String", diff --git a/modules/ext.templateDataGenerator.core.js b/modules/ext.templateDataGenerator.core.js index 32029fc6..0bc84f85 100644 --- a/modules/ext.templateDataGenerator.core.js +++ b/modules/ext.templateDataGenerator.core.js @@ -688,6 +688,7 @@ 'number': mw.msg( 'templatedata-modal-table-param-type-number' ), 'string': mw.msg( 'templatedata-modal-table-param-type-string' ), 'string/wiki-user-name': mw.msg( 'templatedata-modal-table-param-type-user' ), + 'string/wiki-file-name': mw.msg( 'templatedata-model-table-param-type-file' ), 'string/wiki-page-name': mw.msg( 'templatedata-modal-table-param-type-page' ) }; domObjects = { diff --git a/spec.templatedata.txt b/spec.templatedata.txt index d9e5eadf..7b490246 100644 --- a/spec.templatedata.txt +++ b/spec.templatedata.txt @@ -82,6 +82,10 @@ A valid MediaWiki user name for the current wiki. Doesn't have to exist, but if not, should be a valid user name to create. Should not include any localised or standard namespace prefix ("Foo" not "User:Foo"). + - wiki-file-name + A valid MediaWiki file name for the current wiki. Doesn't have to exist, + but if not, should be a valid file name to upload. Should not include any + localised or standard namespace prefix ("Foo" not "File:Foo"). - content Page content (such as text style, links and images etc.). - unbalanced-wikitext