[Pywikipedia-l] SVN: [4714] trunk/pywikipedia/add_text.py
leogregianin at svn.wikimedia.org
leogregianin at svn.wikimedia.org
Sat Dec 15 15:22:51 UTC 2007
Revision: 4714
Author: leogregianin
Date: 2007-12-15 15:22:46 +0000 (Sat, 15 Dec 2007)
Log Message:
-----------
translated messages
Modified Paths:
--------------
trunk/pywikipedia/add_text.py
Modified: trunk/pywikipedia/add_text.py
===================================================================
--- trunk/pywikipedia/add_text.py 2007-12-15 13:06:21 UTC (rev 4713)
+++ trunk/pywikipedia/add_text.py 2007-12-15 15:22:46 UTC (rev 4714)
@@ -56,6 +56,11 @@
import re, pagegenerators, urllib2, urllib
import wikipedia, catlib
+msg = {
+ 'en': u'Bot: Adding %s',
+ 'pt': u'Bot: Adicionando %s',
+ }
+
class NoEnoughData(wikipedia.Error):
""" Error class for when the user doesn't specified all the data needed """
@@ -168,7 +173,7 @@
if not addText:
raise NoEnoughData('You have to specify what text you want to add!')
if not summary:
- summary = 'Bot: Adding %s' % addText
+ summary = wikipedia.setAction(wikipedia.translate(wikipedia.getSite(), msg) % addText)
# Main Loop
for page in generator:
wikipedia.output(u'Loading %s...' % page.title())
More information about the Pywikipedia-l
mailing list