# -*- coding: utf-8  -*-
"""Family module for WOW Wiki."""
from __future__ import unicode_literals

__version__ = '$Id$'

from pywikibot import family
from pywikibot.tools import deprecated


class Family(family.SubdomainFamily, family.WikiaFamily):

    """Family class for WOW Wiki."""

    name = 'wowwiki'
    domain = 'wow.wikia.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'
    ]

    interwiki_removals = ['hr', 'ro', 'sr']

    def __init__(self):
        """Constructor."""
        super(Family, self).__init__()
        self.langs.update({
            'en': 'www.wowwiki.com',
            'da': 'da.wowwiki.com',
            'fr': 'fr.wowwiki.com',
            'no': 'no.wowwiki.com',
            'sv': 'sv.warcraft.wikia.com',
        })

        self.disambiguationTemplates['en'] = ['disambig', 'disambig/quest',
                                              'disambig/quest2',
                                              'disambig/achievement2']
        self.disambcatname['en'] = "Disambiguations"

        # Wikia's default CategorySelect extension always puts categories last
        self.categories_last = self.langs.keys()

    @property
    def domains(self):
        """List of domains used by family wowwiki."""
        return (self.domain, 'wowwiki.com', 'warcraft.wikia.com')

    @deprecated('APISite.version()')
    def version(self, code):
        """Return the version for this family."""
        return '1.19.20'

@@ -710,190 +710,165 @@
     
-self.langs.update(%7B%0A            'en': 'www
+# Override 'sv'.  http://sv
 .wow
+.
 wiki
+a
 .com
-',%0A            'da': 'da.wowwiki.com',%0A            'fr': 'fr.wowwiki.com',%0A            'no': 'no.wowwiki.com',%0A            
+ is an empty wiki.%0A        # The interwikimap in this family map 'sv' to this empty wiki.%0A        self.langs%5B
 'sv'
-:
+%5D =
  'sv
@@ -891,20 +891,8 @@
 com'
-,%0A        %7D)
 %0A%0A  

Update WOW subdomains