jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/351880 )
Change subject: Replace private mylang variables with mycode in misspelling.py
......................................................................
Replace private mylang variables with mycode in misspelling.py
site.code is the identifying code of a site presumed to be equal to the
wiki prefix whereas site language is the ISO language code for a site.
e.g. 'als' is a site code whereas its site language is 'gsw'
'meta' is a site code whereas its language is 'en'
Change-Id: I2c6d7ddd457b0889ff3430739c966cfbd5520e09
---
M scripts/misspelling.py
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Dalba: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/misspelling.py b/scripts/misspelling.py
index 1a3aea1..fb65d41 100755
--- a/scripts/misspelling.py
+++ b/scripts/misspelling.py
@@ -22,7 +22,7 @@
wikipedia, user, etc. namespaces.
"""
# (C) Daniel Herding, 2007
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
#
# Distributed under the terms of the MIT license.
#
@@ -83,9 +83,9 @@
@rtype: generator
"""
- mylang = self.site.code
- if mylang in self.misspellingCategory:
- categories = self.misspellingCategory[mylang]
+ mycode = self.site.code
+ if mycode in self.misspellingCategory:
+ categories = self.misspellingCategory[mycode]
if isinstance(categories, basestring):
categories = (categories, )
generators = (
@@ -93,8 +93,8 @@
pywikibot.Category(self.site, misspellingCategoryTitle),
recurse=True, start=firstPageTitle)
for misspellingCategoryTitle in categories)
- elif mylang in self.misspellingTemplate:
- templates = self.misspellingTemplate[mylang]
+ elif mycode in self.misspellingTemplate:
+ templates = self.misspellingTemplate[mycode]
if isinstance(templates, basestring):
templates = (templates, )
generators = (
--
To view, visit
https://gerrit.wikimedia.org/r/351880
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2c6d7ddd457b0889ff3430739c966cfbd5520e09
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>