Revision: 4422
Author: huji
Date: 2007-10-05 12:36:52 +0000 (Fri, 05 Oct 2007)
Log Message:
-----------
*Updates three more files, so they can use the new translate() function.
*Updates messages.py accordingly.
Modified Paths:
--------------
branches/pywikipedia/messages/capitalize_redirects.py
branches/pywikipedia/messages/casechecker.py
branches/pywikipedia/messages/catall.py
branches/pywikipedia/messages/messages.py
Modified: branches/pywikipedia/messages/capitalize_redirects.py
===================================================================
--- branches/pywikipedia/messages/capitalize_redirects.py 2007-10-04 19:37:02 UTC (rev
4421)
+++ branches/pywikipedia/messages/capitalize_redirects.py 2007-10-05 12:36:52 UTC (rev
4422)
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-'''
+"""
Bot to create redirects.
Command-line arguments:
@@ -29,7 +29,7 @@
-always Don't prompt to make changes, just do them.
Example: "python capitalize_redirects.py -start:B -always"
-'''
+"""
#
# (C) Yrithinnd
# Class licensed under terms of the MIT license
@@ -39,12 +39,6 @@
import time, sys
import wikipedia, pagegenerators, catlib
-msg = {
- 'en': u'Robot: Create redirect to [[%s]]',
- 'fr': u'robot: créez redirect à [[%s]]',
- 'pt': u'Bot: Criando redirect para [[%s]]',
- }
-
class CapitalizeBot:
def __init__(self, generator, acceptall):
self.generator = generator
@@ -68,7 +62,7 @@
if self.acceptall or choice in ['y', 'Y']:
try:
wikipedia.setAction(
- wikipedia.translate(wikipedia.getSite(), msg)
+ wikipedia.translate(wikipedia.getSite(), 'Robot: Create
redirect to [[%s]]')
% page_t)
np.put(u"#REDIRECT [[%s]]" % page_t)
print
Modified: branches/pywikipedia/messages/casechecker.py
===================================================================
--- branches/pywikipedia/messages/casechecker.py 2007-10-04 19:37:02 UTC (rev 4421)
+++ branches/pywikipedia/messages/casechecker.py 2007-10-05 12:36:52 UTC (rev 4422)
@@ -1,6 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-""" Script to enumerate all pages on the wiki and find all titles
+"""
+Script to enumerate all pages on the wiki and find all titles
with mixed latin and cyrilic alphabets.
"""
Modified: branches/pywikipedia/messages/catall.py
===================================================================
--- branches/pywikipedia/messages/catall.py 2007-10-04 19:37:02 UTC (rev 4421)
+++ branches/pywikipedia/messages/catall.py 2007-10-05 12:36:52 UTC (rev 4422)
@@ -22,18 +22,6 @@
wikipedia.get_throttle.setDelay(5)
wikipedia.put_throttle.setDelay(10)
-msg={
- 'en':u'Bot: Changing categories',
- 'he':u'Bot: משנה קטגוריות',
- 'fr':u'Bot: Change categories',
- 'ia':u'Bot: Alteration de categorias',
- 'lt':u'robotas: Keičiamos kategorijos',
- 'nl':u'Bot: Verandering van categorieen',
- 'pl':u'Bot: Zmiana kategorii',
- 'pt':u'Bot: Categorizando',
- 'sr':u'Bot: Измена категорија',
- }
-
def choosecats(pagetext):
chosen=[]
flag=False
@@ -72,7 +60,7 @@
for p in list:
cattitle="%s:%s" % (site.category_namespace(), p)
pllist.append(wikipedia.Page(site,cattitle))
- page.put(wikipedia.replaceCategoryLinks(page.get(), pllist), comment =
wikipedia.translate(site.lang, msg))
+ page.put(wikipedia.replaceCategoryLinks(page.get(), pllist), comment =
wikipedia.translate(site.lang, 'Bot: Changing categories'))
docorrections=True
start=[]
Modified: branches/pywikipedia/messages/messages.py
===================================================================
--- branches/pywikipedia/messages/messages.py 2007-10-04 19:37:02 UTC (rev 4421)
+++ branches/pywikipedia/messages/messages.py 2007-10-05 12:36:52 UTC (rev 4422)
@@ -5,9 +5,30 @@
"""
__version__ = '$Id: basic.py 4401 2007-10-03 12:52:09Z huji $'
edit_summaries = {
+ #basic.py
'Adding "test" to the beginning of the page.':
{
'nl' : u'"Test" toegevoegd aan het begin van de
pagina.',
'fa' : u'افزودن «Test» به ابتدای صفحه',
+ },
+ #capitalize_redirects.py
+ 'Robot: Create redirect to [[%s]]':
+ {
+ 'fr': u'robot: créez redirect à [[%s]]',
+ 'pt': u'Bot: Criando redirect para [[%s]]',
+ 'fa': u'ربات: ایجاد تغییرمسیر به [[%s]]',
+ },
+ #catall.py
+ 'Bot: Changing categories':
+ {
+ 'he':u'Bot: משנה קטגוריות',
+ 'fa':u'ربات: تغییر رده',
+ 'fr':u'Bot: Change categories',
+ 'ia':u'Bot: Alteration de categorias',
+ 'lt':u'robotas: Keičiamos kategorijos',
+ 'nl':u'Bot: Verandering van categorieen',
+ 'pl':u'Bot: Zmiana kategorii',
+ 'pt':u'Bot: Categorizando',
+ 'sr':u'Bot: Измена категорија',
}
}
\ No newline at end of file