http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10813
Revision: 10813 Author: amir Date: 2012-12-23 10:27:41 +0000 (Sun, 23 Dec 2012) Log Message: ----------- comma i18n per bug #3598083
Modified Paths: -------------- trunk/pywikipedia/pywikibot/textlib.py trunk/pywikipedia/template.py
Modified: trunk/pywikipedia/pywikibot/textlib.py =================================================================== --- trunk/pywikipedia/pywikibot/textlib.py 2012-12-21 18:46:51 UTC (rev 10812) +++ trunk/pywikipedia/pywikibot/textlib.py 2012-12-23 10:27:41 UTC (rev 10813) @@ -30,7 +30,12 @@ s = s.replace("&", "&") # Must be last return s
- +def comma(langcode): + #TODO: needs to epxand + if langcode=='fa': + return u"،" + else: + return u"," def replaceExcept(text, old, new, exceptions, caseInsensitive=False, allowoverlap=False, marker = '', site = None): """
Modified: trunk/pywikipedia/template.py =================================================================== --- trunk/pywikipedia/template.py 2012-12-21 18:46:51 UTC (rev 10812) +++ trunk/pywikipedia/template.py 2012-12-23 10:27:41 UTC (rev 10813) @@ -215,7 +215,7 @@
# get edit summary message if it's empty if (self.editSummary==''): - Param = {'list': (', ').join(self.templates.keys()), + Param = {'list': pywikibot.comma(site.language()).join(self.templates.keys()), 'num' : len(self.templates)} if self.remove: self.editSummary = i18n.twntranslate(
pywikipedia-svn@lists.wikimedia.org