http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9365
Revision: 9365 Author: xqt Date: 2011-07-11 04:15:08 +0000 (Mon, 11 Jul 2011) Log Message: ----------- fix for i18n support from trunk r9363
Modified Paths: -------------- branches/rewrite/scripts/category_redirect.py
Modified: branches/rewrite/scripts/category_redirect.py =================================================================== --- branches/rewrite/scripts/category_redirect.py 2011-07-11 04:11:22 UTC (rev 9364) +++ branches/rewrite/scripts/category_redirect.py 2011-07-11 04:15:08 UTC (rev 9365) @@ -210,7 +210,7 @@ return log_text # sort by keys and keep the first (LOG_SIZE-1) values keep = [text for (key, text) in - sorted(log_items.iteritems(), reverse=True)[:LOG_SIZE-1]] + sorted(log_items.iteritems(), reverse=True)[:LOG_SIZE-1]] log_text = "\n".join("\n".join(line for line in text) for text in keep) # get permalink to older logs history = self.log_page.getVersionHistory(total=LOG_SIZE) @@ -471,8 +471,10 @@ + u"\n" + self.get_log_text()) if self.edit_requests: edit_request_page.put(self.edit_request_text - % u"\n".join((self.edit_request_item % item) - for item in self.edit_requests)) + % {'itemlist': + u"\n" + u"\n".join( + (self.edit_request_item % item) + for item in self.edit_requests)})
def main(*args): global bot