http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10037
Revision: 10037 Author: valhallasw Date: 2012-03-21 22:55:26 +0000 (Wed, 21 Mar 2012) Log Message: ----------- Correct namespace determination for djvutext.py
Patch by Lars Aronsson aronsson@users.sourceforge.net Reference: pywikipediabot-Patches-3509885
Modified Paths: -------------- trunk/pywikipedia/djvutext.py
Modified: trunk/pywikipedia/djvutext.py =================================================================== --- trunk/pywikipedia/djvutext.py 2012-03-21 21:31:05 UTC (rev 10036) +++ trunk/pywikipedia/djvutext.py 2012-03-21 22:55:26 UTC (rev 10037) @@ -121,7 +121,7 @@ Loads the given page, does some changes, and saves it. """ site = pywikibot.getSite() - page_namespace = site.family.namespaces[104][site.lang] + page_namespace = site.mediawiki_message('Proofreadpage namespace') page = pywikibot.Page(site, u'%s:%s/%d' % (page_namespace, self.prefix, pageno)) exists = page.exists() @@ -228,7 +228,7 @@ raise pywikibot.PageNotFound(u"Found family '%s'; Wikisource required." % site.family.name)
if not index_page.exists() and index_page.namespace() == 0: - index_namespace = pywikibot.Page(site, 'MediaWiki:Proofreadpage index namespace').get() + index_namespace = site.mediawiki_message('Proofreadpage index namespace')
index_page = pywikibot.Page(pywikibot.getSite(), u"%s:%s" % (index_namespace, index))
pywikipedia-svn@lists.wikimedia.org