jenkins-bot has submitted this change and it was merged.

Change subject: Set up "Gadget" and "Gadget definition" namespaces
......................................................................


Set up "Gadget" and "Gadget definition" namespaces

Register the "Gadget", "Gadget definition", and their respective talk
namespaces. It will not be possible to create any pages in the Gadget
and Gadget definition namespaces due to the "gadgets-edit" and "gadgets-
definition-edit" rights not being granted to any groups.

Depends on Iaf8b44d02adf9 in MediaWiki core.

Change-Id: Ia88c774cc0decc252a4a4277d14822048db95801
---
A Gadgets.namespaces.php
M extension.json
M i18n/en.json
M i18n/qqq.json
4 files changed, 58 insertions(+), 3 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Gadgets.namespaces.php b/Gadgets.namespaces.php
new file mode 100644
index 0000000..0ec7d10
--- /dev/null
+++ b/Gadgets.namespaces.php
@@ -0,0 +1,17 @@
+<?php
+$namespaceNames = array();
+
+// For wikis without Gadgets installed.
+if ( !defined( 'NS_GADGET' ) ) {
+       define( 'NS_GADGET', 2300 );
+       define( 'NS_GADGET_TALK', 2301 );
+       define( 'NS_GADGET_DEFINITION', 2302 );
+       define( 'NS_GADGET_DEFINITION_TALK', 2303 );
+}
+
+$namespaceNames['en'] = array(
+       NS_GADGET => 'Gadget',
+       NS_GADGET_TALK => 'Gadget_talk',
+       NS_GADGET_DEFINITION => 'Gadget_definition',
+       NS_GADGET_DEFINITION_TALK => 'Gadget_definition_talk',
+);
diff --git a/extension.json b/extension.json
index 09ccba2..423861d 100755
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,35 @@
        "descriptionmsg": "gadgets-desc",
        "license-name": "GPL-2.0+",
        "type": "other",
+       "namespaces": [
+               {
+                       "id": 2300,
+                       "constant": "NS_GADGET",
+                       "name": "Gadget",
+                       "protection": "gadgets-edit"
+               },
+               {
+                       "id": 2301,
+                       "constant": "NS_GADGET_TALK",
+                       "name": "Gadget_talk"
+               },
+               {
+                       "id": 2302,
+                       "constant": "NS_GADGET_DEFINITION",
+                       "name": "Gadget_definition",
+                       "protection": "gadgets-definition-edit",
+                       "capitallinkoverride": false
+               },
+               {
+                       "id": 2303,
+                       "constant": "NS_GADGET_DEFINITION_TALK",
+                       "name": "Gadget_definition_talk"
+               }
+       ],
+       "AvailableRights": [
+               "gadgets-edit",
+               "gadgets-definition-edit"
+       ],
        "SpecialPages": {
                "Gadgets": "SpecialGadgets"
        },
@@ -21,7 +50,8 @@
                ]
        },
        "ExtensionMessagesFiles": {
-               "GadgetsAlias": "Gadgets.alias.php"
+               "GadgetsAlias": "Gadgets.alias.php",
+               "GadgetsNamespaces": "Gadgets.namespaces.php"
        },
        "AutoloadClasses": {
                "ApiQueryGadgetCategories": "api/ApiQueryGadgetCategories.php",
diff --git a/i18n/en.json b/i18n/en.json
index 7f14d62..e2b2cae 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -35,5 +35,9 @@
        "apihelp-query+gadgets-example-2": "Get a list of gadgets with all 
possible properties",
        "apihelp-query+gadgets-example-3": "Get a list of gadgets belonging to 
category \"foo\"",
        "apihelp-query+gadgets-example-4": "Get information about gadgets 
\"foo\" and \"bar\"",
-       "apihelp-query+gadgets-example-5": "Get a list of gadgets enabled by 
current user"
+       "apihelp-query+gadgets-example-5": "Get a list of gadgets enabled by 
current user",
+       "right-gadgets-edit": "Edit gadget JavaScript and CSS pages",
+       "action-gadgets-edit": "edit this gadget JavaScript or CSS page",
+       "right-gadgets-definition-edit": "Edit gadget definitions",
+       "action-gadgets-definition-edit": "edit this gadget definition"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 9fe59ae..dc22192 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -46,5 +46,9 @@
        "apihelp-query+gadgets-example-2": 
"{{doc-apihelp-example|query+gadgets}}",
        "apihelp-query+gadgets-example-3": 
"{{doc-apihelp-example|query+gadgets}}",
        "apihelp-query+gadgets-example-4": 
"{{doc-apihelp-example|query+gadgets}}",
-       "apihelp-query+gadgets-example-5": 
"{{doc-apihelp-example|query+gadgets}}"
+       "apihelp-query+gadgets-example-5": 
"{{doc-apihelp-example|query+gadgets}}",
+       "right-gadgets-edit": "{{doc-right|gadgets-edit}}",
+       "action-gadgets-edit": "{{doc-action|gadgets-edit}}",
+       "right-gadgets-definition-edit": 
"{{doc-right|gadgets-definition-edit}}",
+       "action-gadgets-definition-edit": 
"{{doc-action|gadgets-definition-edit}}"
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/228454
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia88c774cc0decc252a4a4277d14822048db95801
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to