alexsh@svn.wikimedia.org ha scritto:
Revision: 6956 Author: alexsh Date: 2009-06-12 14:28:43 +0000 (Fri, 12 Jun 2009)
Log Message:
speedy_delete.py *Fix: delete reasons failure when using multiple project (tested on en.wikinews and zh.wikipedia) *MsgUp: CSD Categories from commons, incubator, meta and mediawiki. *MsgUp: Messages make multiple projects in delete_reasons, talk_deletion_msg, and deletion_messages.
1 commit instead of 3 or 2.
if self.delete_reasons.has_key(self.mySite.family.name):
if self.delete_reasons[self.mySite.family.name].has_key(page.site().lang):
localReasons = wikipedia.translate(page.site().lang, self.delete_reasons)
wikipedia.output(u'')
for key, reason in localReasons.iteritems():
extra spaces
wikipedia.output((key + ':').ljust(8) + reason)
wikipedia.output(u'')
reason = wikipedia.input(u'Please enter the reason for deletion, choose a default reason, or press enter for the suggested message:')
if localReasons.has_key(reason.strip()):
reason = localReasons[reason]
else:
reason = wikipedia.input(u'Please enter the reason for deletion, or press enter for the suggested message:') else: reason = wikipedia.input(u'Please enter the reason for deletion, or press enter for the suggested message:')
if A in dict and B in dict: ... else: reason ...