http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9033
Revision: 9033 Author: xqt Date: 2011-03-10 06:44:32 +0000 (Thu, 10 Mar 2011) Log Message: ----------- stripped trailing whitespace
Modified Paths: -------------- branches/rewrite/pywikibot/i18n.py
Modified: branches/rewrite/pywikibot/i18n.py =================================================================== --- branches/rewrite/pywikibot/i18n.py 2011-03-10 06:43:06 UTC (rev 9032) +++ branches/rewrite/pywikibot/i18n.py 2011-03-10 06:44:32 UTC (rev 9033) @@ -23,7 +23,7 @@ If no translation is available to a specified language, translate() will try each of the specified fallback languages, in order, until it finds one with a translation, with 'en' and '_default' as a last resort. - + For example, if for language 'xx', you want the preference of languages to be: xx > fr > ru > en, you let altlang return ['fr', 'ru']. """ @@ -228,7 +228,7 @@ # There are two possible failure modes: the translation dict might not have # the language altogether, or a specific key could be untranslated. Both # modes are caught with the KeyError. - + trans = None try: trans = transdict[code][twtitle]
pywikipedia-svn@lists.wikimedia.org