Wikia

Memory Alpha

Morn/add sister to family

Discuss0
37,213pages on
this wiki

< User:Morn

This page is for adding a new Memory Alpha sister to the memoryalpha_family.py. In case you discover some language specific settings that need to be changed, contact User:Kobi.

Namespace check Edit

Projects use different languages and have different translations for their namespaces. Here is the list:

Namespaces
{{ns:-2}} or {{ns:Media}} Media
{{ns:-1}} or {{ns:Special}} Special
{{ns:1}} or {{ns:Talk}} Talk
{{ns:2}} or {{ns:User}} User
{{ns:3}} or {{ns:User_talk}} User talk
{{ns:4}} or {{ns:Project}} Memory Alpha
{{ns:5}} or {{ns:Project_talk}} Memory Alpha talk
{{ns:6}} or {{ns:Image}} File
{{ns:7}} or {{ns:Image_talk}} File talk
{{ns:8}} or {{ns:MediaWiki}} MediaWiki
{{ns:9}} or {{ns:MediaWiki_talk}} MediaWiki talk
{{ns:10}} or {{ns:Template}} Template
{{ns:11}} or {{ns:Template_talk}} Template talk
{{ns:12}} or {{ns:Help}} Help
{{ns:13}} or {{ns:Help_talk}} Help talk
{{ns:14}} or {{ns:Category}} Category
{{ns:15}} or {{ns:Category_talk}} Category talk
{{ns:100}}
{{ns:101}}
{{ns:102}} Portal
{{ns:103}} Portal talk
{{ns:110}} Forum
{{ns:111}} Forum talk

Current version Edit

The file as of 16:07, 8 July 2007 (UTC)

# -*- coding: utf-8  -*-
import family
    
# The Memory Alpha family, a set of StarTrek wikis.

