From 759f0eef2039c923482561ea18b96d385ce8fc8a Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Fri, 9 May 2014 19:44:25 +0200 Subject: [PATCH] Add 'boolean' type support Bug: 55331 Change-Id: I2508e3cc6e04f1eb382e6ec18c636bebdfccbf99 --- TemplateData.php | 1 + TemplateDataBlob.php | 1 + i18n/en.json | 1 + i18n/qqq.json | 1 + spec.templatedata.txt | 2 ++ 5 files changed, 6 insertions(+) diff --git a/TemplateData.php b/TemplateData.php index acc34e5d..de8dd57e 100644 --- a/TemplateData.php +++ b/TemplateData.php @@ -101,6 +101,7 @@ $wgResourceModules['ext.templateDataGenerator.core'] = array( 'templatedata-modal-table-param-type', 'templatedata-modal-table-param-type-file', 'templatedata-modal-table-param-type-number', + 'templatedata-modal-table-param-type-boolean', 'templatedata-modal-table-param-type-page', 'templatedata-modal-table-param-type-string', 'templatedata-modal-table-param-type-undefined', diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php index 089c975c..f094d36c 100644 --- a/TemplateDataBlob.php +++ b/TemplateDataBlob.php @@ -97,6 +97,7 @@ class TemplateDataBlob { 'content', 'line', 'number', + 'boolean', 'string', 'unbalanced-wikitext', 'unknown', diff --git a/i18n/en.json b/i18n/en.json index c928f5f7..82a9d0ca 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -48,6 +48,7 @@ "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-boolean": "Boolean", "templatedata-modal-table-param-type-page": "Page", "templatedata-modal-table-param-type-string": "String", "templatedata-modal-table-param-type-undefined": "Undefined", diff --git a/i18n/qqq.json b/i18n/qqq.json index 3d73e310..d6275818 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -49,6 +49,7 @@ "templatedata-modal-table-param-type": "Label for a table heading: Type of the parameter.\n{{Identical|Type}}", "templatedata-modal-table-param-type-file": "A possible parameter type: File\n{{Identical|File}}", "templatedata-modal-table-param-type-number": "A possible parameter type: Number", + "templatedata-modal-table-param-type-boolean": "A possible parameter type: Boolean", "templatedata-modal-table-param-type-page": "A possible parameter type: Page", "templatedata-modal-table-param-type-string": "A possible parameter type: String", "templatedata-modal-table-param-type-undefined": "A possible parameter type: Undefined", diff --git a/spec.templatedata.txt b/spec.templatedata.txt index 7b490246..a18c8b30 100644 --- a/spec.templatedata.txt +++ b/spec.templatedata.txt @@ -75,6 +75,8 @@ Any textual value. - number Any numerical value (without decimal points or thousand separators). + - boolean + A boolean value ('1' for true, '0' for false, '' for unknown). - wiki-page-name A valid MediaWiki page name for the current wiki. Doesn't have to exist, but if not, should be a valid page name to create.