jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/970400 )

Change subject: [IMPR] enable vikidia:nl site
......................................................................

[IMPR] enable vikidia:nl site

vikidia:nl has a different domain wikikids.nl.
Update the vikidia_familiy file to enable this
site.

Bug: T350158
Change-Id: Iba34bc126e329f2435558214f1d387bdafd7356b
---
M pywikibot/families/vikidia_family.py
1 file changed, 38 insertions(+), 2 deletions(-)

Approvals:
  Matěj Suchánek: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/pywikibot/families/vikidia_family.py 
b/pywikibot/families/vikidia_family.py
index cd3caf0..3297f39 100644
--- a/pywikibot/families/vikidia_family.py
+++ b/pywikibot/families/vikidia_family.py
@@ -5,6 +5,7 @@
 # Distributed under the terms of the MIT license.
 #
 from pywikibot import family
+from pywikibot.tools import classproperty


 class Family(family.SubdomainFamily):
@@ -15,9 +16,30 @@
     domain = 'vikidia.org'

     codes = [
-        'ar', 'ca', 'de', 'el', 'en', 'es', 'eu', 'fr', 'hy', 'it', 'oc', 'pt',
-        'ru', 'scn',
+        'ar', 'ca', 'de', 'el', 'en', 'es', 'eu', 'fr', 'hy', 'it', 'nl', 'oc',
+        'pt', 'ru', 'scn',
     ]

     # Sites we want to edit but not count as real languages
     test_codes = ['central', 'test']
+
+    @classproperty
+    def domains(cls):
+        """List of domains used by Vikidia family."""
+        return [
+            cls.domain,
+            'wikikids.nl'  # nl
+        ]
+
+    @classproperty
+    def langs(cls):
+        """Property listing family languages."""
+        cls.langs = super().langs
+        cls.langs['nl'] = cls.domains[1]
+        return cls.langs
+
+    def scriptpath(self, code):
+        """Return the script path for this family."""
+        if code == 'nl':
+            return ''
+        return super().scriptpath(code)

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/970400
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iba34bc126e329f2435558214f1d387bdafd7356b
Gerrit-Change-Number: 970400
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Linedwell <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to