http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11428
Revision: 11428 Author: xqt Date: 2013-04-22 09:31:23 +0000 (Mon, 22 Apr 2013) Log Message: ----------- set fallback to False for L10N
Modified Paths: -------------- trunk/pywikipedia/clean_sandbox.py
Modified: trunk/pywikipedia/clean_sandbox.py =================================================================== --- trunk/pywikipedia/clean_sandbox.py 2013-04-21 20:16:57 UTC (rev 11427) +++ trunk/pywikipedia/clean_sandbox.py 2013-04-22 09:31:23 UTC (rev 11428) @@ -136,7 +136,9 @@ self.user = user self.site = pywikibot.getSite() if self.user: - localSandboxTitle = pywikibot.translate(self.site, user_sandboxTemplate) + localSandboxTitle = pywikibot.translate(self.site, + user_sandboxTemplate, + fallback=False) localSandbox = pywikibot.Page(self.site, localSandboxTitle) content.update(user_content) sandboxTitle[self.site.lang] = [item.title() \ @@ -163,7 +165,8 @@ while True: wait = False now = time.strftime("%d %b %Y %H:%M:%S (UTC)", time.gmtime()) - localSandboxTitle = pywikibot.translate(self.site, sandboxTitle) + localSandboxTitle = pywikibot.translate(self.site, sandboxTitle, + fallback=False) if type(localSandboxTitle) is list: titles = localSandboxTitle else: @@ -173,7 +176,8 @@ pywikibot.output(u'Preparing to process sandbox page %s' % sandboxPage.title(asLink=True)) try: text = sandboxPage.get() - translatedContent = pywikibot.translate(self.site, content) + translatedContent = pywikibot.translate(self.site, content, + fallback=False) translatedMsg = i18n.twtranslate(self.site, 'clean_sandbox-cleaned') subst = 'subst:' in translatedContent