jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/487511 )
Change subject: [L10N] Update wowwiki family file ......................................................................
[L10N] Update wowwiki family file
- wikia.com has been moved to fandom.com - add ar, et, nn and uk subdomains - remove sv subdomain - hostnames does not contain subdomain codes except for uk - update domains - update version - add protocol and scriptpath methods - Skip family_test.TestFamilyUrlRegex.test_each_family due to T215077
Bug: T75534 Bug: T111608 Bug: T215038 Change-Id: I61ea7522c3deaea2fa96b5d267f17ea30b789de4 --- M pywikibot/families/wowwiki_family.py M tests/family_tests.py 2 files changed, 21 insertions(+), 11 deletions(-)
Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/families/wowwiki_family.py b/pywikibot/families/wowwiki_family.py index b27a93e..e2d34f3 100644 --- a/pywikibot/families/wowwiki_family.py +++ b/pywikibot/families/wowwiki_family.py @@ -16,23 +16,22 @@ """Family class for WOW Wiki."""
name = 'wowwiki' - domain = 'wow.wikia.com' + domain = 'wowwiki.fandom.com'
languages_by_size = [ - 'cs', 'da', 'de', 'el', 'en', 'es', 'fa', 'fi', 'fr', 'he', 'hu', 'is', - 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ru', - 'sk', 'sv', 'tr', 'zh', 'zh-tw' + 'ar', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'fa', 'fi', 'fr', 'he', + 'hu', 'is', 'it', 'ja', 'ko', 'lt', 'lv', 'nl', 'nn', 'no', 'pl', 'pt', + 'pt-br', 'ru', 'sk', 'tr', 'uk', 'zh', 'zh-tw' ]
- interwiki_removals = ['hr', 'ro', 'sr'] + interwiki_removals = ['hr', 'ro', 'sr', 'sv']
- # Override 'sv'. http://sv.wow.wikia.com is an empty wiki. - # The interwikimap in this family map 'sv' to this empty wiki. @classproperty def langs(cls): """Property listing family languages.""" - cls.langs = super(Family, cls).langs - cls.langs['sv'] = 'sv.warcraft.wikia.com' + cls.langs = {code: cls.domain for code in cls.codes} + cls.langs.update({code: cls.domains[1] for code in ('es', 'et')}) + cls.langs['uk'] = 'uk.' + cls.domains[2] return cls.langs
@classproperty @@ -61,9 +60,17 @@ @classproperty def domains(cls): """List of domains used by family wowwiki.""" - return (cls.domain, 'wowwiki.com', 'warcraft.wikia.com') + return [cls.domain, 'worldofwarcraft.fandom.com', 'warcraft.wikia.com']
@deprecated('APISite.version()', since='20141225') def version(self, code): """Return the version for this family.""" - return '1.19.20' + return '1.19.24' + + def protocol(self, code): + """Return 'https' as the protocol.""" + return 'http' if code == 'uk' else 'https' + + def scriptpath(self, code): + """Return the script path for this family.""" + return '' if code in ('en', 'uk') else ('/' + code) diff --git a/tests/family_tests.py b/tests/family_tests.py index 1538693..3a7508b 100644 --- a/tests/family_tests.py +++ b/tests/family_tests.py @@ -237,6 +237,9 @@ def test_each_family(self): """Test each family builds a working regex.""" for family in pywikibot.config.family_files: + if family == 'wowwiki': + raise unittest.SkipTest( + 'Family.from_url() does not work for wowwiki (T215077)') self.current_family = family family = Family.load(family) for code in family.codes: