summaryrefslogtreecommitdiffabout
path: root/wikitrans
authorSergey Poznyakoff <gray@gnu.org>2018-08-16 12:45:00 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-08-17 10:17:11 (GMT)
commit7186dbab7f1c1227e9229866e086bc417e3e4e52 (patch) (side-by-side diff)
treef29114e9ff7a7b023dd3d611a9bc8808f5cf5bbd /wikitrans
parentd9e26129527ce84f626eb44ff95e4ecfbc5bc92a (diff)
downloadwikitrans-7186dbab7f1c1227e9229866e086bc417e3e4e52.tar.gz
wikitrans-7186dbab7f1c1227e9229866e086bc417e3e4e52.tar.bz2
Fix PEP 8 issues.
Diffstat (limited to 'wikitrans') (more/less context) (ignore whitespace changes)
-rw-r--r--wikitrans/__init__.py26
-rw-r--r--wikitrans/wiki2html.py320
-rw-r--r--wikitrans/wiki2texi.py410
-rw-r--r--wikitrans/wiki2text.py348
-rw-r--r--wikitrans/wikidump.py77
-rw-r--r--wikitrans/wikimarkup.py1285
-rw-r--r--wikitrans/wikins.py3040
-rw-r--r--wikitrans/wikitoken.py318
8 files changed, 5824 insertions, 0 deletions
diff --git a/wikitrans/__init__.py b/wikitrans/__init__.py
new file mode 100644
index 0000000..5832e38
--- a/dev/null
+++ b/wikitrans/__init__.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2008-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+__all__ = [
+ "wikitoken",
+ "wikimarkup",
+ "wikidump",
+ "wiki2html",
+ "wiki2text",
+ "wiki2texi",
+ "wikins"
+]
diff --git a/wikitrans/wiki2html.py b/wikitrans/wiki2html.py
new file mode 100644
index 0000000..ce65bae
--- a/dev/null
+++ b/wikitrans/wiki2html.py
@@ -0,0 +1,320 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2008-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Wiki markup to HTML translator.
+
+Classes:
+
+HtmlWikiMarkup -- Converts Wiki material to HTML.
+HtmlWiktionaryMarkup -- Reserved for future use. Currently does the same as
+ HtmlWikiMarkup.
+
+"""
+
+from __future__ import print_function
+from wikitrans.wikimarkup import *
+from wikitrans.wikitoken import *
+from wikitrans.wikins import wiki_ns_re, wiki_ns
+import re
+try:
+ from urllib import quote as url_quote
+except ImportError:
+ from urllib.parse import quote as url_quote
+
+try:
+ from html import escape as html_escape
+except ImportError:
+ from cgi import escape as html_escape
+
+__all__ = [ "HtmlWikiMarkup", "HtmlWiktionaryMarkup" ]
+
+class HtmlSeqNode(WikiSeqNode):
+ def format(self):
+ s = ''
+ for x in self.content:
+ s += x.format()
+ return s
+
+class HtmlLinkNode(HtmlSeqNode):
+ def format(self):
+ arg = self.content[0].format()
+ text = None
+ if len(self.content) > 1:
+ s = [x for x in map(lambda x: x.format(), self.content)]
+ if s[0] == 'disambigR' or s[0] == 'wikiquote':
+ return ""
+ elif len(s) > 1 and s[1] == 'thumb':
+ return ""
+ text = '<span class="template">' + s[1] + '</span>'
+ if self.type == 'TMPL':
+ if re.match("t[+-]$", s[0]):
+ if len(s) > 2:
+ text = s[2]
+ elif s[0] == "term":
+ text = self.parser.tmpl_term(s)
+ elif s[0] == "proto":
+ text = self.parser.tmpl_proto(s)
+ return text
+
+ (qual,sep,tgt) = arg.partition(':')
+ if tgt != '':
+ ns = self.parser.wiki_ns_name(qual)
+ if ns:
+ if ns == 'NS_IMAGE':
+ return ''
+ elif ns == 'NS_MEDIA':
+ tgt = self.parser.media_base + '/' + tgt
+ else:
+ tgt = self.parser.mktgt(tgt)
+ elif self.type == 'LINK' and qual in self.parser.langtab:
+ tgt = self.parser.mktgt(tgt, qual)
+ if not text or text == '':
+ text = self.parser.langtab[qual]
+ else:
+ tgt = self.parser.mktgt(tgt)
+ else:
+ tgt = self.parser.mktgt(arg)
+ return "<a href=\"%s\">%s</a>" % (tgt,
+ text if (text and text != '') else arg)
+
+class HtmlRefNode(WikiRefNode):
+ def format(self):
+ target = self.ref
+ text = self.content.format()
+ return "<a href=\"%s\">%s</a>" % (
+ target,
+ text if (text and text != '') else target
+ )
+
+class HtmlFontNode(HtmlSeqNode):
+ def format(self):
+ comm = { 'IT': 'i',
+ 'BOLD': 'b' }
+ s = '<%s>' % comm[self.type]
+ for x in self.content:
+ s += x.format()
+ s += '</%s>' % comm[self.type]
+ return s
+
+class HtmlTextNode(HtmlSeqNode):
+ def format(self):
+ if isinstance(self.content,list):
+ s = ''.join(self.content)
+ else:
+ s = html_escape(self.content, quote=False)
+ return s
+
+class HtmlHdrNode(WikiHdrNode):
+ def format(self):
+ level = self.level
+ if level > 6:
+ level = 6
+ return "<h%s>%s</h%s>\n\n" % (level, self.content.format(), level)
+
+class HtmlBarNode(WikiNode):
+ def format(self):
+ return "<hr/>\n"
+
+class HtmlEnvNode(WikiEnvNode):
+ def format(self):
+ type = self.envtype
+ lev = self.level
+ if lev > 4:
+ lev = 2
+ string = ""
+ for s in self.content:
+ n = s.subtype;
+ string += "<%s>%s</%s>" % (self.parser.envt[type]["elt"][n],
+ s.content.format(),
+ self.parser.envt[type]["elt"][n])
+ return "<%s>%s</%s>" % (self.parser.envt[type]["hdr"],
+ string,
+ self.parser.envt[type]["hdr"])
+ return string
+
+class HtmlTagNode(WikiTagNode):
+ def format(self):
+ if self.tag == 'code':
+ self.parser.nested += 1
+ s = self.content.format()
+ self.parser.nested -= 1
+ return '<pre><code>' + s + '</code></pre>' #FIXME
+ elif self.tag == 'ref':
+ n = self.idx+1
+ return '<sup id="cite_ref-%d" class="reference"><a name="cite_ref-%d" href=#cite_note-%d">%d</a></sup>' % (n,n,n,n)
+ elif self.tag == 'references':
+ s = '<div class="references">\n'
+ s += '<ol class="references">\n'
+ n = 0
+ for ref in self.parser.references:
+ n += 1
+ s += ('<li id="cite_note-%d">'
+ + '<span class="mw-cite-backlink">'
+ + '<b><a href="#cite_ref-%d">^</a></b>'
+ + '</span>'
+ + '<span class="reference-text">'
+ + ref.content.format()
+ + '</span>'
+ + '</li>\n') % (n,n)
+ s += '</ol>\n</div>\n'
+ return s
+ else:
+ s = '<' + self.tag
+ if self.args:
+ s += ' ' + str(self.args)
+ s += '>'
+ s += self.content.format()
+ return s + '</' + self.tag + '>'
+
+class HtmlParaNode(HtmlSeqNode):
+ def format(self):
+ return "<p>" + super(HtmlParaNode, self).format() + "</p>\n"
+
+class HtmlPreNode(HtmlSeqNode):
+ def format(self):
+ s = super(HtmlPreNode, self).format()
+ if self.parser.nested:
+ return s
+ else:
+ return '<pre>' + s + '</pre>'
+
+class HtmlIndNode(WikiIndNode):
+ def format(self):
+ return ("<dl><dd>" * self.level) + self.content.format() + "</dd></dl>" * self.level
+
+
+class HtmlWikiMarkup(WikiMarkup):
+ """A Wiki markup to HTML translator class.
+
+ Usage:
+
+ x = HtmlWikiMarkup(file="input.wiki")
+ # Parse the input:
+ x.parse()
+ # Print it as HTML:
+ print(str(x))
+
+ Known bugs:
+ * [[official position]]s
+ Final 's' gets after closing </a> tag. Should be before.
+ """
+
+ nested = 0
+ references = []
+ def __init__(self, *args, **kwargs):
+ """Create a HtmlWikiMarkup object.
+
+ Arguments:
+
+ filename=FILE
+ Read Wiki material from the file named FILE.
+ file=FD
+ Read Wiki material from file object FD.
+ text=STRING
+ Read Wiki material from STRING.
+ lang=CODE
+ Specifies source language. Default is 'en'. This variable can be
+ referred to as '%(lang)s' in the keyword arguments below.
+ html_base=URL
+ Base URL for cross-references. Default is
+ 'http://%(lang)s.wiktionary.org/wiki/'
+ image_base=URL
+ Base URL for images. Default is
+ 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/bf'
+ media_base=URL
+ Base URL for media files. Default is
+ 'http://www.mediawiki.org/xml/export-0.3'
+ """
+
+ super(HtmlWikiMarkup, self).__init__(*args, **kwargs)
+ self.token_class['LINK'] = HtmlLinkNode
+ self.token_class['TMPL'] = HtmlLinkNode
+ self.token_class['REF'] = HtmlRefNode
+ self.token_class['IT'] = HtmlFontNode
+ self.token_class['BOLD'] = HtmlFontNode
+ self.token_class['HDR'] = HtmlHdrNode
+ self.token_class['BAR'] = HtmlBarNode
+ self.token_class['ENV'] = HtmlEnvNode
+ self.token_class['TAG'] = HtmlTagNode
+ self.token_class['PARA'] = HtmlParaNode
+ self.token_class['PRE'] = HtmlPreNode
+ self.token_class['IND'] = HtmlIndNode
+ self.token_class['TEXT'] = HtmlTextNode
+ self.token_class['SEQ'] = HtmlSeqNode
+
+ def wiki_ns_name(self, str):
+ if str in wiki_ns[self.lang]:
+ return wiki_ns[self.lang][str]
+ elif str in wiki_ns_re[self.lang]:
+ for elt in wiki_ns_re[self.lang][str]:
+ if str.beginswith(elt[0]) and str.endswith(elt[1]):
+ return elt[2]
+ return None
+
+ envt = { "unnumbered": { "hdr": "ul",
+ "elt": ["li"] },
+ "numbered": { "hdr": "ol",
+ "elt": ["li"] },
+ "defn": { "hdr": "dl",
+ "elt": ["dt","dd"] } }
+
+ def mktgt(self, tgt, lang = None):
+ if not lang:
+ lang = self.lang
+ return self.html_base % { 'lang' : lang } + url_quote(tgt)
+
+ def tmpl_term(self, s):
+ if len(s) == 2:
+ return s[1]
+ text = None
+ trans = None
+ for x in s[1:]:
+ m = re.match('(\w+)=', x)
+ if m:
+ if m.group(1) == "tr":
+ trans = x[m.end(1)+1:]
+ elif not text:
+ text = x
+ if text:
+ if trans:
+ text += ' <span class="trans">[' + trans + ']</span>'
+ return text
+
+ def tmpl_proto(self, s):
+ text = '<span class="proto-lang">Proto-' + s[1] + '</span>'
+ if len(s) >= 4:
+ n = 0
+ for x in s[2:-2]:
+ if n > 0:
+ text += ','
+ n += 1
+ text += ' <span class="proto">' + x + '</span>'
+ text += ' <span class="meaning">(' + s[-2] + ')</span>'
+ return text
+
+ def __str__(self):
+ str = ""
+ for elt in self.tree:
+ str += elt.format()
+ return str
+
+class HtmlWiktionaryMarkup(HtmlWikiMarkup):
+ """A class for translating Wiktionary articles into HTML.
+
+ Reserved for future use. Currently does the same as HtmlWikiMarkup.
+ """
diff --git a/wikitrans/wiki2texi.py b/wikitrans/wiki2texi.py
new file mode 100644
index 0000000..d9e5f52
--- a/dev/null
+++ b/wikitrans/wiki2texi.py
@@ -0,0 +1,410 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2015-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Wiki markup to Texinfo translator.
+
+Classes:
+
+TexiWikiMarkup -- Converts Wiki material to Texinfo.
+
+"""
+
+from wikitrans.wikimarkup import *
+from wikitrans.wikitoken import *
+from wikitrans.wikins import wiki_ns_re, wiki_ns
+import re
+import urllib
+
+class Acc(list):
+ def prepend(self,x):
+ self.insert(0,x)
+
+ def is_empty(self):
+ return len(self) == 0
+
+ def clear(self):
+ self = []
+
+ def tail(self, n = 1):
+ s = Acc()
+ i = len(self)
+ while i > 0 and n > 0:
+ elt = self[i-1]
+ l = len(elt)
+ if l == 0:
+ continue
+ elif l > n:
+ l = n
+ s.prepend(elt[-n:])
+ n -= l
+ i -= 1
+ return str(s)
+
+ def trim(self, n):
+ while len(self) and n > 0:
+ elt = self.pop()
+ l = len(elt)
+ if l == 0:
+ continue
+ elif l > n:
+ self += elt[0:-n]
+ break
+ n -= l
+
+ def trimnl(self):
+ if self.endswith('\n'):
+ self.trim(1)
+
+ def trimpara(self):
+ if self.endswith('\n\n'):
+ self.trim(2)
+
+ def endswith(self, x):
+ return self.tail(len(x)) == x
+
+ def in_new_para(self):
+ return self.is_empty() or self.endswith('\n\n')
+
+ def __str__(self):
+ return ''.join(self)
+
+class TexiTextNode(WikiTextNode):
+ def format(self):
+ parser = self.parser
+ if isinstance(self.content,list):
+ for s in self.content:
+ parser._print(s)
+ else:
+ parser._print(self.content)
+
+class TexiTagNode(WikiTagNode):
+ def format(self):
+ parser = self.parser
+ if self.tag in ['code', 'tt']:
+ save = parser._begin_print()
+ parser.nested += 1
+ self.content.format()
+ parser.nested -= 1
+ s = parser._end_print(save)
+ if self.isblock:
+ parser._print('@example', nl=True, escape=False)
+ parser._print(s, escape=False)
+ parser._print('@end example\n', nl=True, escape=False)
+ else:
+ parser._print('@code{%s}' % s, escape=False)
+ elif self.tag == 'div':
+ if self.args and 'id' in self.args:
+ parser._print("@anchor{%s}\n" % self.args['id'],
+ nl=True, escape=False)
+ self.content.format()
+ elif self.tag == 'ref':
+ parser._print('@footnote{', escape=False);
+ self.content.format();
+ parser._print('}', escape=False)
+ elif self.tag == 'references':
+ pass
+ else:
+ parser._print('<' + self.tag)
+ if self.args:
+ parser._print(' ' + self.args)
+ parser._print('>');
+ self.content.format()
+ parser._print('</' + self.tag + '>')
+
+class TexiParaNode(WikiSeqNode):
+ def format(self):
+ parser = self.parser
+ if not parser.acc.in_new_para():
+ parser._print('\n', nl=True)
+ for x in self.content:
+ x.format()
+ if not parser.acc.in_new_para():
+ parser._print('\n', nl=True)
+
+class TexiPreNode(WikiSeqNode):
+ def format(self):
+ parser = self.parser
+ if not parser.nested:
+ parser._print('@example\n', nl=True, escape=False)
+ for x in self.content:
+ x.format()
+ if not parser.nested:
+ parser._print('@end example\n', nl=True, escape=False)
+
+class TexiFontNode(WikiSeqNode):
+ def format(self):
+ parser = self.parser
+ comm = { 'IT': 'i',
+ 'BOLD': 'b' }
+ parser._print('@%s{' % comm[self.type], escape=False)
+ for x in self.content:
+ x.format()
+ parser._print('}', escape=False)
+
+class TexiHdrNode(WikiHdrNode):
+ def format(self):
+ parser = self.parser
+ level = self.level
+ # FIXME
+ if level > len(parser.sectcomm[parser.sectioning_model]) - 1 - parser.sectioning_start:
+ parser._print("@* ", nl=True, escape=False)
+ self.content.format()
+ else:
+ parser._print(parser.sectcomm[parser.sectioning_model][level - parser.sectioning_start] + " ", nl=True, escape=False)
+ self.content.format()
+ parser._print(None, nl=True)
+ if parser.sectcomm[parser.sectioning_model][0] == '@top':
+ parser._print('@node ', nl=True, escape=False)
+ self.content.format()
+ parser._print('\n')
+ parser._print(None, nl=True)
+
+class TexiBarNode(WikiNode):
+ def format(self):
+ self.parser._print("\n-----\n")
+
+class TexiIndNode(WikiIndNode):
+ def format(self):
+ parser = self.parser
+ parser._print("@w{ }" * self.level, nl=True, escape=False)
+ self.content.format()
+ parser._print(None, nl=True)
+
+class TexiEnvNode(WikiEnvNode):
+ def format(self):
+ parser = self.parser
+ if self.envtype == 'unnumbered':
+ parser._print('@itemize @bullet\n', nl=True, escape=False)
+ for s in self.content:
+ parser._print('@item ', nl=True, escape=False)
+ s.content.format()
+ parser._print(None, nl=True)
+ parser._print('\n')
+ parser._print('@end itemize\n', nl=True, escape=False)
+ elif self.envtype == 'numbered':
+ parser._print('@enumerate\n', nl=True, escape=False)
+ for s in self.content:
+ parser._print('@item ', nl=True, escape=False)
+ s.content.format()
+ parser._print(None, nl=True)
+ parser._print('\n')
+ parser._print('@end enumerate\n', nl=True, escape=False)
+ elif self.envtype == 'defn':
+ parser._print('@table @asis\n', nl=True, escape=False)
+ for s in self.content:
+ if s.subtype == 0:
+ parser._print('@item ', nl=True, escape=False)
+ s.content.format()
+ parser._print(None, nl=True)
+ else:
+ s.content.format()
+ parser._print(None, nl=True)
+ parser._print('\n')
+ parser._print('@end table\n', nl=True, escape=False)
+
+class TexiLinkNode(WikiSeqNode):
+ def format(self):
+ parser = self.parser
+ save = parser._begin_print()
+ self.content[0].format()
+ arg = parser._end_print()
+ if len(self.content) > 1:
+ s = []
+ for x in self.content[0:2]:
+ parser._begin_print()
+ x.format()
+ s.append(parser._end_print())
+ text = s[1]
+ else:
+ s = None
+ text = None
+
+ parser._end_print(save)
+
+ if s:
+ if s[0] == 'disambigR' or s[0] == 'wikiquote':
+ return
+ if len(s) > 1 and s[1] == 'thumb':
+ return
+
+ (qual,sep,tgt) = arg.partition(':')
+ if text:
+ parser._print("@ref{%s,%s}" % (qual, text), escape=False)
+ else:
+ parser._print("@ref{%s}" % qual, escape=False)
+
+class TexiRefNode(WikiRefNode):
+ def format(self):
+ parser = self.parser
+ target = self.ref
+ save = parser._begin_print()
+ self.content.format()
+ text = parser._end_print(save)
+ if text and text != '':
+ parser._print("@uref{%s,%s}" % (target, text), escape=False)
+ else:
+ parser._print("@uref{%s}" % target, escape=False)
+
+class TexiWikiMarkup(WikiMarkup):
+ """Wiki markup to Texinfo translator class.
+
+ Usage:
+
+ x = TexiWikiMarkup(file="input.wiki")
+ # Parse the input:
+ x.parse()
+ # Print it as Texi:
+ print(str(x))
+
+ """
+
+ nested = 0
+ sectcomm = {
+ 'numbered': [
+ '@top',
+ '@chapter',
+ '@section',
+ '@subsection',
+ '@subsubsection'
+ ],
+ 'unnumbered': [
+ '@top',
+ '@unnumbered',
+ '@unnumberedsec',
+ '@unnumberedsubsec',
+ '@unnumberedsubsubsec'
+ ],
+ 'appendix': [
+ '@top',
+ '@appendix',
+ '@appendixsec',
+ '@appendixsubsec',
+ '@appendixsubsubsec'
+ ],
+ 'heading': [
+ '@majorheading'
+ '@chapheading',
+ '@heading',
+ '@subheading',
+ '@subsubheading'
+ ]
+ }
+
+ sectioning_model = 'numbered'
+ sectioning_start = 0
+
+ def __init__(self, *args, **keywords):
+ """Create a TexiWikiMarkup object.
+
+ Arguments:
+
+ filename=FILE
+ Read Wiki material from the file named FILE.
+ file=FD
+ Read Wiki material from file object FD.
+ text=STRING
+ Read Wiki material from STRING.
+
+ sectioning_model=MODEL
+ Select the Texinfo sectioning model for the output document. Possible
+ values are:
+
+ 'numbered'
+ Top of document is marked with "@top". Headings ("=", "==",
+ "===", etc) produce "@chapter", "@section", "@subsection", etc.
+ 'unnumbered'
+ Unnumbered sectioning: "@top", "@unnumbered", "@unnumberedsec",
+ "@unnumberedsubsec".
+ 'appendix'
+ Sectioning suitable for appendix entries: "@top", "@appendix",
+ "@appendixsec", "@appendixsubsec", etc.
+ 'heading'
+ Use heading directives to reflect sectioning: "@majorheading",
+ "@chapheading", "@heading", "@subheading", etc.
+ sectioning_start=N
+ Shift resulting heading level by N positions. For example, supposing
+ "sectioning_model='numbered'", "== A ==" normally produces
+ "@section A" on output. Now, if given "sectioning_start=1", this
+ directive will produce "@subsection A" instead.
+ """
+
+ super(TexiWikiMarkup, self).__init__(*args, **keywords)
+
+ self.token_class['TEXT'] = TexiTextNode
+ self.token_class['TAG'] = TexiTagNode
+ self.token_class['PARA'] = TexiParaNode
+ self.token_class['PRE'] = TexiPreNode
+ self.token_class['IT'] = TexiFontNode
+ self.token_class['BOLD'] = TexiFontNode
+ self.token_class['HDR'] = TexiHdrNode
+ self.token_class['BAR'] = TexiBarNode
+ self.token_class['IND'] = TexiIndNode
+ self.token_class['ENV'] = TexiEnvNode
+ self.token_class['LINK'] = TexiLinkNode
+ self.token_class['REF'] = TexiRefNode
+
+ if "sectioning_model" in keywords:
+ val = keywords["sectioning_model"]
+ if val in self.sectcomm:
+ self.sectioning_model = val
+ else:
+ raise ValueError("Invalid value for sectioning model: %s" % val)
+ if "sectioning_start" in keywords:
+ val = keywords["sectioning_start"]
+ if val < 0 or val > 4:
+ raise ValueError("Invalid value for sectioning start: %s" % val)
+ else:
+ self.sectioning_start = val
+
+ replchars = re.compile(r'([@{}])')
+ acc = Acc()
+
+ def _print(self, text, **kw):
+ nl = kw.pop('nl', False)
+ escape = kw.pop('escape', True)
+ if nl and not self.acc.endswith('\n'):
+ self.acc += '\n'
+ if text:
+ if escape:
+ self.acc += self.replchars.sub(r'@\1', text)
+ else:
+ self.acc += text
+
+ def _begin_print(self):
+ s = self.acc
+ self.acc = Acc()
+ return s
+
+ def _end_print(self, val = None):
+ s = self.acc
+ self.acc = val
+ return str(s)
+
+ def __str__(self):
+ self._begin_print()
+ for elt in self.tree:
+ elt.format()
+ self.acc.trimpara()
+ return self._end_print()
+
+
+
+
+
+
+
diff --git a/wikitrans/wiki2text.py b/wikitrans/wiki2text.py
new file mode 100644
index 0000000..1fbc61b
--- a/dev/null
+++ b/wikitrans/wiki2text.py
@@ -0,0 +1,348 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2008-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Wiki markup to plain text translator.
+
+Classes:
+
+TextWikiMarkup -- Converts Wiki material to plain text.
+TextWiktionaryMarkup -- Reserved for future use. Currently does the same as
+ TextWikiMarkup.
+
+"""
+
+from wikitrans.wikitoken import *
+from wikitrans.wikimarkup import *
+from wikitrans.wikins import wiki_ns_re, wiki_ns
+import re
+try:
+ from urllib import quote as url_quote
+except ImportError:
+ from urllib.parse import quote as url_quote
+
+class TextSeqNode(WikiSeqNode):
+ def format(self):
+ string = ""
+ for x in self.content:
+ if len(string) > 1 and not string[-1].isspace():
+ string += ' '
+ string += x.format()
+ return string
+
+class TextTextNode(WikiTextNode):
+ def format(self):
+ if isinstance(self.content,list):
+ string = ""
+ for s in self.content:
+ if string:
+ if string.endswith("."):
+ string += " "
+ else:
+ string += " "
+ string += s
+ else:
+ string = self.content
+ return string
+
+class TextPreNode(WikiSeqNode):
+ def format(self):
+ string = ""
+ for x in self.content:
+ string += x.format()
+ string += '\n'
+ return string
+
+class TextParaNode(WikiSeqNode):
+ def format(self):
+ string = ""
+ for x in self.content:
+ string += x.format()
+ string = self.parser.fmtpara(string) + '\n\n'
+ return string
+
+class TextItNode(WikiSeqNode):
+ def format(self):
+ string = ""
+ for x in self.content:
+ s = x.format()
+ if s:
+ string += " " + s
+ return "_" + string.lstrip(" ") + "_"
+
+class TextBoldNode(WikiSeqNode):
+ def format(self):
+ string = ""
+ for x in self.content:
+ if string.endswith("."):
+ string += " "
+ else:
+ string += " "
+ string += x.format()
+ return string.upper()
+
+class TextLinkNode(WikiSeqNode):
+ def format(self):
+ arg = self.content[0].format()
+ if len(self.content) > 1:
+ s = [x for x in map(lambda x: x.format(), self.content)]
+ text = s[1]
+ else:
+ s = None
+ text = None
+
+ if s:
+ if s[0] == 'disambigR' or s[0] == 'wikiquote':
+ return ""
+ if len(s) > 1 and s[1] == 'thumb':
+ return ""
+ (qual,sep,tgt) = arg.partition(':')
+ if tgt != '':
+ ns = self.parser.wiki_ns_name(qual)
+ if ns:
+ if ns == 'NS_IMAGE':
+ if not self.parser.show_urls:
+ return ""
+ text = "[%s: %s]" % (qual, text if text else arg)
+ tgt = "%s/%s/250px-%s" % (self.image_base,
+ url_quote(tgt),
+ url_quote(tgt))
+ elif ns == 'NS_MEDIA':
+ text = "[%s]" % (qual)
+ else:
+ tgt = self.parser.mktgt(tgt)
+ elif self.type == 'LINK' and qual in self.parser.langtab:
+ text = self.parser.langtab[qual] + ": " + tgt
+ tgt = self.parser.mktgt(tgt, qual)
+ else:
+ tgt = self.parser.mktgt(tgt)
+ else:
+ tgt = self.parser.mktgt(arg)
+ if self.parser.show_urls:
+ return "%s (see %s) " % (text, tgt)
+ elif not text or text == '':
+ return arg
+ else:
+ return text
+
+class TextTmplNode(TextLinkNode):
+ def format(self):
+ return '[' + super(TextTmplNode, self).format() + ']'
+
+class TextBarNode(WikiNode):
+ def format(self):
+ w = self.parser.width
+ if w < 5:
+ w = 5
+ return "\n" + ("-" * (w - 5)).center(w - 1) + "\n"
+
+class TextHdrNode(WikiHdrNode):
+ def format(self):
+ return ("\n"
+ + ("*" * self.level)
+ + " "
+ + self.content.format().lstrip(" ")
+ + "\n\n")
+
+class TextRefNode(WikiRefNode):
+ def format(self):
+ text = self.content.format()
+ if text:
+ return "%s (see %s) " % (text, self.ref)
+ else:
+ return "see " + self.ref
+
+class TextEnvNode(WikiEnvNode):
+ def format(self):
+ type = self.envtype
+ lev = self.level
+ if lev > self.parser.width - 4:
+ lev = 1
+ string = ""
+ n = 1
+ for s in self.content:
+ if not string.endswith("\n"):
+ string += "\n"
+ x = s.content.format()
+ if type == "unnumbered":
+ string += self.parser.indent(lev, "- " + x.lstrip(" "))
+ elif type == "numbered":
+ string += self.parser.indent(lev, "%d. %s" % (n, x))
+ n += 1
+ elif type == "defn":
+ if s.subtype == 0:
+ string += self.parser.indent(lev-1, x)
+ else:
+ string += self.parser.indent(lev+3, x)
+
+ if not string.endswith("\n"):
+ string += "\n"
+
+ return string
+
+class TextIndNode(WikiIndNode):
+ def format(self):
+ return (" " * self.level) + self.content.format() + '\n'
+
+class TextTagNode(WikiTagNode):
+ def format(self):
+ if self.tag == 'code':
+ self.parser.nested += 1
+ s = self.content.format()
+ self.parser.nested -= 1
+ elif self.tag == 'ref':
+ s = '[%d]' % (self.idx+1)
+ elif self.tag == 'references':
+ s = '\nReferences:\n'
+ for ref in self.parser.references:
+ s += ('[%d]. ' % (ref.idx+1)) + ref.content.format() + '\n'
+ else:
+ s = '<' + self.tag
+ if self.args:
+ s += ' ' + str(self.args)
+ s += '>' + self.content.format() + '</' + self.tag + '>'
+ return s
+
+
+class TextWikiMarkup(WikiMarkup):
+ """A Wiki markup to plain text translator.
+
+ Usage:
+
+ x = TextWikiMarkup(file="input.wiki")
+ # Parse the input:
+ x.parse()
+ # Print it as plain text:
+ print(str(x))
+
+ """
+
+ # Output width
+ width = 78
+ # Do not show references.
+ show_urls = False
+ # Provide a minimum markup
+ markup = True
+
+ # Number of current element in the environment
+ num = 0
+
+ # Array of footnote references
+ references = []
+
+ def __init__(self, *args, **keywords):
+ """Create a TextWikiMarkup object.
+
+ Arguments:
+
+ filename=FILE
+ Read Wiki material from the file named FILE.
+ file=FD
+ Read Wiki material from file object FD.
+ text=STRING
+ Read Wiki material from STRING.
+
+ width=N
+ Limit output width to N columns. Default is 78.
+ show_urls=False
+ By default, the link URLs are displayed in parentheses next to the
+ link text. If this argument is given, only the link text will be
+ displayed.
+ """
+
+ super(TextWikiMarkup,self).__init__(*args, **keywords)
+ if 'width' in keywords:
+ self.width = keywords['width']
+ if 'show_urls' in keywords:
+ self.show_urls = keywords['show_urls']
+ self.token_class['SEQ'] = TextSeqNode
+ self.token_class['TEXT'] = TextTextNode
+ self.token_class['PRE'] = TextPreNode
+ self.token_class['PARA'] = TextParaNode
+ self.token_class['SEQ'] = TextSeqNode
+ self.token_class['IT'] = TextItNode
+ self.token_class['BOLD'] = TextBoldNode
+ self.token_class['LINK'] = TextLinkNode
+ self.token_class['TMPL'] = TextTmplNode
+ self.token_class['BAR'] = TextBarNode
+ self.token_class['HDR'] = TextHdrNode
+ self.token_class['REF'] = TextRefNode
+ self.token_class['ENV'] = TextEnvNode
+ self.token_class['IND'] = TextIndNode
+ self.token_class['TAG'] = TextTagNode
+
+ def wiki_ns_name(self, str):
+ if str in wiki_ns[self.lang]:
+ return wiki_ns[self.lang][str]
+ elif str in wiki_ns_re[self.lang]:
+ for elt in wiki_ns_re[self.lang][str]:
+ if str.beginswith(elt[0]) and str.endswith(elt[1]):
+ return elt[2]
+ return None
+
+ def mktgt(self, tgt, lang = None):
+ if not lang:
+ lang = self.lang
+ return self.html_base % { 'lang' : lang } + url_quote(tgt)
+
+ def indent(self, lev, text):
+ if text.find('\n') == -1:
+ s = (" " * lev) + text
+ else:
+ s = ""
+ for elt in text.split('\n'):
+ if elt:
+ s += (" " * lev) + elt + '\n'
+ if not text.endswith('\n'):
+ s = s.rstrip('\n')
+ return s
+
+ def fmtpara(self, input):
+ output = ""
+ linebuf = ""
+ length = 0
+ for s in input.split():
+ wlen = len(s)
+ if len(linebuf) == 0:
+ wsc = 0
+ elif linebuf.endswith("."):
+ wsc = 2
+ else:
+ wsc = 1
+ if length + wsc + wlen > self.width:
+ # FIXME: fill out linebuf
+ output += linebuf + '\n'
+ wsc = 0
+ length = 0
+ linebuf = ""
+ linebuf += " " * wsc + s
+ length += wsc + wlen
+ return output + linebuf
+
+ def __str__(self):
+ str = ""
+ for elt in self.tree:
+ str += elt.format()
+ return str
+
+class TextWiktionaryMarkup(TextWikiMarkup):
+ """A class for translating Wiktionary articles into plain text.
+
+ Reserved for future use. Currently does the same as TextWikiMarkup.
+ """
+
+
diff --git a/wikitrans/wikidump.py b/wikitrans/wikidump.py
new file mode 100644
index 0000000..d5f651c
--- a/dev/null
+++ b/wikitrans/wikidump.py
@@ -0,0 +1,77 @@
+# Wiki "dump" format. -*- coding: utf-8 -*-
+# Copyright (C) 2015-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Print Wiki parse tree as JSON.
+
+Classes:
+
+DumpWikiMarkup
+
+"""
+
+from __future__ import print_function
+from wikitrans.wikitoken import *
+import json
+from wikitrans.wikimarkup import WikiMarkup
+
+class DumpReferences(object):
+ idx = 0
+ def __len__(self):
+ return self.idx + 1
+ def append(self, obj):
+ self.idx += 1
+
+class DumpWikiMarkup(WikiMarkup):
+ """Produce a JSON dump of the Wiki markup parse tree.
+
+ Usage:
+
+ x = DumpWikiMarkup(file="input.wiki")
+ # Parse the input:
+ x.parse()
+ # Print a JSON dump of the parse tree
+ print(str(x))
+
+ """
+
+ indent = None
+ references = DumpReferences()
+ def __init__(self, **kwarg):
+ """Create a DumpWikiMarkup object.
+
+ Arguments:
+
+ filename=FILE
+ Read Wiki material from the file named FILE.
+ file=FD
+ Read Wiki material from file object FD.
+ text=STRING
+ Read Wiki material from STRING.
+ indent=N
+ Basic indent offset for JSON objects.
+ """
+
+ n = kwarg.pop('indent', None)
+ if n != None:
+ self.indent = int(n)
+ super(DumpWikiMarkup,self).__init__(self, **kwarg)
+ def __str__(self):
+ return json.dumps(self.tree,
+ cls=WikiNodeEncoder,
+ indent=self.indent,
+ separators=(',',': '),
+ sort_keys=True)
diff --git a/wikitrans/wikimarkup.py b/wikitrans/wikimarkup.py
new file mode 100644
index 0000000..77c3b30
--- a/dev/null
+++ b/wikitrans/wikimarkup.py
@@ -0,0 +1,1285 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2008-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Wiki markup parser.
+
+This module provides two class:
+
+WikiMarkupParser:
+ An abstract parser class, which serves as a base class for all markup
+ classes in this package.
+
+WikiMarkup
+ A subclass of the above, providing basic input method.
+
+"""
+
+from __future__ import print_function
+import sys
+import re
+from types import *
+from wikitrans.wikitoken import *
+
+__all__ = [ "WikiMarkupParser", "WikiMarkup",
+ "TagAttributes", "TagAttributeSyntaxError" ]
+
+class UnexpectedTokenError(Exception):
+ def __init__(self, value):
+ self.value = value
+
+class TagAttributeSyntaxError(Exception):
+ def __init__(self, value):
+ self.value = value
+ def __str__(self):
+ return repr(self.value)
+
+class TagAttributes(object):
+ """A dictionary-like collection of tag attributes.
+
+ Example:
+
+ attr = TagAttributes('href="foo" length=2')
+ if 'href' in attr:
+ print(x['href']) # returns "foo"
+ for a in attr:
+ ...
+ """
+
+ attrstart = re.compile("^(?P<attr>[a-zA-Z0-9_-]+)(?P<eq>=\")?")
+ valseg = re.compile("^[^\\\"]+")
+ tab = {}
+ printable = None
+ def __init__(self, string):
+ if not string:
+ self.printable = ''
+ return
+ self.printable = string
+ s = string
+ self.tab = {}
+ while s != '':
+ s = s.strip()
+ m = self.attrstart.match(s)
+ if m:
+ name = m.group('attr')
+ val = ''
+ s = s[m.end(0):]
+ if m.group('eq'):
+ while 1:
+ m = self.valseg.match(s)
+ val += m.group(0)
+ s = s[m.end(0):]
+ if s[0] == '\\':
+ val += s[1]
+ s += 2
+ elif s[0] == '"':
+ s = s[1:]
+ break
+ else:
+ val = 1
+ self.tab[name] = val
+ else:
+ raise TagAttributeSyntaxError(s)
+ def __len__(self):
+ return len(self.tab)
+ def __getitem__(self, key):
+ return self.tab[key]
+ def __contains__(self, key):
+ return key in self.tab
+ def __iter__(self):
+ for key in self.tab:
+ yield(key)
+ def has_key(self, key):
+ return self.__contains__(key)
+ def __setitem__(self, key, value):
+ self.tab[key] = value
+ def __delitem__(self, key):
+ del self.tab[key]
+ def __str__(self):
+ return self.printable
+ def __repr__(self):
+ return self.printable
+
+class WikiMarkupParser(object):
+ """Parser for Wiki markup language.
+
+ Given input in Wiki markup language creates an abstract parse tree for it.
+ This is a base class for actual parsers. The subclasses must provide the
+ input method.
+
+ Public methods:
+
+ parse() -- parse the input.
+
+ Abstract methods (must be overridden by the subclass):
+
+ input() -- returns next physical line from the input material.
+
+ Public attributes:
+
+ tree -- constructed parse tree (a subclass of WikiNode)
+
+ """
+
+ delim = re.compile("^==+[ \t]*|[ \t]*==+[ \t]*$|(^----$)|^\\*+|^#+|^[;:]+|(\\[\\[)|\\[|(\\{\\{)|(\\]\\])|\\]|(\\}\\})|\\||(\\'\\'\\'?)|<")
+ otag = re.compile("<(?P<tag>[a-zA-Z0-9_]+)(?:\s+(?P<args>[^/][^>]+))?\s*(?P<closed>/)?>")
+ ctag = re.compile("</(?P<tag>[a-zA-Z0-9_]+)\s*>")
+ refstart = re.compile("^https?://")
+
+ close_delim = {
+ '[': ']',
+ '[[': ']]',
+ '{{': '}}'
+ }
+
+ # Environment types:
+ envtypes = { "*": [ "unnumbered", 0 ],
+ "#": [ "numbered", 0 ],
+ ";": [ "defn", 0 ],
+ ":": [ "defn", 1 ]
+ }
+
+ toklist = None
+ tokind = 0
+ newline = 0
+ tree = None
+
+ tags = [ 'code', 'nowiki', 'tt', 'div', 'ref', 'references' ]
+
+ debug_level = 0
+
+ def dprint(self, lev, fmt, *argv):
+ """If current debug level is greater than or equal to lev, print *argv
+ according to format.
+ """
+ if self.debug_level >= lev:
+ for l in (fmt % argv).split('\n'):
+ print("[DEBUG] %s" % l)
+
+ inline_delims = [ "''", "'''", "[", "]", "[[", "]]", "{{", "}}", "|" ]
+
+ token_class = {
+ 'NIL': WikiNode,
+ 'NL': WikiNode,
+ 'OTAG': WikiTagNode,
+ 'CTAG': WikiTagNode,
+ 'TAG': WikiTagNode,
+ 'DELIM': WikiDelimNode,
+ 'TEXT': WikiTextNode,
+ 'PRE': WikiContentNode,
+ 'PARA': WikiSeqNode,
+ 'BAR': WikiNode,
+ 'SEQ': WikiSeqNode,
+ 'IND': WikiIndNode,
+ 'REF': WikiRefNode,
+ 'TMPL': WikiSeqNode,
+ 'IT': WikiSeqNode,
+ 'BOLD': WikiSeqNode,
+ 'ELT': WikiEltNode,
+ 'ENV': WikiEnvNode,
+ 'LINK': WikiSeqNode,
+ 'HDR': WikiHdrNode
+ }
+
+ def _new_node(self,**kwarg):
+ return self.token_class[kwarg['type']](self, **kwarg)
+
+ def tokread(self):
+ """Read next token from the input. Return it as a subclass of WikiNode."""
+ line = None
+ pos = 0
+ while 1:
+ if (not line or pos == len(line)):
+ try:
+ line = self.input()
+ pos = 0
+ except StopIteration:
+ line = u''
+
+ if not line or line == "":
+ yield(self._new_node(type='NIL'))
+ break
+
+ if line == '\n':
+ yield(self._new_node(type='NL'))
+ line = None
+ continue
+
+ self.dprint(100, "LINE: %s", line[pos:])
+ m = self.delim.search(line, pos)
+
+ if m:
+ if (pos < m.start(0)):
+ yield(self._new_node(type='TEXT',
+ content=line[pos:m.start(0)]))
+ pos = m.start(0)
+ t = None
+
+ if line[m.start(0)] == '<':
+ m = self.otag.match(line, pos)
+ if m:
+ pos = m.end(0)
+ if m.group('tag') == 'nowiki':
+ if not m.group('closed'):
+ while 1:
+ try:
+ m = self.ctag.search(line, pos)
+ if m and m.group('tag') == 'nowiki':
+ yield(self._new_node(type='TEXT',
+ content=line[pos:m.start(0)] ))
+ pos = m.end(0)
+ break
+
+ yield(self._new_node(type='TEXT',
+ content=line[pos:]))
+
+ line = self.input()
+ pos = 0
+ except StopIteration:
+ break
+ continue
+ elif m.group('tag') in self.tags:
+ try:
+ yield(self._new_node(type='OTAG',
+ tag=m.group('tag'),
+ isblock=(line[pos] == '\n'),
+ args=TagAttributes(m.group('args'))))
+ if m.group('closed'):
+ yield(self._new_node(type='CTAG',
+ tag=m.group('tag')))
+ except TagAttributeSyntaxError:
+ yield(self._new_node(type='TEXT',
+ content=m.group(0)))
+ continue
+ else:
+ yield(self._new_node(type='TEXT',content=m.group(0)))
+ continue
+ else:
+ m = self.ctag.match(line, pos)
+ if m:
+ if m.group('tag') in self.tags:
+ yield(self._new_node(type='CTAG',
+ tag=m.group('tag')))
+ pos = m.end(0)
+ continue
+ else:
+ yield(self._new_node(type='TEXT',
+ content=line[pos:pos+1]))
+ pos += 1
+ continue
+ else:
+ pos = m.end(0)
+ content = m.group(0)
+ if content[0] in self.envtypes:
+ node = self._new_node(type='DELIM',
+ content=content,
+ isblock=True,
+ continuation=pos < len(line) and line[pos] == ":")
+ if node.continuation:
+ node.content += node.content[0]
+ pos += 1
+
+ yield(node)
+
+ while pos < len(line) and line[pos] in [' ', '\t']:
+ pos += 1
+ else:
+ yield(self._new_node(type='DELIM',
+ isblock=(content.strip() not in self.inline_delims),
+ content=content.strip()))
+ continue
+
+ if line:
+ if line[-1] == '\n':
+ if line[pos:-1] != '':
+ yield(self._new_node(type='TEXT',content=line[pos:-1]))
+ yield(self._new_node(type='NL'))
+ else:
+ yield(self._new_node(type='TEXT',content=line[pos:]))
+ line = None
+
+
+ def input(self):
+ """Return next physical line from the input.
+
+ This method must be overridden by the subclass.
+ """
+ return None
+
+ def swaptkn(self, i, j):
+ """Swap tokens at indices i and j in toklist."""
+ self.dprint(80, "SWAPPING %s <-> %s", i, j)
+ x = self.toklist[i]
+ self.toklist[i] = self.toklist[j]
+ self.toklist[j] = x
+
+ def tokenize(self):
+ """Tokenize the input.
+
+ Read tokens from the input (supplied by the input() method). Place the
+ obtained tokens in the toklist array.
+ """
+ self.toklist = []
+ for tok in self.tokread():
+ self.dprint(100, "TOK: %s", tok)
+ self.toklist.append(tok)
+ # Determine and fix up the ordering of bold and italic markers
+ # There are three possible cases:
+ #
+ # 1a. '''a b ''c'' d'''
+ # 1b. ''a b '''c''' d''
+ #
+ # 2a. '''''a b'' c d'''
+ # 2b. '''''a b''' c d''
+ #
+ # 3a. '''a b ''c d'''''
+ # 3b. ''a b '''c d'''''
+ stack = []
+ for i in range(0,len(self.toklist)):
+ if (self.toklist[i].type == 'DELIM'
+ and (self.toklist[i].content == "''"
+ or self.toklist[i].content == "'''")):
+ if len(stack) > 0:
+ if self.toklist[stack[-1]].content == self.toklist[i].content:
+ # Case 1: just pop the matching delimiter off the stack
+ stack.pop()
+ elif len(stack) == 2 and stack[-2] + 1 == stack[-1]:
+ # Case 2: swap delimiters saved on stack ...
+ self.swaptkn(stack[-2], stack[-1])
+ # and pop off the matching one
+ stack.pop()
+ elif (i < len(self.toklist)
+ and self.toklist[i+1].type == 'DELIM'
+ and self.toklist[stack[-1]].content
+ == self.toklist[i+1].content):
+ # Case 3: swap current and next tokens
+ self.swaptkn(i, i+1)
+ # and pop off the matching one
+ stack.pop()
+ else:
+ # Push the token on stack
+ stack.append(i)
+ else:
+ # Push the token on stack
+ stack.append(i)
+ # Redefine all non-matched tokens as TEXT
+ for i in stack:
+ self.toklist[i].type = 'TEXT' # FIXME
+
+ mark = []
+
+ def push_mark(self):
+ """Save the current token index on stack."""
+ self.mark.append(self.tokind)
+
+ def pop_mark(self):
+ """Restore the token index from top of stack."""
+ self.tokind = self.mark.pop()
+
+ def clear_mark(self):
+ """Forget the last mark."""
+ self.mark.pop()
+
+ def lookahead(self, off=0):
+ """Peek a token at index (tokind+off)."""
+ tok = self.toklist[self.tokind+off]
+ self.dprint(20, "lookahead(%s): %s", off, tok)
+ return tok
+
+ def setkn(self,val):
+ """Store token val at the current token index."""
+ self.toklist[self.tokind] = val
+
+ def getkn(self):
+ """Get next token from the toklist. Advance tokind."""
+ self.newline = self.tokind == 0 or self.toklist[self.tokind-1].type == 'NL'
+ if self.tokind == len(self.toklist):
+ return self._new_node(type='NIL')
+ tok = self.toklist[self.tokind]
+ self.tokind = self.tokind + 1
+ self.dprint(20, "getkn: %s", tok)
+ return tok
+
+ def ungetkn(self, tok=None):
+ """Unget the last read token.
+
+ Decrease the tokind by one, so the last read token will be read again.
+ If optional argument is supplied and is not None, store it in the toklist
+ in place of the current token.
+ """
+ self.tokind = self.tokind - 1
+ self.newline = self.tokind == 0 or self.toklist[self.tokind-1].type == 'NL'
+ if tok:
+ self.toklist[self.tokind] = tok
+ self.dprint(20, "ungetkn: %s", tok)
+ return self.toklist[self.tokind]
+
+ def fixuptkn(self, tok):
+ """Replace the recently read token by tok."""
+ if self.tokind == 0:
+ raise IndexError('WikiMarkupParser.fixuptkn called at start of input')
+ self.toklist[self.tokind-1] = tok
+ return tok
+
+ def dump(self, tree, file=sys.stdout):
+ """Dump the tree to file, node by node."""
+ for node in tree:
+ file.write(str(node))
+ file.write('\n')
+
+ def is_block_end(self, tok):
+ """Return True if tok ends a block environment."""
+ if tok.type == 'NIL':
+ return True
+ elif tok.type == 'NL':
+ if self.lookahead().type == 'NIL':
+ return True
+ elif self.lookahead().type == 'NL':
+ self.getkn()
+ return True
+ elif tok.type in ['DELIM', 'CTAG', 'TAG']:
+ if tok.isblock:
+ self.ungetkn(tok)
+ return True
+ return False
+
+ def parse_para(self, tok):
+ """Read paragraph starting at tok."""
+ self.dprint(80, "ENTER parse_para: %s", tok)
+
+ acc = { 'seq': [],
+ 'textlist': [] }
+
+ def flush():
+ if acc['textlist']:
+ acc['seq'].append(self._new_node(type='TEXT',
+ content=''.join(acc['textlist'])))
+ acc['textlist'] = []
+
+ if (isinstance(tok, WikiContentNode)
+ and isinstance(tok.content,str)
+ and re.match("^[ \t]", tok.content)):
+ type = 'PRE'
+ rx = re.compile("^\S")
+ else:
+ type = 'PARA'
+ rx = re.compile("^[ \t]")
+
+ while not self.is_block_end(tok):
+ if tok.type == 'TEXT':
+ if rx and self.newline and rx.match(tok.content):
+ self.ungetkn()
+ break
+ acc['textlist'].append(tok.content)
+ elif tok.type == 'NL':
+ acc['textlist'].append('\n')
+ elif tok.type == 'OTAG':
+ flush()
+ acc['seq'].append(self.parse_tag(tok))
+ elif tok.type == 'DELIM':
+ flush()
+ acc['seq'].append(self.parse_inline_delim(tok))
+ else:
+ raise UnexpectedTokenError(tok)
+ tok = self.getkn()
+ flush()
+ if acc['seq']:
+ tok = self._new_node(type=type, content=acc['seq'])
+ else:
+ tok = None
+ self.dprint(80, "LEAVE parse_para=%s", tok)
+ return tok
+
+ def parse_block_delim(self, tok):
+ """Parse block environment starting at tok."""
+ self.dprint(80, "ENTER parse_block_delim")
+ assert(tok.type == 'DELIM')
+ if tok.content == "----":
+ node = self._new_node(type = 'BAR')
+ elif tok.content[0:2] == "==":
+ node = self.parse_header(tok)
+ if not node:
+ tok = self.ungetkn(self._new_node(type='TEXT',
+ content=tok.content))
+ elif tok.content[0] in self.envtypes:
+ node = None
+ if tok.content[0] == ':':
+ t = self.lookahead(-2)
+ if not (t.type == 'DELIM' and t.content == ';'):
+ node = self.parse_indent(tok)
+ if not node:
+ node = self.parse_env(tok)
+ else:
+ self.ungetkn(tok)
+ node = None
+ self.dprint(80, "LEAVE parse_block_delim=%s", node)
+ return node
+
+ def parse_line(self):
+ """Parse the input line."""
+ self.dprint(80, "ENTER parse_line")
+ list = []
+ while True:
+ tok = self.getkn()
+ if tok.type == 'NL' or tok.type == 'NIL':
+ break
+ elif tok.type == 'TEXT':
+ list.append(tok)
+ elif tok.type == 'DELIM':
+ if tok.isblock:
+ tok = self._new_node(type = 'TEXT', content = tok.content)
+ self.fixuptkn(tok)
+ list.append(tok)
+ elif tok.content[0] == ":":
+ # FIXME
+ list.append(self.parse_indent(tok))
+ break
+ else:
+ x = self.parse_inline_delim(tok)
+ if x:
+ list.append(x)
+ else:
+ list.append(self.fixuptkn(self._new_node(type = 'TEXT',
+ content = tok.content)))
+ elif tok.type == 'OTAG':
+ if tok.isblock:
+ self.ungetkn()
+ break
+ list.append(self.parse_tag(tok))
+ else:
+ list.append(tok)
+ ret = self._new_node(type='SEQ', content=list)
+ self.dprint(80, "LEAVE parse_line=%s", ret)
+ return ret
+
+ def parse_indent(self, tok):
+ """Parse indented block starting at tok."""
+ lev = len(tok.content)
+ self.dprint(80, "ENTER parse_indent(%s)", lev)
+ x = self._new_node(type='IND', level=lev, content=self.parse_line())
+ self.dprint(80, "LEAVE parse_indent=%s", x)
+ return x
+
+ def parse_fontmod(self,delim,what):
+ """Parse font modification directive (bold or italics).
+
+ Arguments:
+
+ delim -- starting delimiter ("''" or "'''")
+ what -- 'IT' or 'BOLD'
+ """
+ self.dprint(80, "ENTER parse_fontmod(%s,%s), tok %s",
+ delim, what, self.lookahead())
+ seq = []
+ text = ''
+ while True:
+ tok = self.getkn()
+ if tok.type == 'TEXT':
+ text += tok.content
+ elif self.is_block_end(tok):
+ self.dprint(80, "LEAVE parse_fontmod=%s", "None")
+ return None
+ elif tok.type == 'DELIM':
+# self.dprint(80, "got %s, want %s", tok.content, delim)
+ if tok.content == delim:
+ break
+ else:
+ if text:
+ seq.append(self._new_node(type='TEXT', content=text))
+ text = ''
+ x = self.parse_inline_delim(tok)
+ if x:
+ seq.append(x)
+ else:
+ self.dprint(80, "LEAVE parse_fontmod=%s", "None")
+ return None
+ elif tok.type == 'NL':
+ seq.append(self._new_node(type='TEXT', content='\n'))
+ else:
+ self.dprint(80, "LEAVE parse_fontmod=None")
+ return None
+ if text:
+ seq.append(self._new_node(type='TEXT', content=text))
+ res = self._new_node(type=what, content=seq)
+ self.dprint(80, "LEAVE parse_fontmod=%s", res)
+ return res
+
+ def parse_ref(self):
+ """Parse a reference block ([...])"""
+ self.dprint(80, "ENTER parse_ref")
+ tok = self.getkn()
+ if not (tok.type == 'TEXT' and self.refstart.match(tok.content)):
+ self.dprint(80, "LEAVE parse_ref=None")
+ return None
+
+ seq = []
+ (ref,sep,text) = tok.content.partition(' ')
+ if text:
+ seq.insert(0, self._new_node(type='TEXT', content=text))
+
+ while True:
+ tok = self.getkn()
+ if tok.type == 'NIL':
+ self.dprint(80, "LEAVE parse_ref=None")
+ return None
+ elif self.is_block_end(tok):
+ self.dprint(80, "LEAVE parse_ref=None")
+ return None
+ elif tok.type == 'DELIM':
+ if tok.content == ']':
+ break
+ else:
+ tok = self.parse_inline_delim(tok)
+ if tok:
+ seq.append(tok)
+ else:
+ self.dprint(80, "LEAVE parse_ref=None")
+ return None
+ elif tok.type == 'OTAG':
+ list.append(self.parse_tag(tok))
+ else:
+ seq.append(tok)
+
+ ret = self._new_node(type='REF', ref=ref,
+ content=self._new_node(type='SEQ', content=seq))
+ self.dprint(80, "LEAVE parse_ref= %s", ret)
+ return ret
+
+ def parse_link(self, type, delim):
+ """Parse an external link ([[...]]).
+
+ In this implementation, it is also used to parse template
+ references ({{...}}).
+
+ Arguments:
+
+ type -- 'LINK' or 'TMPL'
+ delim -- expected closing delimiter.
+ """
+ self.dprint(80, "ENTER parse_link(%s,%s)", type, delim)
+ subtree = []
+ list = []
+ while True:
+ tok = self.getkn()
+ if tok.type == 'NIL':
+ self.dprint(80, "LEAVE parse_link=None [EOF]")
+ return None
+ if tok.type == 'DELIM':
+ if tok.content == delim:
+ if list:
+ subtree.append(self._new_node(type='SEQ',
+ content=list))
+ break
+ elif tok.content == "|":
+ if len(list) > 1:
+ subtree.append(self._new_node(type='SEQ',
+ content=list))
+ elif list:
+ subtree.append(list[0])
+ list = []
+ else:
+ x = self.parse_inline_delim(tok)
+ if x:
+ list.append(x)
+ else:
+ self.dprint(80, "LEAVE parse_link=None [bad inline]")
+ return None
+ elif tok.type == 'TEXT':
+ list.append(tok)
+ else:
+ self.dprint(80, "LEAVE parse_link=None [unexpected token]")
+ return None
+ ret = self._new_node(type=type, content=subtree)
+ self.dprint(80, "LEAVE parse_link=%s", ret)
+ return ret
+
+ def parse_inline_delim(self, tok):
+ """Parse an inline block."""
+ self.dprint(80, "ENTER parse_inline_delim")
+ assert(tok.type == 'DELIM')
+ self.push_mark()
+ if tok.content == "''":
+ x = self.parse_fontmod(tok.content, 'IT')
+ elif tok.content == "'''":
+ x = self.parse_fontmod(tok.content, 'BOLD')
+ elif tok.content == "[":
+ x = self.parse_ref()
+ elif tok.content == "[[":
+ x = self.parse_link('LINK', "]]")
+ elif tok.content == "{{":
+ x = self.parse_link('TMPL', "}}")
+ else:
+ x = None
+
+ if x:
+ self.clear_mark()
+ else:
+ self.dprint(80, "BEGIN DELIMITER RECOVERY: %s", tok)
+ self.pop_mark()
+ x = self.fixuptkn(self._new_node(type='TEXT', content=tok.content))
+ od = tok.content
+ if od in self.close_delim:
+ cd = self.close_delim[od]
+ lev = 0
+ for i,tok in enumerate(self.toklist[self.tokind+1:]):
+ if tok.type == 'NIL':
+ break
+ elif tok.type == 'DELIM':
+ if tok.content == od:
+ lev += 1
+ elif tok.content == cd:
+ if lev == 0:
+ tok = self._new_node(type='TEXT',
+ content=tok.content)
+ self.toklist[self.tokind+1+i] = tok
+ lev -= 1
+ break
+ self.dprint(80, "END DELIMITER RECOVERY: %s", tok)
+
+ self.dprint(80, "LEAVE parse_inline_delim=%s", x)
+ return x
+
+ def parse_tag(self, tag):
+ """Parse an xml-like tag (such as, e.g. "<tt>...</tt>")."""
+ self.dprint(80, "ENTER parse_tag")
+ list = []
+ self.push_mark()
+ while True:
+ tok = self.getkn()
+ if tok.type == 'NIL':
+ self.pop_mark()
+ s = '<' + tag.tag
+ if tag.args:
+ s += ' ' + str(tag.args)
+ s += '>'
+ node = self._new_node(type='TEXT',content=s)
+ if tag.content:
+ self.tree[self.tokind:self.tokind] = tag.content
+ self.dprint(80, "LEAVE parse_tag = %s (tree modified)", node)
+ return node
+ elif tok.type == 'DELIM':
+ if tok.isblock:
+ tok = self.parse_block_delim(tok)
+ else:
+ tok = self.parse_inline_delim(tok)
+ if not tok:
+ tok = self.getkn()
+ elif tok.type == 'CTAG':
+ if tag.tag == tok.tag:
+ break
+ s = '</' + tag.tag + '>'
+ tok = self.fixuptkn(self._new_node(type='TEXT', content=s))
+ elif tok.type == 'NL':
+ tok = self._new_node(type = 'TEXT', content = '\n')
+ list.append(tok)
+
+ self.clear_mark()
+ ret = self._new_node(type = 'TAG',
+ tag = tag.tag,
+ args = tag.args,
+ isblock = tag.isblock,
+ content = self._new_node(type = 'SEQ', content = list))
+ self.dprint(80, "LEAVE parse_tag = %s", ret)
+ return ret
+
+ def parse_env(self, tok):
+ """Parse a block environment (numbered, unnumbered, or definition list)."""
+ type = self.envtypes[tok.content[0]][0]
+ lev = len(tok.content)
+ self.dprint(80, "ENTER parse_env(%s,%s)",type,lev)
+ list = []
+ while True:
+ if (tok.type == 'DELIM'
+ and tok.content[0] in self.envtypes
+ and type == self.envtypes[tok.content[0]][0]):
+ if len(tok.content) < lev:
+ self.ungetkn()
+ break
+ elif len(tok.content) > lev:
+ elt = self.parse_env(tok)
+ else:
+ elt = self.parse_line()
+ if not tok.continuation:
+ list.append(self._new_node(type='ELT',
+ subtype=self.envtypes[tok.content[0]][1],
+ content=elt))
+ tok = self.getkn()
+ continue
+
+ if list:
+ if list[-1].content.type != 'SEQ':
+ x = list[-1].content.content
+ # FIXME:
+ list[-1].content = self._new_node(type='SEQ', content=[x])
+ list[-1].content.content.append(elt)
+ else:
+ self.ungetkn()
+ break
+
+ tok = self.getkn()
+
+ ret = self._new_node(type='ENV',
+ envtype=type,
+ level=lev,
+ content=list)
+ self.dprint(80, "LEAVE parse_env=%s", ret)
+ return ret
+
+ def parse_header(self, tok):
+ """Parse a Wiki header."""
+ self.dprint(80, "ENTER parse_header")
+ self.push_mark()
+ list = []
+ delim = tok.content
+ while True:
+ tok = self.getkn()
+ if tok.type == 'NL':
+ self.pop_mark()
+ self.dprint(80, "LEAVE parse_header=None")
+ return None
+ elif tok.type == 'TEXT':
+ list.append(tok)
+ elif tok.type == 'DELIM':
+ if tok.content == delim:
+ if self.lookahead().type == 'NL':
+ self.getkn()
+ if self.lookahead().type == 'NL':
+ self.getkn()
+ break
+ else:
+ self.pop_mark()
+ self.dprint(80, "LEAVE parse_header=None")
+ return None
+ elif tok.isblock:
+ self.pop_mark()
+ self.dprint(80, "LEAVE parse_header=None")
+ return None
+ else:
+ list.append(self.parse_inline_delim(tok))
+ elif tok.type == 'OTAG':
+ if tok.isblock:
+ self.pop_mark()
+ self.dprint(80, "LEAVE parse_header=None")
+ return None
+ list.append(self.parse_tag(tok))
+ self.clear_mark()
+ ret = self._new_node(type='HDR',
+ level=len(delim),
+ content=self._new_node(type='SEQ', content=list))
+ self.dprint(80, "LEAVE parse_header=%s", ret)
+ return ret
+
+ def parse_block(self):
+ """Parse next block: newline, delimiter, tag, or paragraph."""
+ tok = self.getkn()
+ while tok.type == 'NL':
+ tok = self.getkn()
+ if tok == None or tok.type == 'NIL':
+ return None
+ elif tok.type == 'DELIM':
+ tok = self.parse_block_delim(tok)
+ if tok:
+ return tok
+ else:
+ tok = self.getkn()
+ elif tok.type == 'OTAG' and tok.isblock:
+ return self.parse_tag(tok)
+
+ return self.parse_para(tok)
+
+ def parse(self):
+ """Parse Wiki material supplied by the input() method.
+
+ Store the resulting abstract parsing tree in the tree attribute.
+ """
+ if not self.toklist:
+ self.tokenize()
+ if self.debug_level >= 90:
+ print("TOKEN DUMP BEGIN")
+ self.dump(self.toklist)
+ print("TOKEN DUMP END")
+ self.tokind = 0
+ self.tree = []
+ while 1:
+ subtree = self.parse_block()
+ if subtree == None:
+ break
+ self.tree.append(subtree)
+ if self.debug_level >= 70:
+ print("TREE DUMP BEGIN")
+ self.dump(self.tree)
+ print("TREE DUMP END")
+
+ def __str__(self):
+ return str(self.tree)
+
+
+class WikiMarkup(WikiMarkupParser):
+ """
+ A derived parser class that supplies a basic input method.
+
+ Three types of inputs are available:
+
+ 1. filename=<file>
+ The file <file> is opened and used for input.
+ 2. file=<file>
+ The already opened file <file> is used for input.
+ 3. text=<string>
+ Input is taken from <string>, line by line.
+
+ Usage:
+
+ obj = WikiMarkup(arg=val)
+ obj.parse
+ ... Do whatever you need with obj.tree ...
+
+ """
+
+ file = None
+ text = None
+ lang = 'en'
+ html_base = 'http://%(lang)s.wiktionary.org/wiki/'
+ image_base = 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/bf'
+ media_base = 'http://www.mediawiki.org/xml/export-0.3'
+
+ def __init__(self, *args, **keywords):
+ for kw in keywords:
+ if kw == 'file':
+ self.file = keywords[kw]
+ elif kw == 'filename':
+ self.file = open(keywords[kw])
+ elif kw == 'text':
+ self.text = keywords[kw].split("\n")
+ elif kw == 'lang':
+ self.lang = keywords[kw]
+ elif kw == 'html_base':
+ self.html_base = keywords[kw]
+ elif kw == 'image_base':
+ self.image_base = keywords[kw]
+ elif kw == 'media_base':
+ self.media_base = keywords[kw]
+
+ def __del__(self):
+ if self.file:
+ self.file.close()
+
+ def input(self):
+ if self.file:
+ return self.file.readline()
+ elif self.text:
+ return self.text.pop(0) + '\n'
+ else:
+ return None
+
+ # ISO 639
+ langtab = {
+ "aa": "Afar", # Afar
+ "ab": "Аҧсуа", # Abkhazian
+ "ae": None, # Avestan
+ "af": "Afrikaans", # Afrikaans
+ "ak": "Akana", # Akan
+ "als": "Alemannisch",
+ "am": "አማርኛ", # Amharic
+ "an": "Aragonés", # Aragonese
+ "ang": "Englisc",
+ "ar": "العربية" , # Arabic
+ "arc": "ܐܪܡܝܐ",
+ "as": "অসমীয়া", # Assamese
+ "ast": "Asturian",
+ "av": "Авар", # Avaric
+ "ay": "Aymara", # Aymara
+ "az": "Azərbaycan" , # Azerbaijani
+
+ "ba": "Башҡорт", # Bashkir
+ "bar": "Boarisch",
+ "bat-smg": "Žemaitėška",
+ "bcl": "Bikol",
+ "be": "Беларуская", # Byelorussian; Belarusian
+ "be-x-old": "Беларуская (тарашкевіца)",
+ "bg": "Български", # Bulgarian
+ "bh": "भोजपुरी", # Bihari
+ "bi": "Bislama", # Bislama
+ "bm": "Bamanankan", # Bambara
+ "bn": "বাংলা" , # Bengali; Bangla
+ "bo": "བོད་སྐད", # Tibetan
+ "bpy": "ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী" ,
+ "br": "Brezhoneg" , # Breton
+ "bs": "Bosanski" , # Bosnian
+ "bug": "Basa Ugi",
+ "bxr": "Буряад",
+
+ "ca": "Català" , # Catalan
+ "cbk-zam": "Chavacano de Zamboanga",
+ "cdo": "Mìng-dĕ̤ng-ngṳ̄",
+ "cho": "Choctaw",
+ "ce": "Нохчийн", # Chechen
+ "ceb": "Sinugboanong Binisaya" , # Cebuano
+ "ch": "Chamor", # Chamorro
+ "chr": "ᏣᎳᎩ",
+ "chy": "Tsetsêhestâhese",
+ "co": "Cors", # Corsican
+ "cr": "Nehiyaw", # Cree
+ "crh": "Qırımtatarca",
+ "cs": "Česky" , # Czech
+ "csb": "Kaszëbsczi",
+ "c": "Словѣньскъ", # Church Slavic
+ "cv": "Чăваш", # Chuvash
+ "cy": "Cymraeg" , # Welsh
+
+ "da": "Dansk" , # Danish
+ "de": "Deutsch" , # German
+ "diq": "Zazaki", # Dimli (Southern Zazaki)
+ "dsb": "Dolnoserbski",
+ "dv": "ދިވެހިބަސް", # Divehi
+ "dz": "ཇོང་ཁ", # Dzongkha; Bhutani
+
+ "ee": "Eʋegbe", # Ewe
+ "el": "Ελληνικά" , # Greek
+ "eml": "Emiliàn e rumagnòl",
+ "en": "English" , # English
+ "eo": "Esperanto" ,
+ "es": "Español" , # Spanish
+ "et": "Eesti" , # Estonian
+ "eu": "Euskara" , # Basque
+ "ext": "Estremeñ",
+
+ "fa": "فارسی" , # Persian
+ "ff": "Fulfulde", # Fulah
+ "fi": "Suomi" , # Finnish
+ "fiu-vro": "Võro",
+ "fj": "Na Vosa Vakaviti",# Fijian; Fiji
+ "fo": "Føroyskt" , # Faroese
+ "fr": "Français" , # French
+ "frp": "Arpitan",
+ "fur": "Furlan",
+ "fy": "Frysk", # Frisian
+
+ "ga": "Gaeilge", # Irish
+ "gan": "贛語 (Gànyŭ)",
+ "gd": "Gàidhlig", # Scots; Gaelic
+ "gl": "Gallego" , # Gallegan; Galician
+ "glk": "گیلکی",
+ "got": "𐌲𐌿𐍄𐌹𐍃𐌺𐍉𐍂𐌰𐌶𐌳𐌰",
+ "gn": "Avañe'ẽ", # Guarani
+ "g": "ગુજરાતી", # Gujarati
+ "gv": "Gaelg", # Manx
+
+ "ha": "هَوُسَ", # Hausa
+ "hak": "Hak-kâ-fa / 客家話",
+ "haw": "Hawai`i",
+ "he": "עברית" , # Hebrew (formerly iw)
+ "hi": "हिन्दी" , # Hindi
+ "hif": "Fiji Hindi",
+ "ho": "Hiri Mot", # Hiri Motu
+ "hr": "Hrvatski" , # Croatian
+ "hsb": "Hornjoserbsce",
+ "ht": "Krèyol ayisyen" , # Haitian; Haitian Creole
+ "hu": "Magyar" , # Hungarian
+ "hy": "Հայերեն", # Armenian
+ "hz": "Otsiherero", # Herero
+
+ "ia": "Interlingua",
+ "ie": "Interlingue",
+ "id": "Bahasa Indonesia",# Indonesian (formerly in)
+ "ig": "Igbo", # Igbo
+ "ii": "ꆇꉙ ", # Sichuan Yi
+ "ik": "Iñupiak", # Inupiak
+ "ilo": "Ilokano",
+ "io": "Ido" ,
+ "is": "Íslenska" , # Icelandic
+ "it": "Italiano" , # Italian
+ "i": "ᐃᓄᒃᑎᑐᑦ", # Inuktitut
+
+ "ja": "日本語", # Japanese
+ "jbo": "Lojban",
+ "jv": "Basa Jawa", # Javanese
+
+ "ka": "ქართული" , # Georgian
+ "kaa": "Qaraqalpaqsha",
+ "kab": "Taqbaylit",
+ "kg": "KiKongo", # Kongo
+ "ki": "Gĩkũyũ", # Kikuyu
+ "kj": "Kuanyama", # Kuanyama
+ "kk": "Қазақша", # Kazakh
+ "kl": "Kalaallisut", # Kalaallisut; Greenlandic
+ "km": "ភាសាខ្មែរ", # Khmer; Cambodian
+ "kn": "ಕನ್ನಡ", # Kannada
+ "ko": "한국어" , # Korean
+ "kr": "Kanuri", # Kanuri
+ "ks": "कश्मीरी / كشميري", # Kashmiri
+ "ksh": "Ripoarisch",
+ "ku": "Kurdî / كوردی", # Kurdish
+ "kv": "Коми", # Komi
+ "kw": "Kernewek/Karnuack", # Cornish
+ "ky": "Кыргызча", # Kirghiz
+
+ "la": "Latina" , # Latin
+ "lad": "Dzhudezmo",
+ "lb": "Lëtzebuergesch" , # Letzeburgesch
+ "lbe": "Лакку",
+ "lg": "Luganda", # Ganda
+ "li": "Limburgs", # Limburgish; Limburger; Limburgan
+ "lij": "Lígur",
+ "ln": "Lingala", # Lingala
+ "lmo": "Lumbaart",
+ "lo": "ລາວ", # Lao; Laotian
+ "lt": "Lietuvių" , # Lithuanian
+ "lua": "Luba", # Luba
+ "lv": "Latvieš" , # Latvian; Lettish
+
+ "map-bms": "Basa Banyumasan",
+ "mdf": "Мокшень (Mokshanj Kälj)",
+ "mg": "Malagasy", # Malagasy
+ "mh": "Ebon", # Marshall
+ "mi": "Māori", # Maori
+ "mk": "Македонски" , # Macedonian
+ "ml": None, # Malayalam
+ "mn": "Монгол", # Mongolian
+ "mo": "Молдовеняскэ", # Moldavian
+ "mr": "मराठी" , # Marathi
+ "ms": "Bahasa Melay" , # Malay
+ "mt": "Malti", # Maltese
+ "mus": "Muskogee",
+ "my": "မ္ရန္‌မာစာ", # Burmese
+ "myv": "Эрзянь (Erzjanj Kelj)",
+ "mzn": "مَزِروني",
+
+ "na": "dorerin Naoero", # Nauru
+ "nah": "Nāhuatl",
+ "nap": "Nnapulitano",
+ "nb": "Norsk (Bokmål)", # Norwegian Bokm@aa{}l
+ "nd": None, # Ndebele, North
+ "nds": "Plattdüütsch",
+ "nds-nl": "Nedersaksisch",
+ "ne": "नेपाली", # Nepali
+ "new": "नेपाल भाषा" , # Nepal Bhasa
+ "ng": "Oshiwambo", # Ndonga
+ "nl": "Nederlands" , # Dutch
+ "nn": "Nynorsk", # Norwegian Nynorsk
+ "no": "Norsk (Bokmål)" , # Norwegian
+ "nov": "Novial",
+ "nr": None, # Ndebele, South
+ "nrm": "Nouormand/Normaund",
+ "nv": "Diné bizaad", # Navajo
+ "ny": "Chi-Chewa", # Chichewa; Nyanja
+
+ "oc": "Occitan", # Occitan; Proven@,{c}al
+ "oj": None, # Ojibwa
+ "om": "Oromoo", # (Afan) Oromo
+ "or": "ଓଡ଼ିଆ", # Oriya
+ "os": "Иронау", # Ossetian; Ossetic
+
+ "pa": "ਪੰਜਾਬੀ" , # Panjabi; Punjabi
+ "pag": "Pangasinan",
+ "pam": "Kapampangan",
+ "pap": "Papiament",
+ "pdc": "Deitsch",
+ "pi": "पाऴि", # Pali
+ "pih": "Norfuk",
+ "pl": "Polski" , # Polish
+ "pms": "Piemontèis" ,
+ "ps": "پښتو", # Pashto, Pushto
+ "pt": "Português" , # Portuguese
+
+ "q": "Runa Simi" , # Quechua
+
+ "rm": "Rumantsch", # Rhaeto-Romance
+ "rmy": "romani - रोमानी",
+ "rn": "Kirundi", # Rundi; Kirundi
+ "ro": "Română" , # Romanian
+ "roa-rup": "Armãneashce",
+ "roa-tara": "Tarandíne",
+ "ru": "Русский" , # Russian
+ "rw": "Ikinyarwanda", # Kinyarwanda
+
+ "sa": "संस्कृतम्", # Sanskrit
+ "sah": "Саха тыла (Saxa Tyla)",
+ "sc": "Sardu", # Sardinian
+ "scn": "Sicilian",
+ "sco": "Scots",
+ "sd": "سنڌي، سندھی ، सिन्ध", # Sindhi
+ "se": "Sámegiella", # Northern Sami
+ "sg": "Sängö", # Sango; Sangro
+ "sh": "Srpskohrvatski / Српскохрватски" ,
+ "si": "සිංහල",
+ "simple": "Simple English" ,
+ "sk": "Slovenčina" , # Slovak
+ "sl": "Slovenščina" , # Slovenian
+ "sm": "Gagana Samoa", # Samoan
+ "sn": "chiShona", # Shona
+ "so": "Soomaaliga", # Somali
+ "sr": "Српски / Srpski", # Serbian
+ "srn": "Sranantongo",
+ "ss": "SiSwati", # Swati; Siswati
+ "st": "Sesotho", # Sesotho; Sotho, Southern
+ "stk": "Seeltersk",
+ "s": "Basa Sunda", # Sundanese
+ "sq": "Shqip" , # Albanian
+ "szl": "Ślůnski",
+ "sv": "Svenska" , # Swedish
+ "sw": "Kiswahili", # Swahili
+
+ "ta": "தமிழ்" , # Tamil
+ "te": "తెలుగు" , # Telugu
+ "tet": "Tetun",
+ "tg": "Тоҷикӣ", # Tajik
+ "th": "ไทย" , # Thai
+ "ti": "ትግርኛ", # Tigrinya
+ "tk": "تركمن / Туркмен", # Turkmen
+ "tl": "Tagalog" , # Tagalog
+ "tn": "Setswana", # Tswana; Setswana
+ "to": "faka Tonga", # Tonga (?) # Also ZW ; MW
+ "tokipona": "Tokipona",
+ "tpi": "Tok Pisin",
+ "tr": "Türkçe" , # Turkish
+ "ts": "Xitsonga", # Tsonga
+ "tt": "Tatarça / Татарча", # Tatar
+ "tum": "chiTumbuka",
+ "tw": "Twi", # Twi
+ "ty": "Reo Mā`ohi", # Tahitian
+
+ "udm": "Удмурт кыл",
+ "ug": "Oyghurque", # Uighur
+ "uk": "Українська" , # Ukrainian
+ "ur": "اردو", # Urdu
+ "uz": "O‘zbek", # Uzbek
+
+ "ve": "Tshivenda", # Venda
+ "vec": "Vèneto",
+ "vi": "Tiếng Việt" , # Vietnamese
+ "vls": "West-Vlams",
+ "vo": "Volapük" ,
+
+ "wa": "Walon", # Walloon
+ "war": "Winaray",
+ "wo": "Wolof", # Wolof
+ "w": "吴语",
+
+ "xal": "Хальмг",
+ "xh": "isiXhosa", # Xhosa
+
+ "yi": "ייִדיש", # Yiddish
+ "yo": "Yorùbá", # Yoruba
+
+ "za": "Cuengh", # Zhuang
+ "zea": "Zeêuws",
+ "zh": "中文" , # Chinese
+ "zh-classical": "古文 / 文言文",
+ "zm-min-nan": "Bân-lâm-gú",
+ "zh-yue": "粵語",
+ "zu": "isiZulu" # Zulu
+ }
diff --git a/wikitrans/wikins.py b/wikitrans/wikins.py
new file mode 100644
index 0000000..4fb5315
--- a/dev/null
+++ b/wikitrans/wikins.py
@@ -0,0 +1,3040 @@
+# This file is generated automatically. Do not edit.
+# -*- coding: utf-8 -*-
+wiki_ns_io = {
+ "Media": "NS_MEDIA",
+ "Specala": "NS_SPECIAL",
+ "Debato": "NS_TALK",
+ "Uzanto": "NS_USER",
+ "Uzanto_Debato": "NS_USER_TALK",
+ "Imajo": "NS_IMAGE",
+ "Imajo_Debato": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Debato": "NS_MEDIAWIKI_TALK",
+ "Shablono": "NS_TEMPLATE",
+ "Shablono_Debato": "NS_TEMPLATE_TALK",
+ "Helpo": "NS_HELP",
+ "Helpo_Debato": "NS_HELP_TALK",
+ "Kategorio": "NS_CATEGORY",
+ "Kategorio_Debato": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_io = [
+ ("", "_Debato", "NS_PROJECT_TALK"),
+]
+wiki_ns_et = {
+ "Meedia": "NS_MEDIA",
+ "Eri": "NS_SPECIAL",
+ "Arutelu": "NS_TALK",
+ "Kasutaja": "NS_USER",
+ "Kasutaja_arutelu": "NS_USER_TALK",
+ "Pilt": "NS_IMAGE",
+ "Pildi_arutelu": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_arutelu": "NS_MEDIAWIKI_TALK",
+ "Mall": "NS_TEMPLATE",
+ "Malli_arutelu": "NS_TEMPLATE_TALK",
+ "Juhend": "NS_HELP",
+ "Juhendi_arutelu": "NS_HELP_TALK",
+ "Kategooria": "NS_CATEGORY",
+ "Kategooria_arutelu": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_et = [
+ ("", "_arutelu", "NS_PROJECT_TALK"),
+]
+wiki_ns_is = {
+ "Miðill": "NS_MEDIA",
+ "Kerfissíða": "NS_SPECIAL",
+ "Spjall": "NS_TALK",
+ "Notandi": "NS_USER",
+ "Notandaspjall": "NS_USER_TALK",
+ "Mynd": "NS_IMAGE",
+ "Myndaspjall": "NS_IMAGE_TALK",
+ "Melding": "NS_MEDIAWIKI",
+ "Meldingarspjall": "NS_MEDIAWIKI_TALK",
+ "Snið": "NS_TEMPLATE",
+ "Sniðaspjall": "NS_TEMPLATE_TALK",
+ "Hjálp": "NS_HELP",
+ "Hjálparspjall": "NS_HELP_TALK",
+ "Flokkur": "NS_CATEGORY",
+ "Flokkaspjall": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_is = [
+ ("", "spjall", "NS_PROJECT_TALK"),
+]
+wiki_ns_mr = {
+ "मिडिया": "NS_MEDIA",
+ "विशेष": "NS_SPECIAL",
+ "चर्चा": "NS_TALK",
+ "सदस्य": "NS_USER",
+ "सदस्य_चर्चा": "NS_USER_TALK",
+ "चित्र": "NS_IMAGE",
+ "चित्र_चर्चा": "NS_IMAGE_TALK",
+ "मिडियाविकी": "NS_MEDIAWIKI",
+ "मिडियाविकी_चर्चा": "NS_MEDIAWIKI_TALK",
+ "साचा": "NS_TEMPLATE",
+ "साचा_चर्चा": "NS_TEMPLATE_TALK",
+ "साहाय्य": "NS_HELP",
+ "साहाय्य_चर्चा": "NS_HELP_TALK",
+ "वर्ग": "NS_CATEGORY",
+ "वर्ग_चर्चा": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_mr = [
+ ("", "_चर्चा", "NS_PROJECT_TALK"),
+]
+wiki_ns_tyv = {
+ "Медиа": "NS_MEDIA",
+ "Тускай": "NS_SPECIAL",
+ "Чугаа": "NS_TALK",
+ "Aжыглакчы": "NS_USER",
+ "Aжыглакчы_чугаа": "NS_USER_TALK",
+ "Чурук": "NS_IMAGE",
+ "Чурук_чугаа": "NS_IMAGE_TALK",
+ "МедиаВики": "NS_MEDIAWIKI",
+ "МедиаВики_чугаа": "NS_MEDIAWIKI_TALK",
+ "Хээ": "NS_TEMPLATE",
+ "Хээ_чугаа": "NS_TEMPLATE_TALK",
+ "Дуза": "NS_HELP",
+ "Дуза_чугаа": "NS_HELP_TALK",
+ "Бөлүк": "NS_CATEGORY",
+ "Бөлүк_чугаа": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tyv = [
+ ("", "_чугаа", "NS_PROJECT_TALK"),
+]
+wiki_ns_qu = {
+ "Midya": "NS_MEDIA",
+ "Sapaq": "NS_SPECIAL",
+ "Rimanakuy": "NS_TALK",
+ "Ruraq": "NS_USER",
+ "Ruraq_rimanakuy": "NS_USER_TALK",
+ "Rikcha": "NS_IMAGE",
+ "Rikcha_rimanakuy": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_rimanakuy": "NS_MEDIAWIKI_TALK",
+ "Plantilla": "NS_TEMPLATE",
+ "Plantilla_rimanakuy": "NS_TEMPLATE_TALK",
+ "Yanapa": "NS_HELP",
+ "Yanapa_rimanakuy": "NS_HELP_TALK",
+ "Katiguriya": "NS_CATEGORY",
+ "Katiguriya_rimanakuy": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_qu = [
+ ("", "_rimanakuy", "NS_PROJECT_TALK"),
+]
+wiki_ns_frp = {
+ "Mèdia": "NS_MEDIA",
+ "Spèciâl": "NS_SPECIAL",
+ "Discutar": "NS_TALK",
+ "Utilisator": "NS_USER",
+ "Discussion_Utilisator": "NS_USER_TALK",
+ "Émâge": "NS_IMAGE",
+ "Discussion_Émâge": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Modèlo": "NS_TEMPLATE",
+ "Discussion_Modèlo": "NS_TEMPLATE_TALK",
+ "Éde": "NS_HELP",
+ "Discussion_Éde": "NS_HELP_TALK",
+ "Catègorie": "NS_CATEGORY",
+ "Discussion_Catègorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_frp = [
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_kab = {
+ "Media": "NS_MEDIA",
+ "Uslig": "NS_SPECIAL",
+ "Mmeslay": "NS_TALK",
+ "Amseqdac": "NS_USER",
+ "Amyannan_umsqedac": "NS_USER_TALK",
+ "Tugna": "NS_IMAGE",
+ "Amyannan_n_tugna": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Amyannan_n_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Talɣa": "NS_TEMPLATE",
+ "Amyannan_n_talɣa": "NS_TEMPLATE_TALK",
+ "Tallat": "NS_HELP",
+ "Amyannan_n_tallat": "NS_HELP_TALK",
+ "Taggayt": "NS_CATEGORY",
+ "Amyannan_n_taggayt": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kab = [
+ ("Amyannan_n_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_fo = {
+ "Miðil": "NS_MEDIA",
+ "Serstakur": "NS_SPECIAL",
+ "Kjak": "NS_TALK",
+ "Brúkari": "NS_USER",
+ "Brúkari_kjak": "NS_USER_TALK",
+ "Mynd": "NS_IMAGE",
+ "Mynd_kjak": "NS_IMAGE_TALK",
+ "MidiaWiki": "NS_MEDIAWIKI",
+ "MidiaWiki_kjak": "NS_MEDIAWIKI_TALK",
+ "Fyrimynd": "NS_TEMPLATE",
+ "Fyrimynd_kjak": "NS_TEMPLATE_TALK",
+ "Hjálp": "NS_HELP",
+ "Hjálp kjak": "NS_HELP_TALK",
+ "Bólkur": "NS_CATEGORY",
+ "Bólkur_kjak": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fo = [
+ ("", "_kjak", "NS_PROJECT_TALK"),
+]
+wiki_ns_pt_br = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Discussão": "NS_TALK",
+ "Usuário": "NS_USER",
+ "Usuário_Discussão": "NS_USER_TALK",
+ "Imagem": "NS_IMAGE",
+ "Imagem_Discussão": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Discussão": "NS_MEDIAWIKI_TALK",
+ "Predefinição": "NS_TEMPLATE",
+ "Predefinição_Discussão": "NS_TEMPLATE_TALK",
+ "Ajuda": "NS_HELP",
+ "Ajuda_Discussão": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Categoria_Discussão": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pt_br = [
+ ("", "_Discussão", "NS_PROJECT_TALK"),
+]
+wiki_ns_dsb = {
+ "Medija": "NS_MEDIA",
+ "Specialne": "NS_SPECIAL",
+ "Diskusija": "NS_TALK",
+ "Wužywaŕ": "NS_USER",
+ "Diskusija_wužywarja": "NS_USER_TALK",
+ "Wobraz": "NS_IMAGE",
+ "Diskusija_wó_wobrazu": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK",
+ "Pśedłoga": "NS_TEMPLATE",
+ "Diskusija_wó_pśedłoze": "NS_TEMPLATE_TALK",
+ "Pomoc": "NS_HELP",
+ "Diskusija_wó_pomocy": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Diskusija_wó_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_dsb = [
+ ("", "_diskusija", "NS_PROJECT_TALK"),
+]
+wiki_ns_jv = {
+ "Media": "NS_MEDIA",
+ "Astamiwa": "NS_SPECIAL",
+ "Dhiskusi": "NS_TALK",
+ "Panganggo": "NS_USER",
+ "Dhiskusi_Panganggo": "NS_USER_TALK",
+ "Gambar": "NS_IMAGE",
+ "Dhiskusi_Gambar": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Dhiskusi_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Cithakan": "NS_TEMPLATE",
+ "Dhiskusi_Cithakan": "NS_TEMPLATE_TALK",
+ "Pitulung": "NS_HELP",
+ "Dhiskusi_Pitulung": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Dhiskusi_Kategori": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_jv = [
+ ("Dhiskusi_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_vo = {
+ "Nünamakanäd": "NS_MEDIA",
+ "Patikos": "NS_SPECIAL",
+ "Bespik": "NS_TALK",
+ "Geban": "NS_USER",
+ "Gebanibespik": "NS_USER_TALK",
+ "Magod": "NS_IMAGE",
+ "Magodibespik": "NS_IMAGE_TALK",
+ "Sitanuns": "NS_MEDIAWIKI",
+ "Bespik_dö_sitanuns": "NS_MEDIAWIKI_TALK",
+ "Samafomot": "NS_TEMPLATE",
+ "Samafomotibespik": "NS_TEMPLATE_TALK",
+ "Yuf": "NS_HELP",
+ "Yufibespik": "NS_HELP_TALK",
+ "Klad": "NS_CATEGORY",
+ "Kladibespik": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_vo = [
+ ("Bespik_dö_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ka = {
+ "მედია": "NS_MEDIA",
+ "სპეციალური": "NS_SPECIAL",
+ "განხილვა": "NS_TALK",
+ "მომხმარებელი": "NS_USER",
+ "მომხმარებელი_განხილვა": "NS_USER_TALK",
+ "სურათი": "NS_IMAGE",
+ "სურათი_განხილვა": "NS_IMAGE_TALK",
+ "მედიავიკი": "NS_MEDIAWIKI",
+ "მედიავიკი_განხილვა": "NS_MEDIAWIKI_TALK",
+ "თარგი": "NS_TEMPLATE",
+ "თარგი_განხილვა": "NS_TEMPLATE_TALK",
+ "დახმარება": "NS_HELP",
+ "დახმარება_განხილვა": "NS_HELP_TALK",
+ "კატეგორია": "NS_CATEGORY",
+ "კატეგორია_განხილვა": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ka = [
+ ("", "_განხილვა", "NS_PROJECT_TALK"),
+]
+wiki_ns_gn = {
+ "Mba'echĩchĩ": "NS_SPECIAL",
+ "Myangekõi": "NS_TALK",
+ "Puruhára": "NS_USER",
+ "Puruhára_myangekõi": "NS_USER_TALK",
+ "Ta'ãnga": "NS_IMAGE",
+ "Ta'ãnga_myangekõi": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_myangekõi": "NS_MEDIAWIKI_TALK",
+ "Tembiecharã": "NS_TEMPLATE",
+ "Tembiecharã_myangekõi": "NS_TEMPLATE_TALK",
+ "Pytyvõ": "NS_HELP",
+ "Pytyvõ_myangekõi": "NS_HELP_TALK",
+ "Ñemohenda": "NS_CATEGORY",
+ "Ñemohenda_myangekõi": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_gn = [
+ ("", "_myangekõi", "NS_PROJECT_TALK"),
+]
+wiki_ns_sr_el = {
+ "Medija": "NS_MEDIA",
+ "Posebno": "NS_SPECIAL",
+ "Razgovor": "NS_TALK",
+ "Korisnik": "NS_USER",
+ "Razgovor_sa_korisnikom": "NS_USER_TALK",
+ "Slika": "NS_IMAGE",
+ "Razgovor_o_slici": "NS_IMAGE_TALK",
+ "MedijaViki": "NS_MEDIAWIKI",
+ "Razgovor_o_MedijaVikiju": "NS_MEDIAWIKI_TALK",
+ "Šablon": "NS_TEMPLATE",
+ "Razgovor_o_šablonu": "NS_TEMPLATE_TALK",
+ "Pomoć": "NS_HELP",
+ "Razgovor_o_pomoći": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Razgovor_o_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sr_el = [
+ ("Razgovor_o_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_cs = {
+ "Média": "NS_MEDIA",
+ "Speciální": "NS_SPECIAL",
+ "Diskuse": "NS_TALK",
+ "Uživatel": "NS_USER",
+ "Uživatel_diskuse": "NS_USER_TALK",
+ "Soubor": "NS_IMAGE",
+ "Soubor_diskuse": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskuse": "NS_MEDIAWIKI_TALK",
+ "Šablona": "NS_TEMPLATE",
+ "Šablona_diskuse": "NS_TEMPLATE_TALK",
+ "Nápověda": "NS_HELP",
+ "Nápověda_diskuse": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategorie_diskuse": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_cs = [
+ ("", "_diskuse", "NS_PROJECT_TALK"),
+]
+wiki_ns_sc = {
+ "Speciale": "NS_SPECIAL",
+ "Contièndha": "NS_TALK",
+ "Utente": "NS_USER",
+ "Utente_discussioni": "NS_USER_TALK",
+ "Immàgini": "NS_IMAGE",
+ "Immàgini_contièndha": "NS_IMAGE_TALK",
+}
+wiki_ns_re_sc = [
+ ("", "_discussioni", "NS_PROJECT_TALK"),
+]
+wiki_ns_km = {
+ "មេឌា": "NS_MEDIA",
+ "ពិសេស": "NS_SPECIAL",
+ "ការពិភាក្សា": "NS_TALK",
+ "អ្នកប្រើប្រាស់": "NS_USER",
+ "ការពិភាក្សារបស់អ្នកប្រើប្រាស់": "NS_USER_TALK",
+ "រូបភាព": "NS_IMAGE",
+ "ការពិភាក្សាអំពីរូបភាព": "NS_IMAGE_TALK",
+ "មេឌាវិគី": "NS_MEDIAWIKI",
+ "ការពិភាក្សាអំពីមេឌាវិគី": "NS_MEDIAWIKI_TALK",
+ "ទំព័រគំរូ": "NS_TEMPLATE",
+ "ការពិភាក្សាអំពីទំព័រគំរូ": "NS_TEMPLATE_TALK",
+ "ជំនួយ": "NS_HELP",
+ "ការពិភាក្សាអំពីជំនួយ": "NS_HELP_TALK",
+ "ចំណាត់ថ្នាក់ក្រុម": "NS_CATEGORY",
+ "ការពិភាក្សាអំពីចំណាត់ថ្នាក់ក្រុម": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_km = [
+ ("ការពិភាក្សាអំពី", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_sk = {
+ "Médiá": "NS_MEDIA",
+ "Špeciálne": "NS_SPECIAL",
+ "Diskusia": "NS_TALK",
+ "Redaktor": "NS_USER",
+ "Diskusia_s_redaktorom": "NS_USER_TALK",
+ "Obrázok": "NS_IMAGE",
+ "Diskusia_k_obrázku": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Diskusia_k_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Šablóna": "NS_TEMPLATE",
+ "Diskusia_k_šablóne": "NS_TEMPLATE_TALK",
+ "Pomoc": "NS_HELP",
+ "Diskusia_k_pomoci": "NS_HELP_TALK",
+ "Kategória": "NS_CATEGORY",
+ "Diskusia_ku_kategórii": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sk = [
+ ("Diskusia_k_{{grammar:datív|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_bpy = {
+ "মিডিয়া": "NS_MEDIA",
+ "বিশেষ": "NS_SPECIAL",
+ "য়্যারী": "NS_TALK",
+ "আতাকুরা": "NS_USER",
+ "আতাকুরার_য়্যারী": "NS_USER_TALK",
+ "ছবি": "NS_IMAGE",
+ "ছবি_য়্যারী": "NS_IMAGE_TALK",
+ "মিডিয়াউইকি": "NS_MEDIAWIKI",
+ "মিডিয়াউইকির_য়্যারী": "NS_MEDIAWIKI_TALK",
+ "মডেল": "NS_TEMPLATE",
+ "মডেলর_য়্যারী": "NS_TEMPLATE_TALK",
+ "পাংলাক": "NS_HELP",
+ "পাংলাকর_য়্যারী": "NS_HELP_TALK",
+ "থাক": "NS_CATEGORY",
+ "থাকর_য়্যারী": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_bpy = [
+ ("", "_য়্যারী", "NS_PROJECT_TALK"),
+]
+wiki_ns_he = {
+ "מדיה": "NS_MEDIA",
+ "מיוחד": "NS_SPECIAL",
+ "שיחה": "NS_TALK",
+ "משתמש": "NS_USER",
+ "שיחת_משתמש": "NS_USER_TALK",
+ "תמונה": "NS_IMAGE",
+ "שיחת_תמונה": "NS_IMAGE_TALK",
+ "מדיה_ויקי": "NS_MEDIAWIKI",
+ "שיחת_מדיה_ויקי": "NS_MEDIAWIKI_TALK",
+ "תבנית": "NS_TEMPLATE",
+ "שיחת_תבנית": "NS_TEMPLATE_TALK",
+ "עזרה": "NS_HELP",
+ "שיחת_עזרה": "NS_HELP_TALK",
+ "קטגוריה": "NS_CATEGORY",
+ "שיחת_קטגוריה": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_he = [
+ ("שיחת_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_hi = {
+ "Media": "NS_MEDIA",
+ "विशेष": "NS_SPECIAL",
+ "वार्ता": "NS_TALK",
+ "सदस्य": "NS_USER",
+ "सदस्य_वार्ता": "NS_USER_TALK",
+ "चित्र": "NS_IMAGE",
+ "चित्र_वार्ता": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "साँचा": "NS_TEMPLATE",
+ "साँचा_वार्ता": "NS_TEMPLATE_TALK",
+ "श्रेणी": "NS_CATEGORY",
+ "श्रेणी_वार्ता": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_hi = [
+ ("", "_वार्ता", "NS_PROJECT_TALK"),
+]
+wiki_ns_hu = {
+ "Média": "NS_MEDIA",
+ "Speciális": "NS_SPECIAL",
+ "Vita": "NS_TALK",
+ "Szerkesztő": "NS_USER",
+ "Szerkesztővita": "NS_USER_TALK",
+ "Kép": "NS_IMAGE",
+ "Képvita": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki-vita": "NS_MEDIAWIKI_TALK",
+ "Sablon": "NS_TEMPLATE",
+ "Sablonvita": "NS_TEMPLATE_TALK",
+ "Segítség": "NS_HELP",
+ "Segítségvita": "NS_HELP_TALK",
+ "Kategória": "NS_CATEGORY",
+ "Kategóriavita": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_hu = [
+ ("", "-vita", "NS_PROJECT_TALK"),
+]
+wiki_ns_lt = {
+ "Medija": "NS_MEDIA",
+ "Specialus": "NS_SPECIAL",
+ "Aptarimas": "NS_TALK",
+ "Naudotojas": "NS_USER",
+ "Naudotojo_aptarimas": "NS_USER_TALK",
+ "Vaizdas": "NS_IMAGE",
+ "Vaizdo_aptarimas": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_aptarimas": "NS_MEDIAWIKI_TALK",
+ "Šablonas": "NS_TEMPLATE",
+ "Šablono_aptarimas": "NS_TEMPLATE_TALK",
+ "Pagalba": "NS_HELP",
+ "Pagalbos_aptarimas": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Kategorijos_aptarimas": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_lt = [
+ ("", "_aptarimas", "NS_PROJECT_TALK"),
+]
+wiki_ns_hy = {
+ "Մեդիա": "NS_MEDIA",
+ "Սպասարկող": "NS_SPECIAL",
+ "Քննարկում": "NS_TALK",
+ "Մասնակից": "NS_USER",
+ "Մասնակցի_քննարկում": "NS_USER_TALK",
+ "Պատկեր": "NS_IMAGE",
+ "Պատկերի_քննարկում": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_քննարկում": "NS_MEDIAWIKI_TALK",
+ "Կաղապար": "NS_TEMPLATE",
+ "Կաղապարի_քննարկում": "NS_TEMPLATE_TALK",
+ "Օգնություն": "NS_HELP",
+ "Օգնության_քննարկում": "NS_HELP_TALK",
+ "Կատեգորիա": "NS_CATEGORY",
+ "Կատեգորիայի_քննարկում": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_hy = [
+ ("{{GRAMMAR:genitive|", "}}_քննարկում", "NS_PROJECT_TALK"),
+]
+wiki_ns_ps = {
+ "رسنۍ": "NS_MEDIA",
+ "ځانګړی": "NS_SPECIAL",
+ "خبرې_اترې": "NS_TALK",
+ "کارونکی": "NS_USER",
+ "د_کارونکي_خبرې_اترې": "NS_USER_TALK",
+ "انځور": "NS_IMAGE",
+ "د_انځور_خبرې_اترې": "NS_IMAGE_TALK",
+ "ميډياويکي": "NS_MEDIAWIKI",
+ "د_ميډياويکي_خبرې_اترې": "NS_MEDIAWIKI_TALK",
+ "کينډۍ": "NS_TEMPLATE",
+ "د_کينډۍ_خبرې_اترې": "NS_TEMPLATE_TALK",
+ "لارښود": "NS_HELP",
+ "د_لارښود_خبرې_اترې": "NS_HELP_TALK",
+ "وېشنيزه": "NS_CATEGORY",
+ "د_وېشنيزې_خبرې_اترې": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ps = [
+ ("د_", "_خبرې_اترې", "NS_PROJECT_TALK"),
+]
+wiki_ns_ksh = {
+ "Medie": "NS_MEDIA",
+ "Spezial": "NS_SPECIAL",
+ "Klaaf": "NS_TALK",
+ "Metmaacher": "NS_USER",
+ "Metmaacher_Klaaf": "NS_USER_TALK",
+ "Beld": "NS_IMAGE",
+ "Belder_Klaaf": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Klaaf": "NS_MEDIAWIKI_TALK",
+ "Schablon": "NS_TEMPLATE",
+ "Schablone_Klaaf": "NS_TEMPLATE_TALK",
+ "Hölp": "NS_HELP",
+ "Hölp_Klaaf": "NS_HELP_TALK",
+ "Saachjrupp": "NS_CATEGORY",
+ "Saachjrupp_Klaaf": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ksh = [
+ ("", "_Klaaf", "NS_PROJECT_TALK"),
+]
+wiki_ns_tr = {
+ "Media": "NS_MEDIA",
+ "Özel": "NS_SPECIAL",
+ "Tartışma": "NS_TALK",
+ "Kullanıcı": "NS_USER",
+ "Kullanıcı_mesaj": "NS_USER_TALK",
+ "Resim": "NS_IMAGE",
+ "Resim_tartışma": "NS_IMAGE_TALK",
+ "MedyaViki": "NS_MEDIAWIKI",
+ "MedyaViki_tartışma": "NS_MEDIAWIKI_TALK",
+ "Şablon": "NS_TEMPLATE",
+ "Şablon_tartışma": "NS_TEMPLATE_TALK",
+ "Yardım": "NS_HELP",
+ "Yardım_tartışma": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Kategori_tartışma": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tr = [
+ ("", "_tartışma", "NS_PROJECT_TALK"),
+]
+wiki_ns_af = {
+ "Media": "NS_MEDIA",
+ "Spesiaal": "NS_SPECIAL",
+ "Bespreking": "NS_TALK",
+ "Gebruiker": "NS_USER",
+ "Gebruikerbespreking": "NS_USER_TALK",
+ "Beeld": "NS_IMAGE",
+ "Beeldbespreking": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWikibespreking": "NS_MEDIAWIKI_TALK",
+ "Sjabloon": "NS_TEMPLATE",
+ "Sjabloonbespreking": "NS_TEMPLATE_TALK",
+ "Hulp": "NS_HELP",
+ "Hulpbespreking": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategoriebespreking": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_af = [
+ ("", "bespreking", "NS_PROJECT_TALK"),
+]
+wiki_ns_zh_hans = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Talk": "NS_TALK",
+ "User": "NS_USER",
+ "User_talk": "NS_USER_TALK",
+ "Image": "NS_IMAGE",
+ "Image_talk": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Help_talk": "NS_HELP_TALK",
+ "Category": "NS_CATEGORY",
+ "Category_talk": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_zh_hans = [
+ ("", "_talk", "NS_PROJECT_TALK"),
+]
+wiki_ns_id = {
+ "Media": "NS_MEDIA",
+ "Istimewa": "NS_SPECIAL",
+ "Pembicaraan": "NS_TALK",
+ "Pengguna": "NS_USER",
+ "Pembicaraan_Pengguna": "NS_USER_TALK",
+ "Berkas": "NS_IMAGE",
+ "Pembicaraan_Berkas": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Pembicaraan_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Templat": "NS_TEMPLATE",
+ "Pembicaraan_Templat": "NS_TEMPLATE_TALK",
+ "Bantuan": "NS_HELP",
+ "Pembicaraan_Bantuan": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Pembicaraan_Kategori": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_id = [
+ ("Pembicaraan_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_tet = {
+ "Media": "NS_MEDIA",
+ "Espesiál": "NS_SPECIAL",
+ "Diskusaun": "NS_TALK",
+ "Uza-na'in": "NS_USER",
+ "Diskusaun_Uza-na'in": "NS_USER_TALK",
+ "Imajen": "NS_IMAGE",
+ "Diskusaun_Imajen": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Diskusaun_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Diskusaun_Template": "NS_TEMPLATE_TALK",
+ "Ajuda": "NS_HELP",
+ "Diskusaun_Ajuda": "NS_HELP_TALK",
+ "Kategoria": "NS_CATEGORY",
+ "Diskusaun_Kategoria": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tet = [
+ ("Diskusaun_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_an = {
+ "Media": "NS_MEDIA",
+ "Espezial": "NS_SPECIAL",
+ "Descusión": "NS_TALK",
+ "Usuario": "NS_USER",
+ "Descusión_usuario": "NS_USER_TALK",
+ "Imachen": "NS_IMAGE",
+ "Descusión_imachen": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Descusión_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Plantilla": "NS_TEMPLATE",
+ "Descusión_plantilla": "NS_TEMPLATE_TALK",
+ "Aduya": "NS_HELP",
+ "Descusión_aduya": "NS_HELP_TALK",
+ "Categoría": "NS_CATEGORY",
+ "Descusión_categoría": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_an = [
+ ("Descusión_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ar = {
+ "ميديا": "NS_MEDIA",
+ "خاص": "NS_SPECIAL",
+ "نقاش": "NS_TALK",
+ "مستخدم": "NS_USER",
+ "نقاش_المستخدم": "NS_USER_TALK",
+ "صورة": "NS_IMAGE",
+ "نقاش_الصورة": "NS_IMAGE_TALK",
+ "ميدياويكي": "NS_MEDIAWIKI",
+ "نقاش_ميدياويكي": "NS_MEDIAWIKI_TALK",
+ "قالب": "NS_TEMPLATE",
+ "نقاش_القالب": "NS_TEMPLATE_TALK",
+ "مساعدة": "NS_HELP",
+ "نقاش_المساعدة": "NS_HELP_TALK",
+ "تصنيف": "NS_CATEGORY",
+ "نقاش_التصنيف": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ar = [
+ ("نقاش_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_tg_cyrl = {
+ "Медиа": "NS_MEDIA",
+ "Вижа": "NS_SPECIAL",
+ "Баҳс": "NS_TALK",
+ "Корбар": "NS_USER",
+ "Баҳси_корбар": "NS_USER_TALK",
+ "Акс": "NS_IMAGE",
+ "Баҳси_акс": "NS_IMAGE_TALK",
+ "Медиавики": "NS_MEDIAWIKI",
+ "Баҳси_медиавики": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Баҳси_шаблон": "NS_TEMPLATE_TALK",
+ "Роҳнамо": "NS_HELP",
+ "Баҳси_роҳнамо": "NS_HELP_TALK",
+ "Гурӯҳ": "NS_CATEGORY",
+ "Баҳси_гурӯҳ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tg_cyrl = [
+ ("Баҳси_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_rmy = {
+ "Mediya": "NS_MEDIA",
+ "Uzalutno": "NS_SPECIAL",
+ "Vakyarimata": "NS_TALK",
+ "Jeno": "NS_USER",
+ "Jeno_vakyarimata": "NS_USER_TALK",
+ "Chitro": "NS_IMAGE",
+ "Chitro_vakyarimata": "NS_IMAGE_TALK",
+ "MediyaViki": "NS_MEDIAWIKI",
+ "MediyaViki_vakyarimata": "NS_MEDIAWIKI_TALK",
+ "Sikavno": "NS_TEMPLATE",
+ "Sikavno_vakyarimata": "NS_TEMPLATE_TALK",
+ "Zhutipen": "NS_HELP",
+ "Zhutipen_vakyarimata": "NS_HELP_TALK",
+ "Shopni": "NS_CATEGORY",
+ "Shopni_vakyarimata": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_rmy = [
+ ("{{grammar:genitive-pl|", "}}_vakyarimata", "NS_PROJECT_TALK"),
+]
+wiki_ns_mk = {
+ "Медија": "NS_MEDIA",
+ "Специјални": "NS_SPECIAL",
+ "Разговор": "NS_TALK",
+ "Корисник": "NS_USER",
+ "Разговор_со_корисник": "NS_USER_TALK",
+ "Слика": "NS_IMAGE",
+ "Разговор_за_слика": "NS_IMAGE_TALK",
+ "МедијаВики": "NS_MEDIAWIKI",
+ "Разговор_за_МедијаВики": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Разговор_за_шаблон": "NS_TEMPLATE_TALK",
+ "Помош": "NS_HELP",
+ "Разговор_за_помош": "NS_HELP_TALK",
+ "Категорија": "NS_CATEGORY",
+ "Разговор_за_категорија": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_mk = [
+ ("Разговор_за_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_eu = {
+ "Media": "NS_MEDIA",
+ "Aparteko": "NS_SPECIAL",
+ "Eztabaida": "NS_TALK",
+ "Lankide": "NS_USER",
+ "Lankide_eztabaida": "NS_USER_TALK",
+ "Irudi": "NS_IMAGE",
+ "Irudi_eztabaida": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_eztabaida": "NS_MEDIAWIKI_TALK",
+ "Txantiloi": "NS_TEMPLATE",
+ "Txantiloi_eztabaida": "NS_TEMPLATE_TALK",
+ "Laguntza": "NS_HELP",
+ "Laguntza_eztabaida": "NS_HELP_TALK",
+ "Kategoria": "NS_CATEGORY",
+ "Kategoria_eztabaida": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_eu = [
+ ("", "_eztabaida", "NS_PROJECT_TALK"),
+]
+wiki_ns_az = {
+ "Mediya": "NS_MEDIA",
+ "Xüsusi": "NS_SPECIAL",
+ "Müzakirə": "NS_TALK",
+ "İstifadəçi": "NS_USER",
+ "İstifadəçi_müzakirəsi": "NS_USER_TALK",
+ "Şəkil": "NS_IMAGE",
+ "Şəkil_müzakirəsi": "NS_IMAGE_TALK",
+ "MediyaViki": "NS_MEDIAWIKI",
+ "MediyaViki_müzakirəsi": "NS_MEDIAWIKI_TALK",
+ "Şablon": "NS_TEMPLATE",
+ "Şablon_müzakirəsi": "NS_TEMPLATE_TALK",
+ "Kömək": "NS_HELP",
+ "Kömək_müzakirəsi": "NS_HELP_TALK",
+ "Kateqoriya": "NS_CATEGORY",
+ "Kateqoriya_müzakirəsi": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_az = [
+ ("", "_müzakirəsi", "NS_PROJECT_TALK"),
+]
+wiki_ns_bat_smg = {
+ "Specēlos": "NS_SPECIAL",
+ "Aptarėms": "NS_TALK",
+ "Nauduotuos": "NS_USER",
+ "Nauduotuojė_aptarėms": "NS_USER_TALK",
+ "Abruozdielis": "NS_IMAGE",
+ "Abruozdielė_aptarėms": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_aptarėms": "NS_MEDIAWIKI_TALK",
+ "Šabluons": "NS_TEMPLATE",
+ "Šabluona_aptarėms": "NS_TEMPLATE_TALK",
+ "Pagelba": "NS_HELP",
+ "Pagelbas_aptarėms": "NS_HELP_TALK",
+ "Kateguorėjė": "NS_CATEGORY",
+ "Kateguorėjės_aptarėms": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_bat_smg = [
+ ("", "_aptarėms", "NS_PROJECT_TALK"),
+]
+wiki_ns_it = {
+ "Media": "NS_MEDIA",
+ "Speciale": "NS_SPECIAL",
+ "Discussione": "NS_TALK",
+ "Utente": "NS_USER",
+ "Discussioni_utente": "NS_USER_TALK",
+ "Immagine": "NS_IMAGE",
+ "Discussioni_immagine": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussioni_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Discussioni_template": "NS_TEMPLATE_TALK",
+ "Aiuto": "NS_HELP",
+ "Discussioni_aiuto": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Discussioni_categoria": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_it = [
+ ("Discussioni_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ms = {
+ "Media": "NS_MEDIA",
+ "Khas": "NS_SPECIAL",
+ "Perbincangan": "NS_TALK",
+ "Pengguna": "NS_USER",
+ "Perbincangan_Pengguna": "NS_USER_TALK",
+ "Imej": "NS_IMAGE",
+ "Perbincangan_Imej": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Perbincangan_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Templat": "NS_TEMPLATE",
+ "Perbincangan_Templat": "NS_TEMPLATE_TALK",
+ "Bantuan": "NS_HELP",
+ "Perbincangan_Bantuan": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Perbincangan_Kategori": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ms = [
+ ("Perbincangan_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ba = {
+ "Медиа": "NS_MEDIA",
+ "Ярҙамсы": "NS_SPECIAL",
+ "Фекер_алышыу": "NS_TALK",
+ "Ҡатнашыусы": "NS_USER",
+ "Ҡатнашыусы_м-н_фекер_алышыу": "NS_USER_TALK",
+ "Рәсем": "NS_IMAGE",
+ "Рәсем_б-са_фекер_алышыу": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_б-са_фекер_алышыу": "NS_MEDIAWIKI_TALK",
+ "Ҡалып": "NS_TEMPLATE",
+ "Ҡалып_б-са_фекер_алышыу": "NS_TEMPLATE_TALK",
+ "Белешмә": "NS_HELP",
+ "Белешмә_б-са_фекер_алышыу": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Категория_б-са_фекер_алышыу": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ba = [
+ ("", "_б-са_фекер_алышыу", "NS_PROJECT_TALK"),
+]
+wiki_ns_be = {
+ "Мультымедыя": "NS_MEDIA",
+ "Адмысловае": "NS_SPECIAL",
+ "Размовы": "NS_TALK",
+ "Удзельнік": "NS_USER",
+ "Размовы_з_удзельнікам": "NS_USER_TALK",
+ "Выява": "NS_IMAGE",
+ "Размовы_пра_выяву": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Размовы_пра_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Размовы_пра_шаблон": "NS_TEMPLATE_TALK",
+ "Даведка": "NS_HELP",
+ "Размовы_пра_даведку": "NS_HELP_TALK",
+ "Катэгорыя": "NS_CATEGORY",
+ "Размовы_пра_катэгорыю": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_be = [
+ ("", "_размовы", "NS_PROJECT_TALK"),
+]
+wiki_ns_crh_cyrl = {
+ "Медиа": "NS_MEDIA",
+ "Махсус": "NS_SPECIAL",
+ "Музакере": "NS_TALK",
+ "Къулланыджы": "NS_USER",
+ "Къулланыджы_музакереси": "NS_USER_TALK",
+ "Ресим": "NS_IMAGE",
+ "Ресим_музакереси": "NS_IMAGE_TALK",
+ "МедиаВики": "NS_MEDIAWIKI",
+ "МедиаВики_музакереси": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблон_музакереси": "NS_TEMPLATE_TALK",
+ "Ярдым": "NS_HELP",
+ "Ярдым_музакереси": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Категория_музакереси": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_crh_cyrl = [
+ ("", "_музакереси", "NS_PROJECT_TALK"),
+]
+wiki_ns_nn = {
+ "Filpeikar": "NS_MEDIA",
+ "Spesial": "NS_SPECIAL",
+ "Diskusjon": "NS_TALK",
+ "Brukar": "NS_USER",
+ "Brukardiskusjon": "NS_USER_TALK",
+ "Fil": "NS_IMAGE",
+ "Fildiskusjon": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki-diskusjon": "NS_MEDIAWIKI_TALK",
+ "Mal": "NS_TEMPLATE",
+ "Maldiskusjon": "NS_TEMPLATE_TALK",
+ "Hjelp": "NS_HELP",
+ "Hjelpdiskusjon": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Kategoridiskusjon": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_nn = [
+ ("", "-diskusjon", "NS_PROJECT_TALK"),
+]
+wiki_ns_nv = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Naaltsoos_baa_yinísht'į́": "NS_TALK",
+ "Choinish'įįhí": "NS_USER",
+ "Choinish'įįhí_baa_yinísht'į́": "NS_USER_TALK",
+ "E'elyaaígíí": "NS_IMAGE",
+ "E'elyaaígíí_baa_yinísht'į́": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_baa_yinísht'į́": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "Aná'álwo'": "NS_HELP",
+ "Aná'álwo'_baa_yinísht'į́": "NS_HELP_TALK",
+ "T'ááłáhági_át'éego": "NS_CATEGORY",
+ "T'ááłáhági_át'éego_baa_yinísht'į́": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_nv = [
+ ("", "_baa_yinísht'į́", "NS_PROJECT_TALK"),
+]
+wiki_ns_ru = {
+ "Медиа": "NS_MEDIA",
+ "Служебная": "NS_SPECIAL",
+ "Обсуждение": "NS_TALK",
+ "Участник": "NS_USER",
+ "Обсуждение_участника": "NS_USER_TALK",
+ "Изображение": "NS_IMAGE",
+ "Обсуждение_изображения": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Обсуждение_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Обсуждение_шаблона": "NS_TEMPLATE_TALK",
+ "Справка": "NS_HELP",
+ "Обсуждение_справки": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Обсуждение_категории": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ru = [
+ ("Обсуждение_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_crh_latn = {
+ "Media": "NS_MEDIA",
+ "Mahsus": "NS_SPECIAL",
+ "Muzakere": "NS_TALK",
+ "Qullanıcı": "NS_USER",
+ "Qullanıcı_muzakeresi": "NS_USER_TALK",
+ "Resim": "NS_IMAGE",
+ "Resim_muzakeresi": "NS_IMAGE_TALK",
+ "MediaViki": "NS_MEDIAWIKI",
+ "MediaViki_muzakeresi": "NS_MEDIAWIKI_TALK",
+ "Şablon": "NS_TEMPLATE",
+ "Şablon_muzakeresi": "NS_TEMPLATE_TALK",
+ "Yardım": "NS_HELP",
+ "Yardım_muzakeresi": "NS_HELP_TALK",
+ "Kategoriya": "NS_CATEGORY",
+ "Kategoriya_muzakeresi": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_crh_latn = [
+ ("", "_muzakeresi", "NS_PROJECT_TALK"),
+]
+wiki_ns_be_tarask = {
+ "Мэдыя": "NS_MEDIA",
+ "Спэцыяльныя": "NS_SPECIAL",
+ "Абмеркаваньне": "NS_TALK",
+ "Удзельнік": "NS_USER",
+ "Гутаркі_ўдзельніка": "NS_USER_TALK",
+ "Выява": "NS_IMAGE",
+ "Абмеркаваньне_выявы": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Абмеркаваньне_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Шаблён": "NS_TEMPLATE",
+ "Абмеркаваньне_шаблёну": "NS_TEMPLATE_TALK",
+ "Дапамога": "NS_HELP",
+ "Абмеркаваньне_дапамогі": "NS_HELP_TALK",
+ "Катэгорыя": "NS_CATEGORY",
+ "Абмеркаваньне_катэгорыі": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_be_tarask = [
+ ("Абмеркаваньне_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_yue = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Talk": "NS_TALK",
+ "User": "NS_USER",
+ "User_talk": "NS_USER_TALK",
+ "Image": "NS_IMAGE",
+ "Image_talk": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Help_talk": "NS_HELP_TALK",
+ "Category": "NS_CATEGORY",
+ "Category_talk": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_yue = [
+ ("", "_talk", "NS_PROJECT_TALK"),
+]
+wiki_ns_kn = {
+ "ಮೀಡಿಯ": "NS_MEDIA",
+ "ವಿಶೇಷ": "NS_SPECIAL",
+ "ಚರ್ಚೆಪುಟ": "NS_TALK",
+ "ಸದಸ್ಯ": "NS_USER",
+ "ಸದಸ್ಯರ_ಚರ್ಚೆಪುಟ": "NS_USER_TALK",
+ "ಚಿತ್ರ": "NS_IMAGE",
+ "ಚಿತ್ರ_ಚರ್ಚೆಪುಟ": "NS_IMAGE_TALK",
+ "ಮೀಡಿಯವಿಕಿ": "NS_MEDIAWIKI",
+ "ಮೀಡೀಯವಿಕಿ_ಚರ್ಚೆ": "NS_MEDIAWIKI_TALK",
+ "ಟೆಂಪ್ಲೇಟು": "NS_TEMPLATE",
+ "ಟೆಂಪ್ಲೇಟು_ಚರ್ಚೆ": "NS_TEMPLATE_TALK",
+ "ಸಹಾಯ": "NS_HELP",
+ "ಸಹಾಯ_ಚರ್ಚೆ": "NS_HELP_TALK",
+ "ವರ್ಗ": "NS_CATEGORY",
+ "ವರ್ಗ_ಚರ್ಚೆ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kn = [
+ ("", "_ಚರ್ಚೆ", "NS_PROJECT_TALK"),
+]
+wiki_ns_sl = {
+ "Media": "NS_MEDIA",
+ "Posebno": "NS_SPECIAL",
+ "Pogovor": "NS_TALK",
+ "Uporabnik": "NS_USER",
+ "Uporabniški_pogovor": "NS_USER_TALK",
+ "Slika": "NS_IMAGE",
+ "Pogovor_o_sliki": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Pogovor_o_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Predloga": "NS_TEMPLATE",
+ "Pogovor_o_predlogi": "NS_TEMPLATE_TALK",
+ "Pomoč": "NS_HELP",
+ "Pogovor_o_pomoči": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Pogovor_o_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sl = [
+ ("Pogovor_{{grammar:mestnik|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_nds = {
+ "Media": "NS_MEDIA",
+ "Spezial": "NS_SPECIAL",
+ "Diskuschoon": "NS_TALK",
+ "Bruker": "NS_USER",
+ "Bruker_Diskuschoon": "NS_USER_TALK",
+ "Bild": "NS_IMAGE",
+ "Bild_Diskuschoon": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Diskuschoon": "NS_MEDIAWIKI_TALK",
+ "Vörlaag": "NS_TEMPLATE",
+ "Vörlaag_Diskuschoon": "NS_TEMPLATE_TALK",
+ "Hülp": "NS_HELP",
+ "Hülp_Diskuschoon": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategorie_Diskuschoon": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_nds = [
+ ("", "_Diskuschoon", "NS_PROJECT_TALK"),
+]
+wiki_ns_tlh = {
+ "Doch": "NS_MEDIA",
+ "le'": "NS_SPECIAL",
+ "ja'chuq": "NS_TALK",
+ "lo'wI'": "NS_USER",
+ "lo'wI'_ja'chuq": "NS_USER_TALK",
+ "nagh_beQ": "NS_IMAGE",
+ "nagh_beQ_ja'chuq": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_ja'chuq": "NS_MEDIAWIKI_TALK",
+ "chen'ay'": "NS_TEMPLATE",
+ "chen'ay'_ja'chuq": "NS_TEMPLATE_TALK",
+ "QaH": "NS_HELP",
+ "QaH_ja'chuq": "NS_HELP_TALK",
+ "Segh": "NS_CATEGORY",
+ "Segh_ja'chuq": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tlh = [
+ ("", "_ja'chuq", "NS_PROJECT_TALK"),
+]
+wiki_ns_la = {
+ "Specialis": "NS_SPECIAL",
+ "Disputatio": "NS_TALK",
+ "Usor": "NS_USER",
+ "Disputatio_Usoris": "NS_USER_TALK",
+ "Imago": "NS_IMAGE",
+ "Disputatio_Imaginis": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Disputatio_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Formula": "NS_TEMPLATE",
+ "Disputatio_Formulae": "NS_TEMPLATE_TALK",
+ "Auxilium": "NS_HELP",
+ "Disputatio_Auxilii": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Disputatio_Categoriae": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_la = [
+ ("Disputatio_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_li = {
+ "Media": "NS_MEDIA",
+ "Speciaal": "NS_SPECIAL",
+ "Euverlèk": "NS_TALK",
+ "Gebroeker": "NS_USER",
+ "Euverlèk_gebroeker": "NS_USER_TALK",
+ "Plaetje": "NS_IMAGE",
+ "Euverlèk_plaetje": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Euverlèk_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Sjabloon": "NS_TEMPLATE",
+ "Euverlèk_sjabloon": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Euverlèk_help": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Euverlèk_categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_li = [
+ ("Euverlèk_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_hr = {
+ "Mediji": "NS_MEDIA",
+ "Posebno": "NS_SPECIAL",
+ "Razgovor": "NS_TALK",
+ "Suradnik": "NS_USER",
+ "Razgovor_sa_suradnikom": "NS_USER_TALK",
+ "Slika": "NS_IMAGE",
+ "Razgovor_o_slici": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_razgovor": "NS_MEDIAWIKI_TALK",
+ "Predložak": "NS_TEMPLATE",
+ "Razgovor_o_predlošku": "NS_TEMPLATE_TALK",
+ "Pomoć": "NS_HELP",
+ "Razgovor_o_pomoći": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Razgovor_o_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_hr = [
+ ("Razgovor_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_pl = {
+ "Media": "NS_MEDIA",
+ "Specjalna": "NS_SPECIAL",
+ "Dyskusja": "NS_TALK",
+ "Użytkownik": "NS_USER",
+ "Dyskusja_użytkownika": "NS_USER_TALK",
+ "Grafika": "NS_IMAGE",
+ "Dyskusja_grafiki": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Dyskusja_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Szablon": "NS_TEMPLATE",
+ "Dyskusja_szablonu": "NS_TEMPLATE_TALK",
+ "Pomoc": "NS_HELP",
+ "Dyskusja_pomocy": "NS_HELP_TALK",
+ "Kategoria": "NS_CATEGORY",
+ "Dyskusja_kategorii": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pl = [
+ ("Dyskusja_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_nds_nl = {
+ "Media": "NS_MEDIA",
+ "Speciaal": "NS_SPECIAL",
+ "Overleg": "NS_TALK",
+ "Gebruker": "NS_USER",
+ "Overleg_gebruker": "NS_USER_TALK",
+ "Ofbeelding": "NS_IMAGE",
+ "Overleg_ofbeelding": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Sjabloon": "NS_TEMPLATE",
+ "Overleg_sjabloon": "NS_TEMPLATE_TALK",
+ "Hulpe": "NS_HELP",
+ "Overleg_hulpe": "NS_HELP_TALK",
+ "Kattegerie": "NS_CATEGORY",
+ "Overleg_kattegerie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_nds_nl = [
+ ("Overleg_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_pt = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Discussão": "NS_TALK",
+ "Usuário": "NS_USER",
+ "Usuário_Discussão": "NS_USER_TALK",
+ "Imagem": "NS_IMAGE",
+ "Imagem_Discussão": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Discussão": "NS_MEDIAWIKI_TALK",
+ "Predefinição": "NS_TEMPLATE",
+ "Predefinição_Discussão": "NS_TEMPLATE_TALK",
+ "Ajuda": "NS_HELP",
+ "Ajuda_Discussão": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Categoria_Discussão": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pt = [
+ ("", "_Discussão", "NS_PROJECT_TALK"),
+]
+wiki_ns_xal = {
+ "Аһар": "NS_MEDIA",
+ "Көдлхнə": "NS_SPECIAL",
+ "Ухалвр": "NS_TALK",
+ "Орлцач": "NS_USER",
+ "Орлцачна_тускар_ухалвр": "NS_USER_TALK",
+ "Зург": "NS_IMAGE",
+ "Зургин_тускар_ухалвр": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_тускар_ухалвр": "NS_MEDIAWIKI_TALK",
+ "Зура": "NS_TEMPLATE",
+ "Зуран_тускар_ухалвр": "NS_TEMPLATE_TALK",
+ "Цəəлһлһн": "NS_HELP",
+ "Цəəлһлһин_тускар_ухалвр": "NS_HELP_TALK",
+ "Янз": "NS_CATEGORY",
+ "Янзин_тускар_ухалвр": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_xal = [
+ ("", "_тускар_ухалвр", "NS_PROJECT_TALK"),
+]
+wiki_ns_ast = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Alderique": "NS_TALK",
+ "Usuariu": "NS_USER",
+ "Usuariu_alderique": "NS_USER_TALK",
+ "Imaxe": "NS_IMAGE",
+ "Imaxe_alderique": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_alderique": "NS_MEDIAWIKI_TALK",
+ "Plantía": "NS_TEMPLATE",
+ "Plantía_alderique": "NS_TEMPLATE_TALK",
+ "Aida": "NS_HELP",
+ "Aida_alderique": "NS_HELP_TALK",
+ "Categoría": "NS_CATEGORY",
+ "Categoría_alderique": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ast = [
+ ("", "_alderique", "NS_PROJECT_TALK"),
+]
+wiki_ns_ia = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Discussion": "NS_TALK",
+ "Usator": "NS_USER",
+ "Discussion_Usator": "NS_USER_TALK",
+ "Imagine": "NS_IMAGE",
+ "Discussion_Imagine": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Patrono": "NS_TEMPLATE",
+ "Discussion_Patrono": "NS_TEMPLATE_TALK",
+ "Adjuta": "NS_HELP",
+ "Discussion_Adjuta": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Discussion_Categoria": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ia = [
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_kk_arab = {
+ "تاسپا": "NS_MEDIA",
+ "ارنايى": "NS_SPECIAL",
+ "تالقىلاۋ": "NS_TALK",
+ "قاتىسۋشى": "NS_USER",
+ "قاتىسۋشى_تالقىلاۋى": "NS_USER_TALK",
+ "سۋرەت": "NS_IMAGE",
+ "سۋرەت_تالقىلاۋى": "NS_IMAGE_TALK",
+ "مەدىياۋىيكىي": "NS_MEDIAWIKI",
+ "مەدىياۋىيكىي_تالقىلاۋى": "NS_MEDIAWIKI_TALK",
+ "ۇلگى": "NS_TEMPLATE",
+ "ۇلگى_تالقىلاۋى": "NS_TEMPLATE_TALK",
+ "انىقتاما": "NS_HELP",
+ "انىقتاما_تالقىلاۋى": "NS_HELP_TALK",
+ "سانات": "NS_CATEGORY",
+ "سانات_تالقىلاۋى": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kk_arab = [
+ ("", "_تالقىلاۋى", "NS_PROJECT_TALK"),
+]
+wiki_ns_zh_hant = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Talk": "NS_TALK",
+ "User": "NS_USER",
+ "User_talk": "NS_USER_TALK",
+ "Image": "NS_IMAGE",
+ "Image_talk": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Help_talk": "NS_HELP_TALK",
+ "Category": "NS_CATEGORY",
+ "Category_talk": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_zh_hant = [
+ ("", "_talk", "NS_PROJECT_TALK"),
+]
+wiki_ns_fur = {
+ "Media": "NS_MEDIA",
+ "Speciâl": "NS_SPECIAL",
+ "Discussion": "NS_TALK",
+ "Utent": "NS_USER",
+ "Discussion_utent": "NS_USER_TALK",
+ "Figure": "NS_IMAGE",
+ "Discussion_figure": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Model": "NS_TEMPLATE",
+ "Discussion_model": "NS_TEMPLATE_TALK",
+ "Jutori": "NS_HELP",
+ "Discussion_jutori": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Discussion_categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fur = [
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_en = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Talk": "NS_TALK",
+ "User": "NS_USER",
+ "User_talk": "NS_USER_TALK",
+ "Image": "NS_IMAGE",
+ "Image_talk": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Help_talk": "NS_HELP_TALK",
+ "Category": "NS_CATEGORY",
+ "Category_talk": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_en = [
+ ("", "_talk", "NS_PROJECT_TALK"),
+]
+wiki_ns_lbe = {
+ "Медиа": "NS_MEDIA",
+ "Къуллугъирал_лажин": "NS_SPECIAL",
+ "Ихтилат": "NS_TALK",
+ "Гьуртту_хьума": "NS_USER",
+ "Гьуртту_хьуминнал_ихтилат": "NS_USER_TALK",
+ "Сурат": "NS_IMAGE",
+ "Суратраясса_ихтилат": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWikiлиясса_ихтилат": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблондалиясса_ихтилат": "NS_TEMPLATE_TALK",
+ "Кумаг": "NS_HELP",
+ "Кумаграясса_ихтилат": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Категориялиясса_ихтилат": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_lbe = [
+ ("", "лиясса_ихтилат", "NS_PROJECT_TALK"),
+]
+wiki_ns_ml = {
+ "മീഡിയ": "NS_MEDIA",
+ "പ്രത്യേകം": "NS_SPECIAL",
+ "സംവാദം": "NS_TALK",
+ "ഉപയോക്താവ്": "NS_USER",
+ "ഉപയോക്താവിന്റെ_സംവാദം": "NS_USER_TALK",
+ "ചിത്രം": "NS_IMAGE",
+ "ചിത്രത്തിന്റെ_സംവാദം": "NS_IMAGE_TALK",
+ "മീഡിയവിക്കി": "NS_MEDIAWIKI",
+ "മീഡിയവിക്കി_സംവാദം": "NS_MEDIAWIKI_TALK",
+ "ഫലകം": "NS_TEMPLATE",
+ "ഫലകത്തിന്റെ_സംവാദം": "NS_TEMPLATE_TALK",
+ "വിഭാഗം": "NS_CATEGORY",
+ "വിഭാഗത്തിന്റെ_സംവാദം": "NS_CATEGORY_TALK",
+ "സഹായം": "NS_HELP",
+ "സഹായത്തിന്റെ_സംവാദം": "NS_HELP_TALK",
+}
+wiki_ns_re_ml = [
+ ("", "_സംവാദം", "NS_PROJECT_TALK"),
+]
+wiki_ns_fiu_vro = {
+ "Meediä": "NS_MEDIA",
+ "Tallituslehekülg": "NS_SPECIAL",
+ "Arotus": "NS_TALK",
+ "Pruukja": "NS_USER",
+ "Pruukja_arotus": "NS_USER_TALK",
+ "Pilt": "NS_IMAGE",
+ "Pildi_arotus": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_arotus": "NS_MEDIAWIKI_TALK",
+ "Näüdüs": "NS_TEMPLATE",
+ "Näüdüse_arotus": "NS_TEMPLATE_TALK",
+ "Oppus": "NS_HELP",
+ "Oppusõ_arotus": "NS_HELP_TALK",
+ "Katõgooria": "NS_CATEGORY",
+ "Katõgooria_arotus": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fiu_vro = [
+ ("", "_arotus", "NS_PROJECT_TALK"),
+]
+wiki_ns_yi = {
+ "מעדיע": "NS_MEDIA",
+ "באַזונדער": "NS_SPECIAL",
+ "רעדן": "NS_TALK",
+ "באַניצער": "NS_USER",
+ "באַניצער_רעדן": "NS_USER_TALK",
+ "בילד": "NS_IMAGE",
+ "בילד_רעדן": "NS_IMAGE_TALK",
+ "מעדיעװיקי": "NS_MEDIAWIKI",
+ "מעדיעװיקי_רעדן": "NS_MEDIAWIKI_TALK",
+ "מוסטער": "NS_TEMPLATE",
+ "מוסטער_רעדן": "NS_TEMPLATE_TALK",
+ "הילף": "NS_HELP",
+ "הילף_רעדן": "NS_HELP_TALK",
+ "קאַטעגאָריע": "NS_CATEGORY",
+ "קאַטעגאָריע_רעדן": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_yi = [
+ ("", "_רעדן", "NS_PROJECT_TALK"),
+]
+wiki_ns_udm = {
+ "Медиа": "NS_MEDIA",
+ "Панель": "NS_SPECIAL",
+ "Вераськон": "NS_TALK",
+ "Викиавтор": "NS_USER",
+ "Викиавтор_сярысь_вераськон": "NS_USER_TALK",
+ "Суред": "NS_IMAGE",
+ "Суред_сярысь_вераськон": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_сярысь_вераськон": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблон_сярысь_вераськон": "NS_TEMPLATE_TALK",
+ "Валэктон": "NS_HELP",
+ "Валэктон_сярысь_вераськон": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Категория_сярысь_вераськон": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_udm = [
+ ("", "_сярысь_вераськон", "NS_PROJECT_TALK"),
+]
+wiki_ns_ur = {
+ "زریعہ": "NS_MEDIA",
+ "خاص": "NS_SPECIAL",
+ "تبادلۂ_خیال": "NS_TALK",
+ "صارف": "NS_USER",
+ "تبادلۂ_خیال_صارف": "NS_USER_TALK",
+ "تصویر": "NS_IMAGE",
+ "تبادلۂ_خیال_تصویر": "NS_IMAGE_TALK",
+ "میڈیاوکی": "NS_MEDIAWIKI",
+ "تبادلۂ_خیال_میڈیاوکی": "NS_MEDIAWIKI_TALK",
+ "سانچہ": "NS_TEMPLATE",
+ "تبادلۂ_خیال_سانچہ": "NS_TEMPLATE_TALK",
+ "معاونت": "NS_HELP",
+ "تبادلۂ_خیال_معاونت": "NS_HELP_TALK",
+ "زمرہ": "NS_CATEGORY",
+ "تبادلۂ_خیال_زمرہ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ur = [
+ ("تبادلۂ_خیال_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_fa = {
+ "مدیا": "NS_MEDIA",
+ "ویژه": "NS_SPECIAL",
+ "بحث": "NS_TALK",
+ "کاربر": "NS_USER",
+ "بحث_کاربر": "NS_USER_TALK",
+ "تصویر": "NS_IMAGE",
+ "بحث_تصویر": "NS_IMAGE_TALK",
+ "مدیاویکی": "NS_MEDIAWIKI",
+ "بحث_مدیاویکی": "NS_MEDIAWIKI_TALK",
+ "الگو": "NS_TEMPLATE",
+ "بحث_الگو": "NS_TEMPLATE_TALK",
+ "راهنما": "NS_HELP",
+ "بحث_راهنما": "NS_HELP_TALK",
+ "رده": "NS_CATEGORY",
+ "بحث_رده": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fa = [
+ ("بحث_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ku_latn = {
+ "Medya": "NS_MEDIA",
+ "Taybet": "NS_SPECIAL",
+ "Nîqaş": "NS_TALK",
+ "Bikarhêner": "NS_USER",
+ "Bikarhêner_nîqaş": "NS_USER_TALK",
+ "Wêne": "NS_IMAGE",
+ "Wêne_nîqaş": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_nîqaş": "NS_MEDIAWIKI_TALK",
+ "Şablon": "NS_TEMPLATE",
+ "Şablon_nîqaş": "NS_TEMPLATE_TALK",
+ "Alîkarî": "NS_HELP",
+ "Alîkarî_nîqaş": "NS_HELP_TALK",
+ "Kategorî": "NS_CATEGORY",
+ "Kategorî_nîqaş": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ku_latn = [
+ ("", "_nîqaş", "NS_PROJECT_TALK"),
+]
+wiki_ns_uz = {
+ "Media": "NS_MEDIA",
+ "Maxsus": "NS_SPECIAL",
+ "Munozara": "NS_TALK",
+ "Foydalanuvchi": "NS_USER",
+ "Foydalanuvchi_munozarasi": "NS_USER_TALK",
+ "Tasvir": "NS_IMAGE",
+ "Tasvir_munozarasi": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_munozarasi": "NS_MEDIAWIKI_TALK",
+ "Andoza": "NS_TEMPLATE",
+ "Andoza_munozarasi": "NS_TEMPLATE_TALK",
+ "Yordam": "NS_HELP",
+ "Yordam_munozarasi": "NS_HELP_TALK",
+ "Turkum": "NS_CATEGORY",
+ "Turkum_munozarasi": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_uz = [
+ ("", "_munozarasi", "NS_PROJECT_TALK"),
+]
+wiki_ns_fi = {
+ "Media": "NS_MEDIA",
+ "Toiminnot": "NS_SPECIAL",
+ "Keskustelu": "NS_TALK",
+ "Käyttäjä": "NS_USER",
+ "Keskustelu_käyttäjästä": "NS_USER_TALK",
+ "Kuva": "NS_IMAGE",
+ "Keskustelu_kuvasta": "NS_IMAGE_TALK",
+ "Järjestelmäviesti": "NS_MEDIAWIKI",
+ "Keskustelu_järjestelmäviestistä": "NS_MEDIAWIKI_TALK",
+ "Malline": "NS_TEMPLATE",
+ "Keskustelu_mallineesta": "NS_TEMPLATE_TALK",
+ "Ohje": "NS_HELP",
+ "Keskustelu_ohjeesta": "NS_HELP_TALK",
+ "Luokka": "NS_CATEGORY",
+ "Keskustelu_luokasta": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fi = [
+ ("Keskustelu_{{grammar:elative|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_bn = {
+ "বিশেষ": "NS_SPECIAL",
+ "আলাপ": "NS_TALK",
+ "ব্যবহারকারী": "NS_USER",
+ "ব্যবহারকারী_আলাপ": "NS_USER_TALK",
+ "চিত্র": "NS_IMAGE",
+ "চিত্র_আলাপ": "NS_IMAGE_TALK",
+ "MediaWiki_আলাপ": "NS_MEDIAWIKI_TALK",
+}
+wiki_ns_re_bn = [
+ ("", "_আলাপ", "NS_PROJECT_TALK"),
+]
+wiki_ns_pnt = {
+ "Μέσον": "NS_MEDIA",
+ "Ειδικόν": "NS_SPECIAL",
+ "Καλάτσεμαν": "NS_TALK",
+ "Χρήστες": "NS_USER",
+ "Καλάτσεμαν_χρήστε": "NS_USER_TALK",
+ "Εικόναν": "NS_IMAGE",
+ "Καλάτσεμαν_εικόνας": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Πρότυπον": "NS_TEMPLATE",
+ "Καλάτσεμαν_πρότυπι": "NS_TEMPLATE_TALK",
+ "Βοήθειαν": "NS_HELP",
+ "Καλάτσεμαν_βοήθειας": "NS_HELP_TALK",
+ "Κατηγορίαν": "NS_CATEGORY",
+ "Καλάτσεμαν_κατηγορίας": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pnt = [
+ ("", "_καλάτσεμαν", "NS_PROJECT_TALK"),
+]
+wiki_ns_br = {
+ "Media": "NS_MEDIA",
+ "Dibar": "NS_SPECIAL",
+ "Kaozeal": "NS_TALK",
+ "Implijer": "NS_USER",
+ "Kaozeadenn_Implijer": "NS_USER_TALK",
+ "Skeudenn": "NS_IMAGE",
+ "Kaozeadenn_Skeudenn": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Kaozeadenn_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Patrom": "NS_TEMPLATE",
+ "Kaozeadenn_Patrom": "NS_TEMPLATE_TALK",
+ "Skoazell": "NS_HELP",
+ "Kaozeadenn_Skoazell": "NS_HELP_TALK",
+ "Rummad": "NS_CATEGORY",
+ "Kaozeadenn_Rummad": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_br = [
+ ("Kaozeadenn_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_hsb = {
+ "Media": "NS_MEDIA",
+ "Specialnje": "NS_SPECIAL",
+ "Diskusija": "NS_TALK",
+ "Wužiwar": "NS_USER",
+ "Diskusija_z_wužiwarjom": "NS_USER_TALK",
+ "Wobraz": "NS_IMAGE",
+ "Diskusija_k_wobrazej": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK",
+ "Předłoha": "NS_TEMPLATE",
+ "Diskusija_k_předłoze": "NS_TEMPLATE_TALK",
+ "Pomoc": "NS_HELP",
+ "Pomoc_diskusija": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Diskusija_ke_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_hsb = [
+ ("", "_diskusija", "NS_PROJECT_TALK"),
+]
+wiki_ns_no = {
+ "Medium": "NS_MEDIA",
+ "Spesial": "NS_SPECIAL",
+ "Diskusjon": "NS_TALK",
+ "Bruker": "NS_USER",
+ "Brukerdiskusjon": "NS_USER_TALK",
+ "Bilde": "NS_IMAGE",
+ "Bildediskusjon": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki-diskusjon": "NS_MEDIAWIKI_TALK",
+ "Mal": "NS_TEMPLATE",
+ "Maldiskusjon": "NS_TEMPLATE_TALK",
+ "Hjelp": "NS_HELP",
+ "Hjelpdiskusjon": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Kategoridiskusjon": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_no = [
+ ("", "-diskusjon", "NS_PROJECT_TALK"),
+]
+wiki_ns_vi = {
+ "Phương_tiện": "NS_MEDIA",
+ "Đặc_biệt": "NS_SPECIAL",
+ "Thảo_luận": "NS_TALK",
+ "Thành_viên": "NS_USER",
+ "Thảo_luận_Thành_viên": "NS_USER_TALK",
+ "Hình": "NS_IMAGE",
+ "Thảo_luận_Hình": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Thảo_luận_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Tiêu_bản": "NS_TEMPLATE",
+ "Thảo_luận_Tiêu_bản": "NS_TEMPLATE_TALK",
+ "Trợ_giúp": "NS_HELP",
+ "Thảo_luận_Trợ_giúp": "NS_HELP_TALK",
+ "Thể_loại": "NS_CATEGORY",
+ "Thảo_luận_Thể_loại": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_vi = [
+ ("Thảo_luận_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_fy = {
+ "Media": "NS_MEDIA",
+ "Wiki": "NS_SPECIAL",
+ "Oerlis": "NS_TALK",
+ "Meidogger": "NS_USER",
+ "Meidogger_oerlis": "NS_USER_TALK",
+ "Ofbyld": "NS_IMAGE",
+ "Ofbyld_oerlis": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_oerlis": "NS_MEDIAWIKI_TALK",
+ "Berjocht": "NS_TEMPLATE",
+ "Berjocht_oerlis": "NS_TEMPLATE_TALK",
+ "Hulp": "NS_HELP",
+ "Hulp_oerlis": "NS_HELP_TALK",
+ "Kategory": "NS_CATEGORY",
+ "Kategory_oerlis": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fy = [
+ ("", "_oerlis", "NS_PROJECT_TALK"),
+]
+wiki_ns_ca = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Discussió": "NS_TALK",
+ "Usuari": "NS_USER",
+ "Usuari_Discussió": "NS_USER_TALK",
+ "Imatge": "NS_IMAGE",
+ "Imatge_Discussió": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Discussió": "NS_MEDIAWIKI_TALK",
+ "Plantilla": "NS_TEMPLATE",
+ "Plantilla_Discussió": "NS_TEMPLATE_TALK",
+ "Ajuda": "NS_HELP",
+ "Ajuda_Discussió": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Categoria_Discussió": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ca = [
+ ("", "_Discussió", "NS_PROJECT_TALK"),
+]
+wiki_ns_ce = {
+ "Медйа": "NS_MEDIA",
+ "Башхо": "NS_SPECIAL",
+ "Дийца": "NS_TALK",
+ "Юзер": "NS_USER",
+ "Юзери_дийца": "NS_USER_TALK",
+ "Сурт": "NS_IMAGE",
+ "Сурти_дийца": "NS_IMAGE_TALK",
+ "МедйаВики": "NS_MEDIAWIKI",
+ "МедйаВики_дийца": "NS_MEDIAWIKI_TALK",
+ "Дакъа": "NS_TEMPLATE",
+ "Дакъан_дийца": "NS_TEMPLATE_TALK",
+ "ГІо": "NS_HELP",
+ "ГІодан_дийца": "NS_HELP_TALK",
+ "Тоба": "NS_CATEGORY",
+ "Тобан_дийца": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ce = [
+ ("", "_Дийца", "NS_PROJECT_TALK"),
+]
+wiki_ns_gl = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Conversa": "NS_TALK",
+ "Usuario": "NS_USER",
+ "Conversa_Usuario": "NS_USER_TALK",
+ "Imaxe": "NS_IMAGE",
+ "Conversa_Imaxe": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Conversa_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Modelo": "NS_TEMPLATE",
+ "Conversa_Modelo": "NS_TEMPLATE_TALK",
+ "Axuda": "NS_HELP",
+ "Conversa_Axuda": "NS_HELP_TALK",
+ "Categoría": "NS_CATEGORY",
+ "Conversa_Categoría": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_gl = [
+ ("Conversa_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_sa = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "संभाषणं": "NS_TALK",
+ "योजकः": "NS_USER",
+ "योजकसंभाषणं": "NS_USER_TALK",
+ "चित्रं": "NS_IMAGE",
+ "चित्रसंभाषणं": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template_talk": "NS_TEMPLATE_TALK",
+ "उपकारः": "NS_HELP",
+ "उपकारसंभाषणं": "NS_HELP_TALK",
+ "वर्गः": "NS_CATEGORY",
+ "वर्गसंभाषणं": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sa = [
+ ("", "संभाषणं", "NS_PROJECT_TALK"),
+]
+wiki_ns_tt_latn = {
+ "Media": "NS_MEDIA",
+ "Maxsus": "NS_SPECIAL",
+ "Bäxäs": "NS_TALK",
+ "Äğzä": "NS_USER",
+ "Äğzä_bäxäse": "NS_USER_TALK",
+ "Räsem": "NS_IMAGE",
+ "Räsem_bäxäse": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_bäxäse": "NS_MEDIAWIKI_TALK",
+ "Ürnäk": "NS_TEMPLATE",
+ "Ürnäk_bäxäse": "NS_TEMPLATE_TALK",
+ "Yärdäm": "NS_HELP",
+ "Yärdäm_bäxäse": "NS_HELP_TALK",
+ "Törkem": "NS_CATEGORY",
+ "Törkem_bäxäse": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_tt_latn = [
+ ("", "_bäxäse", "NS_PROJECT_TALK"),
+]
+wiki_ns_cu = {
+ "Срѣ́дьства": "NS_MEDIA",
+ "Наро́чьна": "NS_SPECIAL",
+ "Бєсѣ́да": "NS_TALK",
+ "По́льꙃєватєл҄ь": "NS_USER",
+ "По́льꙃєватєлꙗ_бєсѣ́да": "NS_USER_TALK",
+ "Ви́дъ": "NS_IMAGE",
+ "Ви́да_бєсѣ́да": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_бєсѣ́да": "NS_MEDIAWIKI_TALK",
+ "Обраꙁь́ць": "NS_TEMPLATE",
+ "Обраꙁьца́_бєсѣ́да": "NS_TEMPLATE_TALK",
+ "По́мощь": "NS_HELP",
+ "По́мощи_бєсѣ́да": "NS_HELP_TALK",
+ "Катигорі́ꙗ": "NS_CATEGORY",
+ "Катигорі́ѩ_бєсѣ́да": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_cu = [
+ ("{{grammar:genitive|", "}}_бєсѣ́да", "NS_PROJECT_TALK"),
+]
+wiki_ns_ko = {
+ "Media": "NS_MEDIA",
+ "특수기능": "NS_SPECIAL",
+ "토론": "NS_TALK",
+ "사용자": "NS_USER",
+ "사용자토론": "NS_USER_TALK",
+ "그림": "NS_IMAGE",
+ "그림토론": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki토론": "NS_MEDIAWIKI_TALK",
+ "틀": "NS_TEMPLATE",
+ "틀토론": "NS_TEMPLATE_TALK",
+ "도움말": "NS_HELP",
+ "도움말토론": "NS_HELP_TALK",
+ "분류": "NS_CATEGORY",
+ "분류토론": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ko = [
+ ("", "토론", "NS_PROJECT_TALK"),
+]
+wiki_ns_cy = {
+ "Media": "NS_MEDIA",
+ "Arbennig": "NS_SPECIAL",
+ "Sgwrs": "NS_TALK",
+ "Defnyddiwr": "NS_USER",
+ "Sgwrs_Defnyddiwr": "NS_USER_TALK",
+ "Delwedd": "NS_IMAGE",
+ "Sgwrs_Delwedd": "NS_IMAGE_TALK",
+ "MediaWici": "NS_MEDIAWIKI",
+ "Sgwrs_MediaWici": "NS_MEDIAWIKI_TALK",
+ "Nodyn": "NS_TEMPLATE",
+ "Sgwrs_Nodyn": "NS_TEMPLATE_TALK",
+ "Categori": "NS_CATEGORY",
+ "Sgwrs_Categori": "NS_CATEGORY_TALK",
+ "Cymorth": "NS_HELP",
+ "Sgwrs Cymorth": "NS_HELP_TALK",
+}
+wiki_ns_re_cy = [
+ ("Sgwrs_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_si = {
+ "මාධ්‍යය": "NS_MEDIA",
+ "විශේෂ": "NS_SPECIAL",
+ "සාකච්ඡාව": "NS_TALK",
+ "පරිශීලක": "NS_USER",
+ "පරිශීලක_සාකච්ඡාව": "NS_USER_TALK",
+ "රූපය": "NS_IMAGE",
+ "රූපය_සාකච්ඡාව": "NS_IMAGE_TALK",
+ "විකිමාධ්‍ය": "NS_MEDIAWIKI",
+ "විකිමාධ්‍ය_සාකච්ඡාව": "NS_MEDIAWIKI_TALK",
+ "සැකිල්ල": "NS_TEMPLATE",
+ "සැකිල_සාකච්ඡාව": "NS_TEMPLATE_TALK",
+ "උදවු": "NS_HELP",
+ "උදව_සාකච්ඡාව": "NS_HELP_TALK",
+ "ප්‍රවර්ගය": "NS_CATEGORY",
+ "ප්‍රවර්ග_සාකච්ඡාව": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_si = [
+ ("", "_සාකච්ඡාව", "NS_PROJECT_TALK"),
+]
+wiki_ns_sq = {
+ "Media": "NS_MEDIA",
+ "Speciale": "NS_SPECIAL",
+ "Diskutim": "NS_TALK",
+ "Përdoruesi": "NS_USER",
+ "Përdoruesi_diskutim": "NS_USER_TALK",
+ "Figura": "NS_IMAGE",
+ "Figura_diskutim": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskutim": "NS_MEDIAWIKI_TALK",
+ "Stampa": "NS_TEMPLATE",
+ "Stampa_diskutim": "NS_TEMPLATE_TALK",
+ "Ndihmë": "NS_HELP",
+ "Ndihmë_diskutim": "NS_HELP_TALK",
+}
+wiki_ns_re_sq = [
+ ("", "_diskutim", "NS_PROJECT_TALK"),
+]
+wiki_ns_su = {
+ "Média": "NS_MEDIA",
+ "Husus": "NS_SPECIAL",
+ "Obrolan": "NS_TALK",
+ "Pamaké": "NS_USER",
+ "Obrolan_pamaké": "NS_USER_TALK",
+ "Gambar": "NS_IMAGE",
+ "Obrolan_gambar": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Obrolan_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Citakan": "NS_TEMPLATE",
+ "Obrolan_citakan": "NS_TEMPLATE_TALK",
+ "Pitulung": "NS_HELP",
+ "Obrolan_pitulung": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Obrolan_kategori": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_su = [
+ ("Obrolan_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_arz = {
+ "ميديا": "NS_MEDIA",
+ "خاص": "NS_SPECIAL",
+ "نقاش": "NS_TALK",
+ "مستخدم": "NS_USER",
+ "نقاش_المستخدم": "NS_USER_TALK",
+ "صورة": "NS_IMAGE",
+ "نقاش_الصورة": "NS_IMAGE_TALK",
+ "ميدياويكى": "NS_MEDIAWIKI",
+ "نقاش_ميدياويكى": "NS_MEDIAWIKI_TALK",
+ "قالب": "NS_TEMPLATE",
+ "نقاش_القالب": "NS_TEMPLATE_TALK",
+ "مساعدة": "NS_HELP",
+ "نقاش_المساعدة": "NS_HELP_TALK",
+ "تصنيف": "NS_CATEGORY",
+ "نقاش_التصنيف": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_arz = [
+ ("نقاش_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_lb = {
+ "Media": "NS_MEDIA",
+ "Spezial": "NS_SPECIAL",
+ "Diskussioun": "NS_TALK",
+ "Benotzer": "NS_USER",
+ "Benotzer_Diskussioun": "NS_USER_TALK",
+ "Bild": "NS_IMAGE",
+ "Bild_Diskussioun": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Diskussioun": "NS_MEDIAWIKI_TALK",
+ "Schabloun": "NS_TEMPLATE",
+ "Schabloun_Diskussioun": "NS_TEMPLATE_TALK",
+ "Hëllef": "NS_HELP",
+ "Hëllef_Diskussioun": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategorie_Diskussioun": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_lb = [
+ ("", "_Diskussioun", "NS_PROJECT_TALK"),
+]
+wiki_ns_pa = {
+ "ਮੀਡੀਆ": "NS_MEDIA",
+ "ਖਾਸ": "NS_SPECIAL",
+ "ਚਰਚਾ": "NS_TALK",
+ "ਮੈਂਬਰ": "NS_USER",
+ "ਮੈਂਬਰ_ਚਰਚਾ": "NS_USER_TALK",
+ "ਤਸਵੀਰ": "NS_IMAGE",
+ "ਤਸਵੀਰ_ਚਰਚਾ": "NS_IMAGE_TALK",
+ "ਮੀਡੀਆਵਿਕਿ": "NS_MEDIAWIKI",
+ "ਮੀਡੀਆਵਿਕਿ_ਚਰਚਾ": "NS_MEDIAWIKI_TALK",
+ "ਨਮੂਨਾ": "NS_TEMPLATE",
+ "ਨਮੂਨਾ_ਚਰਚਾ": "NS_TEMPLATE_TALK",
+ "ਮਦਦ": "NS_HELP",
+ "ਮਦਦ_ਚਰਚਾ": "NS_HELP_TALK",
+ "ਸ਼੍ਰੇਣੀ": "NS_CATEGORY",
+ "ਸ਼੍ਰੇਣੀ_ਚਰਚਾ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pa = [
+ ("", "_ਚਰਚਾ", "NS_PROJECT_TALK"),
+]
+wiki_ns_csb = {
+ "Media": "NS_MEDIA",
+ "Specjalnô": "NS_SPECIAL",
+ "Diskùsëjô": "NS_TALK",
+ "Brëkòwnik": "NS_USER",
+ "Diskùsëjô_brëkòwnika": "NS_USER_TALK",
+ "Òbrôzk": "NS_IMAGE",
+ "Diskùsëjô_òbrôzków": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Diskùsëjô_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Szablóna": "NS_TEMPLATE",
+ "Diskùsëjô_Szablónë": "NS_TEMPLATE_TALK",
+ "Pòmòc": "NS_HELP",
+ "Diskùsëjô_Pòmòcë": "NS_HELP_TALK",
+ "Kategòrëjô": "NS_CATEGORY",
+ "Diskùsëjô_Kategòrëji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_csb = [
+ ("Diskùsëjô_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_th = {
+ "สื่อ": "NS_MEDIA",
+ "พิเศษ": "NS_SPECIAL",
+ "พูดคุย": "NS_TALK",
+ "ผู้ใช้": "NS_USER",
+ "คุยกับผู้ใช้": "NS_USER_TALK",
+ "ภาพ": "NS_IMAGE",
+ "คุยเรื่องภาพ": "NS_IMAGE_TALK",
+ "มีเดียวิกิ": "NS_MEDIAWIKI",
+ "คุยเรื่องมีเดียวิกิ": "NS_MEDIAWIKI_TALK",
+ "แม่แบบ": "NS_TEMPLATE",
+ "คุยเรื่องแม่แบบ": "NS_TEMPLATE_TALK",
+ "วิธีใช้": "NS_HELP",
+ "คุยเรื่องวิธีใช้": "NS_HELP_TALK",
+ "หมวดหมู่": "NS_CATEGORY",
+ "คุยเรื่องหมวดหมู่": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_th = [
+ ("คุยเรื่อง", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_vec = {
+ "Media": "NS_MEDIA",
+ "Speciale": "NS_SPECIAL",
+ "Discussion": "NS_TALK",
+ "Utente": "NS_USER",
+ "Discussion_utente": "NS_USER_TALK",
+ "Imagine": "NS_IMAGE",
+ "Discussion_imagine": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Discussion_template": "NS_TEMPLATE_TALK",
+ "Aiuto": "NS_HELP",
+ "Discussion_aiuto": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Discussion_categoria": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_vec = [
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_zea = {
+ "Media": "NS_MEDIA",
+ "Speciaol": "NS_SPECIAL",
+ "Overleg": "NS_TALK",
+ "Gebruker": "NS_USER",
+ "Overleg_gebruker": "NS_USER_TALK",
+ "Plaetje": "NS_IMAGE",
+ "Overleg_plaetje": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Sjabloon": "NS_TEMPLATE",
+ "Overleg_sjabloon": "NS_TEMPLATE_TALK",
+ "Ulpe": "NS_HELP",
+ "Overleg_ulpe": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Overleg_categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_zea = [
+ ("Overleg_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_lv = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Diskusija": "NS_TALK",
+ "Lietotājs": "NS_USER",
+ "Lietotāja_diskusija": "NS_USER_TALK",
+ "Attēls": "NS_IMAGE",
+ "Attēla_diskusija": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskusija": "NS_MEDIAWIKI_TALK",
+ "Veidne": "NS_TEMPLATE",
+ "Veidnes_diskusija": "NS_TEMPLATE_TALK",
+ "Palīdzība": "NS_HELP",
+ "Palīdzības_diskusija": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Kategorijas_diskusija": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_lv = [
+ ("{{grammar:ģenitīvs|", "}}_diskusija", "NS_PROJECT_TALK"),
+]
+wiki_ns_scn = {
+ "Mèdia": "NS_MEDIA",
+ "Spiciali": "NS_SPECIAL",
+ "Discussioni": "NS_TALK",
+ "Utenti": "NS_USER",
+ "Discussioni_utenti": "NS_USER_TALK",
+ "Mmàggini": "NS_IMAGE",
+ "Discussioni_mmàggini": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussioni_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Discussioni_template": "NS_TEMPLATE_TALK",
+ "Aiutu": "NS_HELP",
+ "Discussioni_aiutu": "NS_HELP_TALK",
+ "Catigurìa": "NS_CATEGORY",
+ "Discussioni_catigurìa": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_scn = [
+ ("Discussioni_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_new = {
+ "माध्यम": "NS_MEDIA",
+ "विशेष": "NS_SPECIAL",
+ "खँलाबँला": "NS_TALK",
+ "छ्येलेमि": "NS_USER",
+ "छ्येलेमि_खँलाबँला": "NS_USER_TALK",
+ "किपा": "NS_IMAGE",
+ "किपा_खँलाबँला": "NS_IMAGE_TALK",
+ "मिडियाविकि": "NS_MEDIAWIKI",
+ "मिडियाविकि_खँलाबँला": "NS_MEDIAWIKI_TALK",
+ "ग्वाहालि": "NS_HELP",
+ "ग्वाहालि_खँलाबँला": "NS_HELP_TALK",
+ "पुचः": "NS_CATEGORY",
+ "पुचः_खँलाबँला": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_new = [
+ ("", "_खँलाबँला", "NS_PROJECT_TALK"),
+]
+wiki_ns_zh_tw = {
+ "媒體": "NS_MEDIA",
+ "特殊": "NS_SPECIAL",
+ "討論": "NS_TALK",
+ "使用者": "NS_USER",
+ "使用者討論": "NS_USER_TALK",
+ "圖片": "NS_IMAGE",
+ "圖片討論": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "模板": "NS_TEMPLATE",
+ "模板討論": "NS_TEMPLATE_TALK",
+ "使用說明": "NS_HELP",
+ "使用說明討論": "NS_HELP_TALK",
+ "分類": "NS_CATEGORY",
+ "分類討論": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_zh_tw = [
+ ("", "對話", "NS_PROJECT_TALK"),
+]
+wiki_ns_eo = {
+ "Media": "NS_MEDIA",
+ "Speciala": "NS_SPECIAL",
+ "Diskuto": "NS_TALK",
+ "Vikipediisto": "NS_USER",
+ "Vikipediista_diskuto": "NS_USER_TALK",
+ "Dosiero": "NS_IMAGE",
+ "Dosiera_diskuto": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_diskuto": "NS_MEDIAWIKI_TALK",
+ "Ŝablono": "NS_TEMPLATE",
+ "Ŝablona_diskuto": "NS_TEMPLATE_TALK",
+ "Helpo": "NS_HELP",
+ "Helpa_diskuto": "NS_HELP_TALK",
+ "Kategorio": "NS_CATEGORY",
+ "Kategoria_diskuto": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_eo = [
+ ("", "_diskuto", "NS_PROJECT_TALK"),
+]
+wiki_ns_es = {
+ "Media": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Discusión": "NS_TALK",
+ "Usuario": "NS_USER",
+ "Usuario_Discusión": "NS_USER_TALK",
+ "Imagen": "NS_IMAGE",
+ "Imagen_Discusión": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Discusión": "NS_MEDIAWIKI_TALK",
+ "Plantilla": "NS_TEMPLATE",
+ "Plantilla_Discusión": "NS_TEMPLATE_TALK",
+ "Ayuda": "NS_HELP",
+ "Ayuda_Discusión": "NS_HELP_TALK",
+ "Categoría": "NS_CATEGORY",
+ "Categoría_Discusión": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_es = [
+ ("", "_Discusión", "NS_PROJECT_TALK"),
+]
+wiki_ns_uk = {
+ "Медіа": "NS_MEDIA",
+ "Спеціальна": "NS_SPECIAL",
+ "Обговорення": "NS_TALK",
+ "Користувач": "NS_USER",
+ "Обговорення_користувача": "NS_USER_TALK",
+ "Зображення": "NS_IMAGE",
+ "Обговорення_зображення": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Обговорення_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Обговорення_шаблону": "NS_TEMPLATE_TALK",
+ "Довідка": "NS_HELP",
+ "Обговорення_довідки": "NS_HELP_TALK",
+ "Категорія": "NS_CATEGORY",
+ "Обговорення_категорії": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_uk = [
+ ("Обговорення_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_bg = {
+ "Медия": "NS_MEDIA",
+ "Специални": "NS_SPECIAL",
+ "Беседа": "NS_TALK",
+ "Потребител": "NS_USER",
+ "Потребител_беседа": "NS_USER_TALK",
+ "Картинка": "NS_IMAGE",
+ "Картинка_беседа": "NS_IMAGE_TALK",
+ "МедияУики": "NS_MEDIAWIKI",
+ "МедияУики_беседа": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблон_беседа": "NS_TEMPLATE_TALK",
+ "Помощ": "NS_HELP",
+ "Помощ_беседа": "NS_HELP_TALK",
+ "Категория": "NS_CATEGORY",
+ "Категория_беседа": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_bg = [
+ ("", "_беседа", "NS_PROJECT_TALK"),
+]
+wiki_ns_ja = {
+ "Media": "NS_MEDIA",
+ "特別": "NS_SPECIAL",
+ "ノート": "NS_TALK",
+ "利用者": "NS_USER",
+ "利用者‐会話": "NS_USER_TALK",
+ "画像": "NS_IMAGE",
+ "画像‐ノート": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki‐ノート": "NS_MEDIAWIKI_TALK",
+ "Template": "NS_TEMPLATE",
+ "Template‐ノート": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Help‐ノート": "NS_HELP_TALK",
+ "Category": "NS_CATEGORY",
+ "Category‐ノート": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ja = [
+ ("", "‐ノート", "NS_PROJECT_TALK"),
+]
+wiki_ns_kaa = {
+ "Media": "NS_MEDIA",
+ "Arnawlı": "NS_SPECIAL",
+ "Sa'wbet": "NS_TALK",
+ "Paydalanıwshı": "NS_USER",
+ "Paydalanıwshı_sa'wbeti": "NS_USER_TALK",
+ "Su'wret": "NS_IMAGE",
+ "Su'wret_sa'wbeti": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_sa'wbeti": "NS_MEDIAWIKI_TALK",
+ "Shablon": "NS_TEMPLATE",
+ "Shablon_sa'wbeti": "NS_TEMPLATE_TALK",
+ "Anıqlama": "NS_HELP",
+ "Anıqlama_sa'wbeti": "NS_HELP_TALK",
+ "Kategoriya": "NS_CATEGORY",
+ "Kategoriya_sa'wbeti": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kaa = [
+ ("", "_sa'wbeti", "NS_PROJECT_TALK"),
+]
+wiki_ns_bcl = {
+ "Medio": "NS_MEDIA",
+ "Espesyal": "NS_SPECIAL",
+ "Olay": "NS_TALK",
+ "Paragamit": "NS_USER",
+ "Olay_kan_paragamit": "NS_USER_TALK",
+ "Ladawan": "NS_IMAGE",
+ "Olay_sa_ladawan": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Olay_sa_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Plantilya": "NS_TEMPLATE",
+ "Olay_sa_plantilya": "NS_TEMPLATE_TALK",
+ "Tabang": "NS_HELP",
+ "Olay_sa_tabang": "NS_HELP_TALK",
+ "Kategorya": "NS_CATEGORY",
+ "Olay_sa_kategorya": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_bcl = [
+ ("Olay_sa_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_bs = {
+ "Medija": "NS_MEDIA",
+ "Posebno": "NS_SPECIAL",
+ "Razgovor": "NS_TALK",
+ "Korisnik": "NS_USER",
+ "Razgovor_sa_korisnikom": "NS_USER_TALK",
+ "Slika": "NS_IMAGE",
+ "Razgovor_o_slici": "NS_IMAGE_TALK",
+ "MedijaViki": "NS_MEDIAWIKI",
+ "Razgovor_o_MedijaVikiju": "NS_MEDIAWIKI_TALK",
+ "Šablon": "NS_TEMPLATE",
+ "Razgovor_o_šablonu": "NS_TEMPLATE_TALK",
+ "Pomoć": "NS_HELP",
+ "Razgovor_o_pomoći": "NS_HELP_TALK",
+ "Kategorija": "NS_CATEGORY",
+ "Razgovor_o_kategoriji": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_bs = [
+ ("Razgovor_{{grammar:instrumental|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_stq = {
+ "Media": "NS_MEDIA",
+ "Spezial": "NS_SPECIAL",
+ "Diskussion": "NS_TALK",
+ "Benutser": "NS_USER",
+ "Benutser_Diskussion": "NS_USER_TALK",
+ "Bielde": "NS_IMAGE",
+ "Bielde_Diskussion": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Diskussion": "NS_MEDIAWIKI_TALK",
+ "Foarloage": "NS_TEMPLATE",
+ "Foarloage_Diskussion": "NS_TEMPLATE_TALK",
+ "Hälpe": "NS_HELP",
+ "Hälpe_Diskussion": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategorie_Diskussion": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_stq = [
+ ("", "_Diskussion", "NS_PROJECT_TALK"),
+]
+wiki_ns_fr = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Discuter": "NS_TALK",
+ "Utilisateur": "NS_USER",
+ "Discussion_Utilisateur": "NS_USER_TALK",
+ "Image": "NS_IMAGE",
+ "Discussion_Image": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Modèle": "NS_TEMPLATE",
+ "Discussion_Modèle": "NS_TEMPLATE_TALK",
+ "Aide": "NS_HELP",
+ "Discussion_Aide": "NS_HELP_TALK",
+ "Catégorie": "NS_CATEGORY",
+ "Discussion_Catégorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_fr = [
+ ("", "", "NS_PROJECT"),
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_nl = {
+ "Media": "NS_MEDIA",
+ "Speciaal": "NS_SPECIAL",
+ "Overleg": "NS_TALK",
+ "Gebruiker": "NS_USER",
+ "Overleg_gebruiker": "NS_USER_TALK",
+ "Afbeelding": "NS_IMAGE",
+ "Overleg_afbeelding": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Overleg_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Sjabloon": "NS_TEMPLATE",
+ "Overleg_sjabloon": "NS_TEMPLATE_TALK",
+ "Help": "NS_HELP",
+ "Overleg_help": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Overleg_categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_nl = [
+ ("Overleg_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ro = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Discuţie": "NS_TALK",
+ "Utilizator": "NS_USER",
+ "Discuţie_Utilizator": "NS_USER_TALK",
+ "Imagine": "NS_IMAGE",
+ "Discuţie_Imagine": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discuţie_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Format": "NS_TEMPLATE",
+ "Discuţie_Format": "NS_TEMPLATE_TALK",
+ "Ajutor": "NS_HELP",
+ "Discuţie_Ajutor": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Discuţie_Categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ro = [
+ ("Discuţie_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ga = {
+ "Meán": "NS_MEDIA",
+ "Speisialta": "NS_SPECIAL",
+ "Plé": "NS_TALK",
+ "Úsáideoir": "NS_USER",
+ "Plé_úsáideora": "NS_USER_TALK",
+ "Íomhá": "NS_IMAGE",
+ "Plé_íomhá": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Plé_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Teimpléad": "NS_TEMPLATE",
+ "Plé_teimpléid": "NS_TEMPLATE_TALK",
+ "Cabhair": "NS_HELP",
+ "Plé_cabhrach": "NS_HELP_TALK",
+ "Catagóir": "NS_CATEGORY",
+ "Plé_catagóire": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ga = [
+ ("Plé_{{grammar:genitive|", "}}", "NS_PROJECT_TALK"),
+]
+wiki_ns_sr_ec = {
+ "Медија": "NS_MEDIA",
+ "Посебно": "NS_SPECIAL",
+ "Разговор": "NS_TALK",
+ "Корисник": "NS_USER",
+ "Разговор_са_корисником": "NS_USER_TALK",
+ "Слика": "NS_IMAGE",
+ "Разговор_о_слици": "NS_IMAGE_TALK",
+ "МедијаВики": "NS_MEDIAWIKI",
+ "Разговор_о_МедијаВикију": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Разговор_о_шаблону": "NS_TEMPLATE_TALK",
+ "Помоћ": "NS_HELP",
+ "Разговор_о_помоћи": "NS_HELP_TALK",
+ "Категорија": "NS_CATEGORY",
+ "Разговор_о_категорији": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sr_ec = [
+ ("Разговор_о_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_kk_cyrl = {
+ "Таспа": "NS_MEDIA",
+ "Арнайы": "NS_SPECIAL",
+ "Талқылау": "NS_TALK",
+ "Қатысушы": "NS_USER",
+ "Қатысушы_талқылауы": "NS_USER_TALK",
+ "Сурет": "NS_IMAGE",
+ "Сурет_талқылауы": "NS_IMAGE_TALK",
+ "МедиаУики": "NS_MEDIAWIKI",
+ "МедиаУики_талқылауы": "NS_MEDIAWIKI_TALK",
+ "Үлгі": "NS_TEMPLATE",
+ "Үлгі_талқылауы": "NS_TEMPLATE_TALK",
+ "Анықтама": "NS_HELP",
+ "Анықтама_талқылауы": "NS_HELP_TALK",
+ "Санат": "NS_CATEGORY",
+ "Санат_талқылауы": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kk_cyrl = [
+ ("", "_талқылауы", "NS_PROJECT_TALK"),
+]
+wiki_ns_oc = {
+ "Mèdia": "NS_MEDIA",
+ "Especial": "NS_SPECIAL",
+ "Discutir": "NS_TALK",
+ "Utilizaire": "NS_USER",
+ "Discussion_Utilizaire": "NS_USER_TALK",
+ "Imatge": "NS_IMAGE",
+ "Discussion_Imatge": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Modèl": "NS_TEMPLATE",
+ "Discussion_Modèl": "NS_TEMPLATE_TALK",
+ "Ajuda": "NS_HELP",
+ "Discussion_Ajuda": "NS_HELP_TALK",
+ "Categoria": "NS_CATEGORY",
+ "Discussion_Categoria": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_oc = [
+ ("Discussion_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_wa = {
+ "Media": "NS_MEDIA",
+ "Sipeciås": "NS_SPECIAL",
+ "Copene": "NS_TALK",
+ "Uzeu": "NS_USER",
+ "Uzeu_copene": "NS_USER_TALK",
+ "Imådje": "NS_IMAGE",
+ "Imådje_copene": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_copene": "NS_MEDIAWIKI_TALK",
+ "Modele": "NS_TEMPLATE",
+ "Modele_copene": "NS_TEMPLATE_TALK",
+ "Aidance": "NS_HELP",
+ "Aidance_copene": "NS_HELP_TALK",
+ "Categoreye": "NS_CATEGORY",
+ "Categoreye_copene": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_wa = [
+ ("", "_copene", "NS_PROJECT_TALK"),
+]
+wiki_ns_cv = {
+ "Медиа": "NS_MEDIA",
+ "Ятарлă": "NS_SPECIAL",
+ "Сӳтсе явасси": "NS_TALK",
+ "Хутшăнакан": "NS_USER",
+ "Хутшăнаканăн_канашлу_страници": "NS_USER_TALK",
+ "Ӳкерчĕк": "NS_IMAGE",
+ "Ӳкерчĕке_сӳтсе_явмалли": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_сӳтсе_явмалли": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблона_сӳтсе_явмалли": "NS_TEMPLATE_TALK",
+ "Пулăшу": "NS_HELP",
+ "Пулăшăва_сӳтсе_явмалли": "NS_HELP_TALK",
+ "Категори": "NS_CATEGORY",
+ "Категорине_сӳтсе_явмалли": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_cv = [
+ ("", "_сӳтсе_явмалли", "NS_PROJECT_TALK"),
+]
+wiki_ns_os = {
+ "Media": "NS_MEDIA",
+ "Сæрмагонд": "NS_SPECIAL",
+ "Дискусси": "NS_TALK",
+ "Архайæг": "NS_USER",
+ "Архайæджы_дискусси": "NS_USER_TALK",
+ "Ныв": "NS_IMAGE",
+ "Нывы_тыххæй_дискусси": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Дискусси_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Шаблон": "NS_TEMPLATE",
+ "Шаблоны_тыххæй_дискусси": "NS_TEMPLATE_TALK",
+ "Æххуыс": "NS_HELP",
+ "Æххуысы_тыххæй_дискусси": "NS_HELP_TALK",
+ "Категори": "NS_CATEGORY",
+ "Категорийы_тыххæй_дискусси": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_os = [
+ ("Дискусси_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_kk_latn = {
+ "Taspa": "NS_MEDIA",
+ "Arnaýı": "NS_SPECIAL",
+ "Talqılaw": "NS_TALK",
+ "Qatıswşı": "NS_USER",
+ "Qatıswşı_talqılawı": "NS_USER_TALK",
+ "Swret": "NS_IMAGE",
+ "Swret_talqılawı": "NS_IMAGE_TALK",
+ "MedïaWïkï": "NS_MEDIAWIKI",
+ "MedïaWïkï_talqılawı": "NS_MEDIAWIKI_TALK",
+ "Ülgi": "NS_TEMPLATE",
+ "Ülgi_talqılawı": "NS_TEMPLATE_TALK",
+ "Anıqtama": "NS_HELP",
+ "Anıqtama_talqılawı": "NS_HELP_TALK",
+ "Sanat": "NS_CATEGORY",
+ "Sanat_talqılawı": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_kk_latn = [
+ ("", "_talqılawı", "NS_PROJECT_TALK"),
+]
+wiki_ns_da = {
+ "Media": "NS_MEDIA",
+ "Speciel": "NS_SPECIAL",
+ "Diskussion": "NS_TALK",
+ "Bruger": "NS_USER",
+ "Brugerdiskussion": "NS_USER_TALK",
+ "Billede": "NS_IMAGE",
+ "Billeddiskussion": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki-diskussion": "NS_MEDIAWIKI_TALK",
+ "Skabelon": "NS_TEMPLATE",
+ "Skabelondiskussion": "NS_TEMPLATE_TALK",
+ "Hjælp": "NS_HELP",
+ "Hjælp-diskussion": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Kategoridiskussion": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_da = [
+ ("", "-diskussion", "NS_PROJECT_TALK"),
+]
+wiki_ns_sv = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Diskussion": "NS_TALK",
+ "Användare": "NS_USER",
+ "Användardiskussion": "NS_USER_TALK",
+ "Bild": "NS_IMAGE",
+ "Bilddiskussion": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki-diskussion": "NS_MEDIAWIKI_TALK",
+ "Mall": "NS_TEMPLATE",
+ "Malldiskussion": "NS_TEMPLATE_TALK",
+ "Hjälp": "NS_HELP",
+ "Hjälpdiskussion": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Kategoridiskussion": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_sv = [
+ ("", "diskussion", "NS_PROJECT_TALK"),
+]
+wiki_ns_de = {
+ "Media": "NS_MEDIA",
+ "Spezial": "NS_SPECIAL",
+ "Diskussion": "NS_TALK",
+ "Benutzer": "NS_USER",
+ "Benutzer_Diskussion": "NS_USER_TALK",
+ "Bild": "NS_IMAGE",
+ "Bild_Diskussion": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_Diskussion": "NS_MEDIAWIKI_TALK",
+ "Vorlage": "NS_TEMPLATE",
+ "Vorlage_Diskussion": "NS_TEMPLATE_TALK",
+ "Hilfe": "NS_HELP",
+ "Hilfe_Diskussion": "NS_HELP_TALK",
+ "Kategorie": "NS_CATEGORY",
+ "Kategorie_Diskussion": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_de = [
+ ("", "_Diskussion", "NS_PROJECT_TALK"),
+]
+wiki_ns_ta = {
+ "ஊடகம்": "NS_MEDIA",
+ "சிறப்பு": "NS_SPECIAL",
+ "பேச்சு": "NS_TALK",
+ "பயனர்": "NS_USER",
+ "பயனர்_பேச்சு": "NS_USER_TALK",
+ "படிமம்": "NS_IMAGE",
+ "படிமப்_பேச்சு": "NS_IMAGE_TALK",
+ "மீடியாவிக்கி": "NS_MEDIAWIKI",
+ "மீடியாவிக்கி_பேச்சு": "NS_MEDIAWIKI_TALK",
+ "வார்ப்புரு": "NS_TEMPLATE",
+ "வார்ப்புரு_பேச்சு": "NS_TEMPLATE_TALK",
+ "உதவி": "NS_HELP",
+ "உதவி_பேச்சு": "NS_HELP_TALK",
+ "பகுப்பு": "NS_CATEGORY",
+ "பகுப்பு_பேச்சு": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ta = [
+ ("", "_பேச்சு", "NS_PROJECT_TALK"),
+]
+wiki_ns_vls = {
+ "Media": "NS_MEDIA",
+ "Specioal": "NS_SPECIAL",
+ "Discuusje": "NS_TALK",
+ "Gebruker": "NS_USER",
+ "Discuusje_gebruker": "NS_USER_TALK",
+ "Ofbeeldienge": "NS_IMAGE",
+ "Discuusje_ofbeeldienge": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discuusje_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Patrôon": "NS_TEMPLATE",
+ "Discuusje_patrôon": "NS_TEMPLATE_TALK",
+ "Ulpe": "NS_HELP",
+ "Discuusje_ulpe": "NS_HELP_TALK",
+ "Categorie": "NS_CATEGORY",
+ "Discuusje_categorie": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_vls = [
+ ("Discuusje_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_te = {
+ "మీడియా": "NS_MEDIA",
+ "ప్రత్యేక": "NS_SPECIAL",
+ "చర్చ": "NS_TALK",
+ "సభ్యులు": "NS_USER",
+ "సభ్యులపై_చర్చ": "NS_USER_TALK",
+ "బొమ్మ": "NS_IMAGE",
+ "బొమ్మపై_చర్చ": "NS_IMAGE_TALK",
+ "మీడియావికీ": "NS_MEDIAWIKI",
+ "మీడియావికీ_చర్చ": "NS_MEDIAWIKI_TALK",
+ "మూస": "NS_TEMPLATE",
+ "మూస_చర్చ": "NS_TEMPLATE_TALK",
+ "సహాయము": "NS_HELP",
+ "సహాయము_చర్చ": "NS_HELP_TALK",
+ "వర్గం": "NS_CATEGORY",
+ "వర్గం_చర్చ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_te = [
+ ("", "_చర్చ", "NS_PROJECT_TALK"),
+]
+wiki_ns_lo = {
+ "ສື່ອ": "NS_MEDIA",
+ "ພິເສດ": "NS_SPECIAL",
+ "ສົນທະນາ": "NS_TALK",
+ "ຜູ້ໃຊ້": "NS_USER",
+ "ສົນທະນາຂອງຜູ້ໃຊ້": "NS_USER_TALK",
+ "ຮູບ": "NS_IMAGE",
+ "ສົນທະນາກ່ຽວກັບຮູບ": "NS_IMAGE_TALK",
+ "ມີເດຍວິກິ": "NS_MEDIAWIKI",
+ "ສົນທະນາກ່ຽວກັບມີເດຍວິກິ": "NS_MEDIAWIKI_TALK",
+ "ແມ່ແບບ": "NS_TEMPLATE",
+ "ສົນທະນາກ່ຽວກັບແມ່ແບບ": "NS_TEMPLATE_TALK",
+ "ຊ່ວຍເຫຼືອ": "NS_HELP",
+ "ສົນທະນາກ່ຽວກັບຊ່ວຍເຫຼືອ": "NS_HELP_TALK",
+ "ໝວດ": "NS_CATEGORY",
+ "ສົນທະນາກ່ຽວກັບໝວດ": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_lo = [
+ ("ສົນທະນາກ່ຽວກັບ", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_ht = {
+ "Medya": "NS_MEDIA",
+ "Espesyal": "NS_SPECIAL",
+ "Diskite": "NS_TALK",
+ "Itilizatè": "NS_USER",
+ "Diskisyon_Itilizatè": "NS_USER_TALK",
+ "Imaj": "NS_IMAGE",
+ "Diskisyon_Imaj": "NS_IMAGE_TALK",
+ "MedyaWiki": "NS_MEDIAWIKI",
+ "Diskisyon_MedyaWiki": "NS_MEDIAWIKI_TALK",
+ "Modèl": "NS_TEMPLATE",
+ "Diskisyon_Modèl": "NS_TEMPLATE_TALK",
+ "Èd": "NS_HELP",
+ "Diskisyon_Èd": "NS_HELP_TALK",
+ "Kategori": "NS_CATEGORY",
+ "Diskisyon_Kategori": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_ht = [
+ ("Diskisyon_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_am = {
+ "ፋይል": "NS_MEDIA",
+ "ልዩ": "NS_SPECIAL",
+ "ውይይት": "NS_TALK",
+ "አባል": "NS_USER",
+ "አባል_ውይይት": "NS_USER_TALK",
+ "ስዕል": "NS_IMAGE",
+ "ስዕል_ውይይት": "NS_IMAGE_TALK",
+ "መልዕክት": "NS_MEDIAWIKI",
+ "መልዕክት_ውይይት": "NS_MEDIAWIKI_TALK",
+ "መልጠፊያ": "NS_TEMPLATE",
+ "መልጠፊያ_ውይይት": "NS_TEMPLATE_TALK",
+ "እርዳታ": "NS_HELP",
+ "እርዳታ_ውይይት": "NS_HELP_TALK",
+ "መደብ": "NS_CATEGORY",
+ "መደብ_ውይይት": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_am = [
+ ("", "_ውይይት", "NS_PROJECT_TALK"),
+]
+wiki_ns_pms = {
+ "Media": "NS_MEDIA",
+ "Special": "NS_SPECIAL",
+ "Discussion": "NS_TALK",
+ "Utent": "NS_USER",
+ "Ciaciarade": "NS_USER_TALK",
+ "Figura": "NS_IMAGE",
+ "Discussion_dla_figura": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "Discussion_dla_MediaWiki": "NS_MEDIAWIKI_TALK",
+ "Stamp": "NS_TEMPLATE",
+ "Discussion_dlë_stamp": "NS_TEMPLATE_TALK",
+ "Agiut": "NS_HELP",
+ "Discussion_ant_sl'agiut": "NS_HELP_TALK",
+ "Categorìa": "NS_CATEGORY",
+ "Discussion_ant_sla_categorìa": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_pms = [
+ ("Discussion_ant_sla_", "", "NS_PROJECT_TALK"),
+]
+wiki_ns_el = {
+ "Μέσον": "NS_MEDIA",
+ "Ειδικό": "NS_SPECIAL",
+ "Συζήτηση": "NS_TALK",
+ "Χρήστης": "NS_USER",
+ "Συζήτηση_χρήστη": "NS_USER_TALK",
+ "Εικόνα": "NS_IMAGE",
+ "Συζήτηση_εικόνας": "NS_IMAGE_TALK",
+ "MediaWiki": "NS_MEDIAWIKI",
+ "MediaWiki_talk": "NS_MEDIAWIKI_TALK",
+ "Πρότυπο": "NS_TEMPLATE",
+ "Συζήτηση_προτύπου": "NS_TEMPLATE_TALK",
+ "Βοήθεια": "NS_HELP",
+ "Συζήτηση_βοήθειας": "NS_HELP_TALK",
+ "Κατηγορία": "NS_CATEGORY",
+ "Συζήτηση_κατηγορίας": "NS_CATEGORY_TALK",
+}
+wiki_ns_re_el = [
+ ("", "_συζήτηση", "NS_PROJECT_TALK"),
+]
+wiki_ns = {
+ "io": wiki_ns_io,
+ "et": wiki_ns_et,
+ "is": wiki_ns_is,
+ "mr": wiki_ns_mr,
+ "tyv": wiki_ns_tyv,
+ "qu": wiki_ns_qu,
+ "frp": wiki_ns_frp,
+ "kab": wiki_ns_kab,
+ "fo": wiki_ns_fo,
+ "pt_br": wiki_ns_pt_br,
+ "dsb": wiki_ns_dsb,
+ "jv": wiki_ns_jv,
+ "vo": wiki_ns_vo,
+ "ka": wiki_ns_ka,
+ "gn": wiki_ns_gn,
+ "sr_el": wiki_ns_sr_el,
+ "cs": wiki_ns_cs,
+ "sc": wiki_ns_sc,
+ "km": wiki_ns_km,
+ "sk": wiki_ns_sk,
+ "bpy": wiki_ns_bpy,
+ "he": wiki_ns_he,
+ "hi": wiki_ns_hi,
+ "hu": wiki_ns_hu,
+ "lt": wiki_ns_lt,
+ "hy": wiki_ns_hy,
+ "ps": wiki_ns_ps,
+ "ksh": wiki_ns_ksh,
+ "tr": wiki_ns_tr,
+ "af": wiki_ns_af,
+ "zh_hans": wiki_ns_zh_hans,
+ "id": wiki_ns_id,
+ "tet": wiki_ns_tet,
+ "an": wiki_ns_an,
+ "ar": wiki_ns_ar,
+ "tg_cyrl": wiki_ns_tg_cyrl,
+ "rmy": wiki_ns_rmy,
+ "mk": wiki_ns_mk,
+ "eu": wiki_ns_eu,
+ "az": wiki_ns_az,
+ "bat_smg": wiki_ns_bat_smg,
+ "it": wiki_ns_it,
+ "ms": wiki_ns_ms,
+ "ba": wiki_ns_ba,
+ "be": wiki_ns_be,
+ "crh_cyrl": wiki_ns_crh_cyrl,
+ "nn": wiki_ns_nn,
+ "nv": wiki_ns_nv,
+ "ru": wiki_ns_ru,
+ "crh_latn": wiki_ns_crh_latn,
+ "be_tarask": wiki_ns_be_tarask,
+ "yue": wiki_ns_yue,
+ "kn": wiki_ns_kn,
+ "sl": wiki_ns_sl,
+ "nds": wiki_ns_nds,
+ "tlh": wiki_ns_tlh,
+ "la": wiki_ns_la,
+ "li": wiki_ns_li,
+ "hr": wiki_ns_hr,
+ "pl": wiki_ns_pl,
+ "nds_nl": wiki_ns_nds_nl,
+ "pt": wiki_ns_pt,
+ "xal": wiki_ns_xal,
+ "ast": wiki_ns_ast,
+ "ia": wiki_ns_ia,
+ "kk_arab": wiki_ns_kk_arab,
+ "zh_hant": wiki_ns_zh_hant,
+ "fur": wiki_ns_fur,
+ "en": wiki_ns_en,
+ "lbe": wiki_ns_lbe,
+ "ml": wiki_ns_ml,
+ "fiu_vro": wiki_ns_fiu_vro,
+ "yi": wiki_ns_yi,
+ "udm": wiki_ns_udm,
+ "ur": wiki_ns_ur,
+ "fa": wiki_ns_fa,
+ "ku_latn": wiki_ns_ku_latn,
+ "uz": wiki_ns_uz,
+ "fi": wiki_ns_fi,
+ "bn": wiki_ns_bn,
+ "pnt": wiki_ns_pnt,
+ "br": wiki_ns_br,
+ "hsb": wiki_ns_hsb,
+ "no": wiki_ns_no,
+ "vi": wiki_ns_vi,
+ "fy": wiki_ns_fy,
+ "ca": wiki_ns_ca,
+ "ce": wiki_ns_ce,
+ "gl": wiki_ns_gl,
+ "sa": wiki_ns_sa,
+ "tt_latn": wiki_ns_tt_latn,
+ "cu": wiki_ns_cu,
+ "ko": wiki_ns_ko,
+ "cy": wiki_ns_cy,
+ "si": wiki_ns_si,
+ "sq": wiki_ns_sq,
+ "su": wiki_ns_su,
+ "arz": wiki_ns_arz,
+ "lb": wiki_ns_lb,
+ "pa": wiki_ns_pa,
+ "csb": wiki_ns_csb,
+ "th": wiki_ns_th,
+ "vec": wiki_ns_vec,
+ "zea": wiki_ns_zea,
+ "lv": wiki_ns_lv,
+ "scn": wiki_ns_scn,
+ "new": wiki_ns_new,
+ "zh_tw": wiki_ns_zh_tw,
+ "eo": wiki_ns_eo,
+ "es": wiki_ns_es,
+ "uk": wiki_ns_uk,
+ "bg": wiki_ns_bg,
+ "ja": wiki_ns_ja,
+ "kaa": wiki_ns_kaa,
+ "bcl": wiki_ns_bcl,
+ "bs": wiki_ns_bs,
+ "stq": wiki_ns_stq,
+ "fr": wiki_ns_fr,
+ "nl": wiki_ns_nl,
+ "ro": wiki_ns_ro,
+ "ga": wiki_ns_ga,
+ "sr_ec": wiki_ns_sr_ec,
+ "kk_cyrl": wiki_ns_kk_cyrl,
+ "oc": wiki_ns_oc,
+ "wa": wiki_ns_wa,
+ "cv": wiki_ns_cv,
+ "os": wiki_ns_os,
+ "kk_latn": wiki_ns_kk_latn,
+ "da": wiki_ns_da,
+ "sv": wiki_ns_sv,
+ "de": wiki_ns_de,
+ "ta": wiki_ns_ta,
+ "vls": wiki_ns_vls,
+ "te": wiki_ns_te,
+ "lo": wiki_ns_lo,
+ "ht": wiki_ns_ht,
+ "am": wiki_ns_am,
+ "pms": wiki_ns_pms,
+ "el": wiki_ns_el,
+}
+wiki_ns_re = {
+ "io": wiki_ns_re_io,
+ "et": wiki_ns_re_et,
+ "is": wiki_ns_re_is,
+ "mr": wiki_ns_re_mr,
+ "tyv": wiki_ns_re_tyv,
+ "qu": wiki_ns_re_qu,
+ "frp": wiki_ns_re_frp,
+ "kab": wiki_ns_re_kab,
+ "fo": wiki_ns_re_fo,
+ "pt_br": wiki_ns_re_pt_br,
+ "dsb": wiki_ns_re_dsb,
+ "jv": wiki_ns_re_jv,
+ "vo": wiki_ns_re_vo,
+ "ka": wiki_ns_re_ka,
+ "gn": wiki_ns_re_gn,
+ "sr_el": wiki_ns_re_sr_el,
+ "cs": wiki_ns_re_cs,
+ "sc": wiki_ns_re_sc,
+ "km": wiki_ns_re_km,
+ "sk": wiki_ns_re_sk,
+ "bpy": wiki_ns_re_bpy,
+ "he": wiki_ns_re_he,
+ "hi": wiki_ns_re_hi,
+ "hu": wiki_ns_re_hu,
+ "lt": wiki_ns_re_lt,
+ "hy": wiki_ns_re_hy,
+ "ps": wiki_ns_re_ps,
+ "ksh": wiki_ns_re_ksh,
+ "tr": wiki_ns_re_tr,
+ "af": wiki_ns_re_af,
+ "zh_hans": wiki_ns_re_zh_hans,
+ "id": wiki_ns_re_id,
+ "tet": wiki_ns_re_tet,
+ "an": wiki_ns_re_an,
+ "ar": wiki_ns_re_ar,
+ "tg_cyrl": wiki_ns_re_tg_cyrl,
+ "rmy": wiki_ns_re_rmy,
+ "mk": wiki_ns_re_mk,
+ "eu": wiki_ns_re_eu,
+ "az": wiki_ns_re_az,
+ "bat_smg": wiki_ns_re_bat_smg,
+ "it": wiki_ns_re_it,
+ "ms": wiki_ns_re_ms,
+ "ba": wiki_ns_re_ba,
+ "be": wiki_ns_re_be,
+ "crh_cyrl": wiki_ns_re_crh_cyrl,
+ "nn": wiki_ns_re_nn,
+ "nv": wiki_ns_re_nv,
+ "ru": wiki_ns_re_ru,
+ "crh_latn": wiki_ns_re_crh_latn,
+ "be_tarask": wiki_ns_re_be_tarask,
+ "yue": wiki_ns_re_yue,
+ "kn": wiki_ns_re_kn,
+ "sl": wiki_ns_re_sl,
+ "nds": wiki_ns_re_nds,
+ "tlh": wiki_ns_re_tlh,
+ "la": wiki_ns_re_la,
+ "li": wiki_ns_re_li,
+ "hr": wiki_ns_re_hr,
+ "pl": wiki_ns_re_pl,
+ "nds_nl": wiki_ns_re_nds_nl,
+ "pt": wiki_ns_re_pt,
+ "xal": wiki_ns_re_xal,
+ "ast": wiki_ns_re_ast,
+ "ia": wiki_ns_re_ia,
+ "kk_arab": wiki_ns_re_kk_arab,
+ "zh_hant": wiki_ns_re_zh_hant,
+ "fur": wiki_ns_re_fur,
+ "en": wiki_ns_re_en,
+ "lbe": wiki_ns_re_lbe,
+ "ml": wiki_ns_re_ml,
+ "fiu_vro": wiki_ns_re_fiu_vro,
+ "yi": wiki_ns_re_yi,
+ "udm": wiki_ns_re_udm,
+ "ur": wiki_ns_re_ur,
+ "fa": wiki_ns_re_fa,
+ "ku_latn": wiki_ns_re_ku_latn,
+ "uz": wiki_ns_re_uz,
+ "fi": wiki_ns_re_fi,
+ "bn": wiki_ns_re_bn,
+ "pnt": wiki_ns_re_pnt,
+ "br": wiki_ns_re_br,
+ "hsb": wiki_ns_re_hsb,
+ "no": wiki_ns_re_no,
+ "vi": wiki_ns_re_vi,
+ "fy": wiki_ns_re_fy,
+ "ca": wiki_ns_re_ca,
+ "ce": wiki_ns_re_ce,
+ "gl": wiki_ns_re_gl,
+ "sa": wiki_ns_re_sa,
+ "tt_latn": wiki_ns_re_tt_latn,
+ "cu": wiki_ns_re_cu,
+ "ko": wiki_ns_re_ko,
+ "cy": wiki_ns_re_cy,
+ "si": wiki_ns_re_si,
+ "sq": wiki_ns_re_sq,
+ "su": wiki_ns_re_su,
+ "arz": wiki_ns_re_arz,
+ "lb": wiki_ns_re_lb,
+ "pa": wiki_ns_re_pa,
+ "csb": wiki_ns_re_csb,
+ "th": wiki_ns_re_th,
+ "vec": wiki_ns_re_vec,
+ "zea": wiki_ns_re_zea,
+ "lv": wiki_ns_re_lv,
+ "scn": wiki_ns_re_scn,
+ "new": wiki_ns_re_new,
+ "zh_tw": wiki_ns_re_zh_tw,
+ "eo": wiki_ns_re_eo,
+ "es": wiki_ns_re_es,
+ "uk": wiki_ns_re_uk,
+ "bg": wiki_ns_re_bg,
+ "ja": wiki_ns_re_ja,
+ "kaa": wiki_ns_re_kaa,
+ "bcl": wiki_ns_re_bcl,
+ "bs": wiki_ns_re_bs,
+ "stq": wiki_ns_re_stq,
+ "fr": wiki_ns_re_fr,
+ "nl": wiki_ns_re_nl,
+ "ro": wiki_ns_re_ro,
+ "ga": wiki_ns_re_ga,
+ "sr_ec": wiki_ns_re_sr_ec,
+ "kk_cyrl": wiki_ns_re_kk_cyrl,
+ "oc": wiki_ns_re_oc,
+ "wa": wiki_ns_re_wa,
+ "cv": wiki_ns_re_cv,
+ "os": wiki_ns_re_os,
+ "kk_latn": wiki_ns_re_kk_latn,
+ "da": wiki_ns_re_da,
+ "sv": wiki_ns_re_sv,
+ "de": wiki_ns_re_de,
+ "ta": wiki_ns_re_ta,
+ "vls": wiki_ns_re_vls,
+ "te": wiki_ns_re_te,
+ "lo": wiki_ns_re_lo,
+ "ht": wiki_ns_re_ht,
+ "am": wiki_ns_re_am,
+ "pms": wiki_ns_re_pms,
+ "el": wiki_ns_re_el,
+}
+
diff --git a/wikitrans/wikitoken.py b/wikitrans/wikitoken.py
new file mode 100644
index 0000000..49c6c68
--- a/dev/null
+++ b/wikitrans/wikitoken.py
@@ -0,0 +1,318 @@
+# Wiki tokens. -*- coding: utf-8 -*-
+# Copyright (C) 2015-2018 Sergey Poznyakoff
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Wiki markup tokens and associated classes.
+
+This module defines classes for the basic nodes of the Wiki markup parse tree:
+
+WikiNode -- Abstract parse tree node.
+WikiContentNode -- A node associated with some content.
+WikiSeqNode -- A sequence of nodes.
+WikiTextNode -- Textual content.
+WikiDelimNode -- Delimiter.
+WikiTagNode -- Tag (e.g. <tt>, </tt>, <tt />, etc.)
+WikiRefNode -- Wiki reference (e.g. [target|name])
+WikiHdrNode -- Heading (e.g. == Section ==)
+WikiEltNode -- Environment element.
+WikiEnvNode -- Environment (numbered or unnumbered list, definition, etc.)
+WikiIndNode -- Indent node.
+
+Auxiliary classes:
+
+WikiNodeEncoder -- Custom JSONEncoder subclass for serializing objects of the
+ above classes.
+"""
+
+from __future__ import print_function
+import re
+import json
+
+class WikiNodeEncoder(json.JSONEncoder):
+ """Custom JSONEncoder subclass for serializing WikiNode and its subclasses."""
+ def default(self, obj):
+ if isinstance(obj,WikiNode):
+ return obj.jsonEncode()
+ return json.JSONEncoder.default(self, obj)
+
+def jsonencoder(func):
+ def _mkencoder(self):
+ json = func(self)
+ json['wikinode'] = self.__class__.__name__
+ json['type'] = self.type
+ return json
+ return _mkencoder
+
+class WikiNode(object):
+ """Generic parse tree node.
+
+ Attributes:
+
+ type -- actual type of this object (string)
+ parser -- parser instance that owns this node
+ """
+
+ type = 'UNDEF'
+ parser = None
+
+ def __init__(self, parser, **kwargs):
+ self.parser = parser
+ for key in kwargs:
+ if hasattr(self,key):
+ self.__dict__[key] = kwargs[key]
+ else:
+ raise AttributeError("'%s' has no attribute '%s'" % (self.__class__.__name__, key))
+
+ def __str__(self):
+ return json.dumps(self, cls=WikiNodeEncoder, sort_keys=True)
+
+ @jsonencoder
+ def jsonEncode(self):
+ ret = {}
+ for x in dir(self):
+ if x == 'parser' or x.startswith('_') or type(x) == 'function':
+ continue
+ if x in self.__dict__:
+ ret[x] = self.__dict__[x]
+ return ret
+
+ def format(self):
+ """Abstract formatting function.
+
+ Derived classes must override it.
+ """
+ pass
+
+class WikiContentNode(WikiNode):
+ """Generic content node.
+
+ Attributes:
+
+ content -- Actual content
+ """
+
+ content = None
+
+ def format(self):
+ pass
+
+ @jsonencoder
+ def jsonEncode(self):
+ ret = {}
+ if self.content:
+ if self.type == 'TEXT':
+ ret['content'] = self.content
+ elif isinstance(self.content,list):
+ ret['content'] = map(lambda x: x.jsonEncode(), self.content)
+ elif isinstance(self.content,WikiNode):
+ ret['content'] = self.content.jsonEncode()
+ else:
+ ret['content'] = self.content
+ else:
+ ret['content'] = None
+ return ret
+
+class WikiSeqNode(WikiContentNode):
+ """Generic sequence of nodes.
+
+ Attributes:
+
+ content -- list of nodes.
+ """
+
+ def format(self):
+ for x in self.content:
+ x.format()
+
+ @jsonencoder
+ def jsonEncode(self):
+ ret = {}
+ if not self.content:
+ ret['content'] = None
+ elif isinstance(self.content,list):
+ ret['content'] = map(lambda x: x.jsonEncode(), self.content)
+ elif isinstance(self.content,WikiNode):
+ ret['content'] = self.content.jsonEncode()
+ else:
+ ret['content'] = self.content
+ return ret
+
+
+# ##############
+
+class WikiTextNode(WikiContentNode):
+ """Text node.
+
+ Attributes:
+
+ type -- 'TEXT'
+ content -- string
+ """
+
+ type = 'TEXT'
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'content': self.content
+ }
+
+class WikiDelimNode(WikiContentNode):
+ """Delimiter node.
+
+ Attributes:
+
+ type -- 'DELIM'
+ content -- actual delimiter string
+ isblock -- boolean indicating whether it is a block delimiter
+ continuation -- True if continuation is expected
+ """
+
+ type = 'DELIM'
+ isblock=False
+ continuation = False
+
+class WikiTagNode(WikiContentNode):
+ """A Wiki tag.
+
+ Attributes:
+
+ tag -- actual tag name (with '<', '>', and eventual '/' stripped)
+ isblock -- True if this is a block tag
+ args -- List of tag arguments
+ idx -- If this is a "see also" reference, index of this ref in the
+ list of references.
+ FIXME: Perhaps this merits a subclass?
+ """
+
+ tag = None
+ isblock = False
+ args = None
+ idx = None
+
+ def __init__(self, *args, **keywords):
+ super(WikiTagNode, self).__init__(*args, **keywords)
+ if self.type == 'TAG' and self.tag == 'ref' and hasattr(self.parser,'references'):
+ self.idx = len(self.parser.references)
+ self.parser.references.append(self)
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'tag': self.tag,
+ 'isblock': self.isblock,
+ 'args': self.args.tab if self.args else None,
+ 'content': self.content.jsonEncode() if self.content else None,
+ 'idx': self.idx
+ }
+
+class WikiRefNode(WikiContentNode):
+ """Reference node.
+
+ This class represents a wiki reference, such as "[ref|content]".
+
+ Attributes:
+
+ ref -- actual reference
+ content -- content string
+ """
+
+ type = 'REF'
+ ref = None
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'ref': self.ref,
+ 'content': self.content.jsonEncode()
+ }
+
+class WikiHdrNode(WikiContentNode):
+ """A wiki markup header class.
+
+ Attributes:
+
+ level -- header level
+ content -- header content (WikiNode subclass object)
+ """
+
+ type = 'HDR'
+ level = None
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'level': self.level,
+ 'content': self.content.jsonEncode()
+ }
+
+class WikiEltNode(WikiContentNode):
+ """Environment element node.
+
+ Attributes:
+
+ subtype -- type of the environment (numbered, unnumbered, defn)
+ content -- content of the element (WikiNode subclass object)
+ """
+
+ type = 'ELT'
+ subtype = None
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'subtype': self.subtype,
+ 'content': self.content.jsonEncode()
+ }
+
+class WikiEnvNode(WikiContentNode):
+ """Wiki Environment Node
+
+ Attributes:
+
+ envtype -- type of the environment (numbered, unnumbered, defn)
+ level -- nesting level of the environment
+ """
+
+ type = 'ENV'
+ envtype = None
+ level = None
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'envtype': self.envtype,
+ 'level': self.level,
+ 'content': map(lambda x: x.jsonEncode(), self.content)
+ }
+
+class WikiIndNode(WikiContentNode):
+ """Indented block node.
+
+ Attributes:
+
+ level -- Indentation level.
+ content -- Indented content (WikiNode subclass object).
+ """
+
+ type = 'IND'
+ level = None
+
+ @jsonencoder
+ def jsonEncode(self):
+ return {
+ 'level': self.level,
+ 'content': self.content.jsonEncode()
+ }

Return to:

Send suggestions and report system problems to the System administrator.