Merge "Localisation updates from https://translatewiki.net."
authorL10n-bot <l10n-bot@translatewiki.net>
Fri, 29 Jul 2016 20:49:09 +0000 (20:49 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 29 Jul 2016 20:49:09 +0000 (20:49 +0000)
docs/extension.schema.json
docs/extension.schema.v1.json
includes/registration/ExtensionProcessor.php

index f2406c8..110e99d 100644 (file)
                                        "capitallinkoverride": {
                                                "type": "boolean",
                                                "description": "Set $wgCapitalLinks on a per-namespace basis"
+                                       },
+                                       "conditional": {
+                                               "type": "boolean",
+                                               "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
+                                               "default": false
                                        }
                                },
                                "required": ["id", "constant", "name"]
index 893facf..37235e9 100644 (file)
                                        "capitallinkoverride": {
                                                "type": "boolean",
                                                "description": "Set $wgCapitalLinks on a per-namespace basis"
+                                       },
+                                       "conditional": {
+                                               "type": "boolean",
+                                               "description": "Whether the namespace is conditional upon configuration and should not be registered (requires separate registration via a hook)",
+                                               "default": false
                                        }
                                },
                                "required": ["id", "constant", "name"]
index 9563fc0..5555e8b 100644 (file)
@@ -243,7 +243,10 @@ class ExtensionProcessor implements Processor {
                        foreach ( $info['namespaces'] as $ns ) {
                                $id = $ns['id'];
                                $this->defines[$ns['constant']] = $id;
-                               $this->attributes['ExtensionNamespaces'][$id] = $ns['name'];
+                               if ( !( isset( $ns['conditional'] ) && $ns['conditional'] ) ) {
+                                       // If it is not conditional, register it
+                                       $this->attributes['ExtensionNamespaces'][$id] = $ns['name'];
+                               }
                                if ( isset( $ns['gender'] ) ) {
                                        $this->globals['wgExtraGenderNamespaces'][$id] = $ns['gender'];
                                }