http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11429
Revision: 11429 Author: xqt Date: 2013-04-22 09:37:03 +0000 (Mon, 22 Apr 2013) Log Message: ----------- set fallback to False for L10N, update from trunk r11428
Modified Paths: -------------- branches/rewrite/scripts/clean_sandbox.py
Modified: branches/rewrite/scripts/clean_sandbox.py =================================================================== --- branches/rewrite/scripts/clean_sandbox.py 2013-04-22 09:31:23 UTC (rev 11428) +++ branches/rewrite/scripts/clean_sandbox.py 2013-04-22 09:37:03 UTC (rev 11429) @@ -144,7 +144,9 @@ self.site = pywikibot.Site() self.site.login() if self.getOption('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() \ @@ -162,7 +164,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: @@ -172,7 +175,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
pywikipedia-svn@lists.wikimedia.org