Xqt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/86087


Change subject: calculating crossnamespace from authornamespaces, update from 
core  86085
......................................................................

calculating crossnamespace from authornamespaces, update from core  86085

Change-Id: I25b4aaf659c2c7f442bfafb6904761897397f3ee
---
M families/wikisource_family.py
1 file changed, 5 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/87/86087/1

diff --git a/families/wikisource_family.py b/families/wikisource_family.py
index c7bd9ed..b89c111 100644
--- a/families/wikisource_family.py
+++ b/families/wikisource_family.py
@@ -717,48 +717,8 @@
             'zh': [102],
         }
 
-        self.crossnamespace[0] = {
-            '_default': self.authornamespaces,
-        }
-        self.crossnamespace[100] = {
-            'bg': self.authornamespaces,
-            'cs': self.authornamespaces,
-            'hr': self.authornamespaces,
-            'hu': self.authornamespaces,
-            'hy': self.authornamespaces,
-            'ko': self.authornamespaces,
-            'tr': self.authornamespaces,
-        }
-
-        self.crossnamespace[102] = {
-            'ar': self.authornamespaces,
-            'be': self.authornamespaces,
-            'da': self.authornamespaces,
-            'en': self.authornamespaces,
-            'eo': self.authornamespaces,
-            'fa': self.authornamespaces,
-            'fr': self.authornamespaces,
-            'it': self.authornamespaces,
-            'la': self.authornamespaces,
-            'nl': self.authornamespaces,
-            'no': self.authornamespaces,
-            'pt': self.authornamespaces,
-            'ro': self.authornamespaces,
-            'vi': self.authornamespaces,
-            'zh': self.authornamespaces,
-        }
-
-        self.crossnamespace[104] = {
-            'pl': self.authornamespaces,
-        }
-
-        self.crossnamespace[106] = {
-            'ca': self.authornamespaces,
-            'et': self.authornamespaces,
-            'sv': self.authornamespaces,
-        }
-
-        self.crossnamespace[108] = {
-            'he': self.authornamespaces,
-        }
-
+        for key, values in self.authornamespaces.iteritems():
+            for item in values:
+                if item not in self.crossnamespace:
+                    self.crossnamespace[item] = {}
+                self.crossnamespace[item].update({key: self.authornamespaces})

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25b4aaf659c2c7f442bfafb6904761897397f3ee
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

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

Reply via email to