http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10897
Revision: 10897 Author: multichill Date: 2013-01-12 18:51:22 +0000 (Sat, 12 Jan 2013) Log Message: ----------- Move around unreachable code and change reference to incorrect variable deletion_reason_move to 'category-was-moved'.
Now the standard move action gives decent edit summaries.
Modified Paths: -------------- trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py =================================================================== --- trunk/pywikipedia/category.py 2013-01-12 16:22:03 UTC (rev 10896) +++ trunk/pywikipedia/category.py 2013-01-12 18:51:22 UTC (rev 10897) @@ -401,16 +401,17 @@ site = pywikibot.getSite() newCat = catlib.Category(site, self.newCatTitle) # set edit summary message - if not self.editSummary: - self.editSummary = i18n.twtranslate(site, 'category-changing') \ - % {'oldcat':self.oldCat.title(), - 'newcat':newCat.title()}
if self.useSummaryForDeletion and self.editSummary: reason = self.editSummary else: - reason = i18n.twtranslate(site, deletion_reason_move) \ + reason = i18n.twtranslate(site, 'category-was-moved') \ % {'newcat': self.newCatTitle, 'title': self.newCatTitle} + + if not self.editSummary: + self.editSummary = i18n.twtranslate(site, 'category-changing') \ + % {'oldcat':self.oldCat.title(), + 'newcat':newCat.title()}
# Copy the category contents to the new category page copied = False
pywikipedia-svn@lists.wikimedia.org