class Family(family.Family):
    def __init__(self):
        family.Family.__init__(self)
        self.name = 'memoryalpha'
    
        self.langs = {
            'cs': None,
            'de': None,
            'en': None,
            'eo': None,
            'es': None,
            'fr': None,
            'mu': None,
            'nl': None,
            'pl': None,
            'pt-br': None,
            'ru': None,
            'sr': None,
            'sv': None,
            'zh-cn': None,
            }

        # Override defaults
        self.namespaces[2]['pl'] = u'Użytkownik'
        self.namespaces[3]['pl'] = u'Dyskusja użytkownika'
        self.namespaces[9]['sv'] = u'MediaWiki-diskussion'
        self.namespaces[13]['sv'] = u'Hjälpdiskussion'
		
        # pt-br doesn't know its language (pt), ns:4 and ns:5 defined below for consistency
        self.namespaces[-1]['pt-br'] = u'Especial'
        self.namespaces[1]['pt-br'] = u'Discussão'
        self.namespaces[2]['pt-br'] = u'Usuário'
        self.namespaces[3]['pt-br'] = u'Usuário Discussão'
        self.namespaces[6]['pt-br'] = u'Imagem'
        self.namespaces[7]['pt-br'] = u'Imagem Discussão'
        self.namespaces[9]['pt-br'] = u'MediaWiki Discussão'
        self.namespaces[10]['pt-br'] = u'Predefinição'
        self.namespaces[11]['pt-br'] = u'Predefinição Discussão'
        self.namespaces[12]['pt-br'] = u'Ajuda'
        self.namespaces[13]['pt-br'] = u'Ajuda Discussão'
        self.namespaces[14]['pt-br'] = u'Categoria'
        self.namespaces[15]['pt-br'] = u'Categoria Discussão'
		
		# zh-cn doesn't have defaults, ns:4 and ns:5 defined below for consistency
        self.namespaces[-2]['zh-cn'] = u'文件'
        self.namespaces[-1]['zh-cn'] = u'特殊'
        self.namespaces[1]['zh-cn'] = u'讨论'
        self.namespaces[2]['zh-cn'] = u'用户'
        self.namespaces[3]['zh-cn'] = u'用户讨论'
        self.namespaces[6]['zh-cn'] = u'图像'
        self.namespaces[7]['zh-cn'] = u'图像讨论'
        self.namespaces[9]['zh-cn'] = u'MediaWiki讨论'
        self.namespaces[10]['zh-cn'] = u'模板'
        self.namespaces[11]['zh-cn'] = u'模板讨论'
        self.namespaces[12]['zh-cn'] = u'帮助'
        self.namespaces[13]['zh-cn'] = u'帮助讨论'
        self.namespaces[14]['zh-cn'] = u'分类'
        self.namespaces[15]['zh-cn'] = u'分类讨论'
    
        # Most namespaces are inherited from family.Family.
		
        self.namespaces[4] = {
            '_default': u'Memory Alpha',
			'cs': u'encyklopedie Star Treku',
			'ru': u'Memory Alpha - A Wikia wiki',
			'pt-br': u'Memória Alfa',
			'sr': u'Успомене Алфе',
			'zh-cn': u'阿尔法记忆',
        }
        self.namespaces[5] = {
            '_default': u'Memory Alpha talk',
            'cs': u'encyklopedie Star Treku diskuse',
            'de': u'Memory Alpha Diskussion',
            'eo': u'Memory Alpha diskuto',
            'es': u'Memory Alpha Discusión',
            'fr': u'Discussion Memory Alpha',
            'nl': u'Overleg Memory Alpha',
            'pl': u'Dyskusja Memory Alpha',
            'pt-br': u'Memória Alfa Discussão',
            'ru': u'Обсуждение Memory Alpha - A Wikia wiki',
            'sr': u'Разговор о Успомене Алфе',
            'sv': u'Memory Alphadiskussion',
            'zh-cn': u'阿尔法记忆讨论',
        }
        self.namespaces[100] = {
			'_default': u'Forum',
			'pt-br': u'Fórum',
		}
        self.namespaces[101] = {
			'_default': u'Forum talk',
			'de': u'Forum Diskussion',
			'pt-br': u'Fórum Discussão',
		}
        self.namespaces[102] = {
			'_default': u'Portal',
		}
        self.namespaces[103] = {
			'_default': u'Portal talk',
			'pt-br': u'Portal Discussão',
		}
        self.namespaces[110] = {
			'_default': u'Forum',
		}
        self.namespaces[111] = {
			'_default': u'Forum talk',
		}
            
        self.disambiguationTemplates = {
            '_default': [u'Disambig'],
            'cs':  [u'Rozcestník'],
            'de':  [u'Begriffsklärung', u'Begriffsklärung-Episode', u'Begriffsklärung Typ 2'],
            'en':  [u'Disambig', u'Disambiguate', u'Disambiguate1', u'Disambiguation link', u'Ep disambiguation'],
            'es':  [u'Desambig'],
            'fr':  [u'Homonymie'],
            'pl':  [u'Ujednoznacznienie'],
            'pt-br':  [u'Desambig'],
            'sv':  [u'Gaffelsidor'],
		}

        self.disambcatname = {
            'cs':  u'Šablony rozcestníků',
            'de':  u'Begriffsklärung',
            'en':  u'Memory Alpha disambiguations',
            'es':  u'Memory Alpha desambiguaciones',
            'fr':  u'Memory Alpha Homonymie',
            'nl':  u'Disambiguations',
            'pt-br':  u'Desambiguações da Memória Alfa',
            'sv':  u'Memory Alpha:Gaffelsidor',
		}

        
        # A few selected big languages for things that we do not want to loop over
        # all languages. This is only needed by the titletranslate.py module, so
        # if you carefully avoid the options, you could get away without these
        # for another wiki family.
        self.languages_by_size = ['en', 'de', 'es', 'nl', 'fr', 'sv', 'cs', 'pl', 'pt-br', 'mu', 'eo', 'sr', 'ru', 'zh-cn']
		
        alphabetic = ['cs', 'de', 'en', 'es', 'eo', 'fr', 'nl', 'pl', 'pt-br', 'ru', 'sr', 'sv', 'mu', 'zh-cn']

        self.mainpages = {
            'cs' :			u'Hlavní strana',
            'de' :			u'Hauptseite',
            'en' :			u'Portal:Main',
            'eo' :			u'Ĉefpaĝo',
            'es' :			u'Portada',
            'fr' :			u'Accueil',
            'nl' :			u'Hoofdpagina',
            'pl' :			u'Strona główna',
            'pt-br' :			u'Página principal',
            'ru' :			u'Заглавная страница',
            'sr' :			u'Главна страна',
            'sv' :			u'Huvudsida',
            'zh-cn' :			u'Portal:首页',
		}


#        self.obsolete = {
#            'pt':'pt-br',
#        }
		
    def hostname(self,code):
        return 'memory-alpha.org'

    def path(self, code):
        if code=='pt-br':
            return '/pt/wiki/'
        return '/%s/wiki/' % code

    def version(self, code):
        return "1.10alpha"

Around Wikia's network

Random Wiki