[Pywikipedia-svn] SVN: [7221] trunk/pywikipedia/wikipedia.py

alexsh at svn.wikimedia.org alexsh at svn.wikimedia.org
Fri Sep 11 05:59:46 UTC 2009


Revision: 7221
Author:   alexsh
Date:     2009-09-11 05:59:45 +0000 (Fri, 11 Sep 2009)

Log Message:
-----------
Page().put(): encodeEsperantoX is not necessary when API enable (bug #2856143)

Modified Paths:
--------------
    trunk/pywikipedia/wikipedia.py

Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py	2009-09-08 09:19:44 UTC (rev 7220)
+++ trunk/pywikipedia/wikipedia.py	2009-09-11 05:59:45 UTC (rev 7221)
@@ -1432,7 +1432,7 @@
         newPage = not self.exists()
         # if posting to an Esperanto wiki, we must e.g. write Bordeauxx instead
         # of Bordeaux
-        if self.site().lang == 'eo':
+        if self.site().lang == 'eo' and not config.use_api:
             newtext = encodeEsperantoX(newtext)
             comment = encodeEsperantoX(comment)
 
@@ -7139,7 +7139,7 @@
     if code == 'ckb':
         return ['ku', 'ar']
     #Chinese
-    if code in ['minnan', 'zh', 'zh-classical', 'zh-min-nan', 'zh-tw']:
+    if code in ['minnan', 'zh', 'zh-classical', 'zh-min-nan', 'zh-tw', 'zh-hans', 'zh-hant']:
         return ['zh', 'zh-tw', 'zh-cn', 'zh-classical']
     if code in ['cdo', 'gan', 'hak', 'ii', 'wuu', 'za', 'zh-cdo', 'zh-classical',
                 'zh-cn', 'zh-yue']:





More information about the Pywikipedia-svn mailing list