Multilingual development (jira testing)
---------------------------------------
Key: PYWP-2
URL: https://jira.ts.wikimedia.org/browse/PYWP-2
Project: pywikipedia
Issue Type: New Feature
Components: Framework
Reporter: Merlijn van Deen
(copied from the original report at http://sourceforge.net/tracker/index.php?func=detail&aid=1768728&group_id=9… )
English speaking at end
==Francais== Texte d'origine
Bonjour
Je voudrais vous proposer un système qui permet de rendre le robot
multilingue. En effet, tous les messages envoyé à la console sont
anglophone. Or le but d'un robot est de s'adapter à la multitude des
languages pouvant exister de la part des utilisateurs. C'est pour cela que
je vous propose le système suivant :
Création d'un nouveau répertoire 'lang'. Dans ce répertoire s'y
trouverait des fichiers de type XX.py (XX étant le code ISO 639 de la
langue). Donc ce répertoire contiendra 1 ficher par code de langue
existant.
Lorsque les différents programmes veulent afficher un message sur la
console, la commande utilisé est très souvent 'wikipedia.output' ou
'wikipedia.input'. Le travail de cette commande serait d'appeller le
fichier xx.py avec le numéro du message à renvoyer en paramètre, le
choix du xx serait donnée par la variable mylang de user-config.py. le
fichier xx.py enverrais alors le message à afficher en tenant compte des
différentes variables de type %s (ou autre) bien entendu
Exemple :
dans user-config.py, j'ai "mylang = 'fr'"
Replace.py à la ligne 375 contient la commande "wikipedia.input(u'Please
enter the new text:')",
Le nouveau système coderait "wikipedia.input(u'Please enter the new
text:')" par "wikipedia.input.message(284)"
appelerait donc lang/fr.py et lui demanderais de lui retourner le message
n° 284 qui serait "s'il vous plais, entrez le nouveaux texte :" et le lui
retourne.
Voila, en esperant avoir compris ma demande.
Je vous remercie de votre écoute
==English== Text translates since French by a machine translation system
Hello
I would like to propose you a system which allows to return the
multilingual robot. Indeed, all the messages messenger in the console are
English-speaking. Now the purpose of a robot is to adapt itself to the
multitude of the languages which can exist on behalf of the users. It is
for it that I propose you the following system:
Creation of a new directory ' lang '. In this directory would be files of
type XX.py (XX there being the code ISO 639 of the language). Thus this
directory will contain 1 file by existing code of language.
When the various programs want to post a message on the console, the order
used is very often ' wikipedia.output ' or ' wikipedia.input '. The work of
this order would be to call the xx.py file with the number of the message
to be sent back in parameter, the choice of the xx would be given by the
mylang variable to user-config.py
The xx.py file would send then the message to be posted(shown) by taking
into account various variables of type %s (or other) naturally
Example:
In user-config.py, I have " mylang = ' fr ' "
Replace.py in the line 375 contains the command " wikipedia.input (u'
Please enter the new text: ') ",
The new system would code " wikipedia.input (u' Please enter the new text:
') "by" wikipedia.input.message (284) " call thus lang/fr.py and would ask
it to return it the message n° 284 which would be " s'il vous plais,
entrez le nouveaux texte : ".
Here we are, by hoping to have understood my demand.
I thank you for your listening
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.ts.wikimedia.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Anarchopedia is using ISO 639-2 (three letters) codes from its
beginning. Two letters codes are generally Apache config hack for
compatibility with Wikipedia (interwiki links also have compatibility
with Wikipedia and they are usually used, even three letters codes
should be used). Long time ago I asked Andre Engels how to change
that, but I forgot how to do that. So, may someone fix it? Here is the
list of the pairs:
ar:ara
id:ind
bs:bos
zh:chi
da:dan
de:deu
el:ell
es:spa
eo:epo
fr:fra
hr:hrv
it:ita
ja:jpn
lt:lit
nl:dut
no:nor
nn:nno
pl:pol
pt:por
ro:rum
ru:rus
sr:srp
sh:nsh
sv:swe
(nsh is not an ISO 639-2 code)
Patches item #1861136, was opened at 2007-12-31 00:48
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1861136&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gerben van der Stouwe (gerbennn)
Assigned to: Nobody/Anonymous (nobody)
Summary: image.py namespace translation
Initial Comment:
This patches image.py to also look for images using the local namespace. For example on nl.wp:
It will now look (in addition to [[Image:<arg>]]) for [[Afbeelding:<arg>]].
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-31 22:27
Message:
Logged In: YES
user_id=1327030
Originator: NO
Should be fixed in r4787 and 4788.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1861136&group_…
Revision: 4787
Author: rotem
Date: 2007-12-31 20:25:04 +0000 (Mon, 31 Dec 2007)
Log Message:
-----------
In family.namespace, making the 'all' parameter include more than just the aliases: also the default namespaces, the lowercase forms and the the underscore forms. Using it in more places. This should also fix the problem for which patch 1861136 was suggested.
Modified Paths:
--------------
trunk/pywikipedia/commonsdelinker/delinker.py
trunk/pywikipedia/cosmetic_changes.py
trunk/pywikipedia/family.py
trunk/pywikipedia/image.py
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/commonsdelinker/delinker.py
===================================================================
--- trunk/pywikipedia/commonsdelinker/delinker.py 2007-12-31 19:45:27 UTC (rev 4786)
+++ trunk/pywikipedia/commonsdelinker/delinker.py 2007-12-31 20:25:04 UTC (rev 4787)
@@ -186,7 +186,7 @@
def create_regex_i(s):
return ur'(?:%s)' % u''.join([u'[%s%s]' % (c.upper(), c.lower()) for c in s])
- namespaces = ('Image', 'Media') + site.namespace(6, all = True) + site.namespace(-2, all = True)
+ namespaces = site.namespace(6, all = True) + site.namespace(-2, all = True)
r_namespace = ur'\s*(?:%s)\s*\:\s*' % u'|'.join(map(create_regex_i, namespaces))
# Note that this regex creates a group!
r_image = u'(%s)' % create_regex(image).replace(r'\_', '[ _]')
Modified: trunk/pywikipedia/cosmetic_changes.py
===================================================================
--- trunk/pywikipedia/cosmetic_changes.py 2007-12-31 19:45:27 UTC (rev 4786)
+++ trunk/pywikipedia/cosmetic_changes.py 2007-12-31 20:25:04 UTC (rev 4787)
@@ -149,38 +149,10 @@
continue
namespaces = list(family.namespace(self.site.lang, nsNumber, all = True))
thisNs = namespaces.pop(0)
- try:
- default = list(family.namespace('_default', nsNumber, all = True))
- except KeyError:
- default = []
# skip main (article) namespace
- if thisNs:
- wrongNamespaces = []
-
- # Add aliases and default namespaces
- wrongNamespaces.extend([ns for ns in namespaces if ns != thisNs])
- wrongNamespaces.extend([ns for ns in default if ns != thisNs and ns not in wrongNamespaces])
-
- # Lowercase versions of namespaces
- if not self.site.nocapitalize:
- # Add lowercase version of the current wrong namespaces
- wrongNamespaces.extend([ns[0].lower() + ns[1:] for ns in wrongNamespaces if ns[0].lower() != ns[0].upper()])
-
- # Add lowercase version of the correct namespace
- uncapitalized = thisNs[0].lower() + thisNs[1:]
- if uncapitalized != thisNs:
- wrongNamespaces.append(uncapitalized)
-
- # Underscore versions of namespaces
- # Add underscore versions of all wrong namespaces
- wrongNamespaces.extend([ns.replace(' ', '_') for ns in wrongNamespaces if ' ' in ns])
- # Add underscore version of correct namespace
- if ' ' in thisNs:
- wrongNamespaces.append(thisNs.replace(' ', '_'))
-
- if wrongNamespaces:
- text = wikipedia.replaceExcept(text, r'\[\[\s*(' + '|'.join(wrongNamespaces) + ') *:(?P<nameAndLabel>.*?)\]\]', r'[[' + thisNs + ':\g<nameAndLabel>]]', exceptions)
+ if thisNs and namespaces:
+ text = wikipedia.replaceExcept(text, r'\[\[\s*(' + '|'.join(namespaces) + ') *:(?P<nameAndLabel>.*?)\]\]', r'[[' + thisNs + ':\g<nameAndLabel>]]', exceptions)
return text
def cleanUpLinks(self, text):
Modified: trunk/pywikipedia/family.py
===================================================================
--- trunk/pywikipedia/family.py 2007-12-31 19:45:27 UTC (rev 4786)
+++ trunk/pywikipedia/family.py 2007-12-31 20:25:04 UTC (rev 4787)
@@ -2437,21 +2437,39 @@
raise KeyError('ERROR: Unknown namespace %d for %s:%s' % (ns_number, code, self.name))
elif self.isNsI18N(ns_number, code):
v = self.namespaces[ns_number][code]
+ if type(v) is not list:
+ v = [v,]
+ if all and self.isNsI18N(ns_number, fallback):
+ v2 = self.namespaces[ns_number][fallback]
+ if type(v2) is list:
+ v.extend(v2)
+ else:
+ v.append(v2)
elif fallback and self.isNsI18N(ns_number, fallback):
v = self.namespaces[ns_number][fallback]
+ if type(v) is not list:
+ v = [v,]
else:
raise KeyError('ERROR: title for namespace %d in language %s unknown' % (ns_number, code))
if all:
- if type(v) is list:
- return tuple(v)
- else:
- return (v, )
+ namespaces = []
+
+ # Unique list
+ for ns in v:
+ if ns not in namespaces:
+ namespaces.append(ns)
+
+ # Lowercase versions of namespaces
+ if code not in self.nocapitalize:
+ namespaces.extend([ns[0].lower() + ns[1:] for ns in namespaces if ns and ns[0].lower() != ns[0].upper()])
+
+ # Underscore versions of namespaces
+ namespaces.extend([ns.replace(' ', '_') for ns in namespaces if ns and ' ' in ns])
+
+ return tuple(namespaces)
else:
- if type(v) is list:
- return v[0]
- else:
- return v
+ return v[0]
def isDefinedNS(self, ns_number):
"""Return True if the namespace has been defined in this family.
@@ -2561,17 +2579,7 @@
return self.namespace(code, 14, fallback)
def category_namespaces(self, code):
- namespaces = []
- namespace_title = self.namespace(code, 14)
- namespaces.append(namespace_title)
- if namespace_title != namespace_title.lower():
- namespaces.append(namespace_title.lower())
- default_namespace_title = self.namespace('_default', 14)
- if namespace_title != default_namespace_title:
- namespaces.append(default_namespace_title)
- if default_namespace_title != default_namespace_title.lower():
- namespaces.append(default_namespace_title.lower())
- return namespaces
+ return self.namespace(code, 14, all = True)
# Redirect code can be translated.
# Note that redirect codes are case-insensitive, so it is enough
Modified: trunk/pywikipedia/image.py
===================================================================
--- trunk/pywikipedia/image.py 2007-12-31 19:45:27 UTC (rev 4786)
+++ trunk/pywikipedia/image.py 2007-12-31 20:25:04 UTC (rev 4787)
@@ -109,15 +109,14 @@
old = self.oldImage
old = re.sub('[_ ]', '[_ ]', old)
- #TODO: Add internationalization of Image namespace name.
if not self.loose or not self.newImage:
- ImageRegex = re.compile(r'\[\[ *[Ii]mage:' + old + ' *(?P<parameters>\|[^\n]+|) *\]\]')
+ ImageRegex = re.compile(r'\[\[ *(?:' + '|'.join(wikipedia.getSite().namespace(6, all = True)) + ')\s*:\s*' + old + ' *(?P<parameters>\|[^\n]+|) *\]\]')
else:
ImageRegex = re.compile(r'' + old)
if self.newImage:
if not self.loose:
- replacements.append((ImageRegex, '[[Image:' + self.newImage + '\g<parameters>]]'))
+ replacements.append((ImageRegex, '[[(?:' + '|'.join(wikipedia.getSite().namespace(6, all = True)) + ')\s*:\s*' + self.newImage + '\g<parameters>]]'))
else:
replacements.append((ImageRegex, self.newImage))
else:
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2007-12-31 19:45:27 UTC (rev 4786)
+++ trunk/pywikipedia/wikipedia.py 2007-12-31 20:25:04 UTC (rev 4787)
@@ -2182,14 +2182,6 @@
text = self.get()
new_text = text
- def caseInsensitivePattern(s):
- """
- Creates a pattern that matches the string case-insensitively.
- """
- return ur'(?:%s)' % u''.join([u'[%s%s]'
- % (re.escape(c.upper()), re.escape(c.lower()))
- for c in s])
-
def capitalizationPattern(s):
"""
Given a string, creates a pattern that matches the string, with
@@ -2201,9 +2193,9 @@
else:
return ur'(?:[%s%s]%s)' % (re.escape(s[0].upper()), re.escape(s[0].lower()), re.escape(s[1:]))
- namespaces = set(('Image', 'Media') + site.namespace(6, all = True) + site.namespace(-2, all = True))
+ namespaces = set(site.namespace(6, all = True) + site.namespace(-2, all = True))
# note that the colon is already included here
- namespacePattern = ur'\s*(?:%s)\s*\:\s*' % u'|'.join(map(caseInsensitivePattern, namespaces))
+ namespacePattern = ur'\s*(?:%s)\s*\:\s*' % u'|'.join(namespaces)
imagePattern = u'(%s)' % capitalizationPattern(image).replace(r'\_', '[ _]')
Patches item #1860902, was opened at 2007-12-30 15:49
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1860902&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: interface summary for sv and imagecheck zh information
Initial Comment:
as title
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2007-12-31 21:45
Message:
Logged In: YES
user_id=1327030
Originator: NO
Applied to r4786.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1860902&group_…
Revision: 4786
Author: rotem
Date: 2007-12-31 19:45:27 +0000 (Mon, 31 Dec 2007)
Log Message:
-----------
(patch 1860902) interface summary for sv and imagecheck zh information
Modified Paths:
--------------
trunk/pywikipedia/category.py
trunk/pywikipedia/catlib.py
trunk/pywikipedia/checkimages.py
trunk/pywikipedia/featured.py
trunk/pywikipedia/redirect.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2007-12-30 21:23:18 UTC (rev 4785)
+++ trunk/pywikipedia/category.py 2007-12-31 19:45:27 UTC (rev 4786)
@@ -89,6 +89,7 @@
'is':u'Vélmenni: Bæti við [[Flokkur:%s]]',
'it':u'Bot: Aggiungo [[Categoria:%s]]',
'lt':u'robotas: Pridedama [[Kategorija:%s]]',
+ 'ja':u'ロボットによる: カテゴリ追加 [[Category:%s]]',
'kk':u'Бот: [[Санат:%s]] үстеді',
'ko': u'로봇: [[분류:%s]] 추가',
'nds':u'Kat-Bot: [[Kategorie:%s]] rin',
@@ -99,7 +100,7 @@
'pt':u'Bot: Adicionando [[Categoria:%s]]',
'sr':u'Бот: Додаје [[Категорија:%s]]',
'sv':u'Robot: Lägger till [[Kategori:%s]]',
- 'zh':u'機器人:正在新增[[Category:%s]]',
+ 'zh':u'機器人:正在新增目錄 [[Category:%s]]',
}
msg_change={
@@ -116,6 +117,7 @@
'is':u'Vélmenni: Breyti flokknum [[%s]]',
'it':u'Bot: Modifico %s',
'lt':u'robotas: Keičiama %s',
+ 'ja':u'ロボットによる: カテゴリ変更 [[Category:%s]]',
'kk':u'Бот: %s дегенді түзетті',
'ko': u'로봇: %s 수정',
'nds':u'Kat-Bot: %s utwesselt',
@@ -126,7 +128,7 @@
'pl':u'Robot przenosi %s',
'sr':u'Бот: Измена категорије %s',
'sv':u'Robot: Ändrar %s',
- 'zh':u'機器人:正在修改[[Category:%s]]',
+ 'zh':u'機器人:正在變更目錄 [[Category:%s]]',
}
deletion_reason_move = {
@@ -139,6 +141,7 @@
'ia':u'Robot: Categoria transferite a [[Category:%s|%s]]',
'id':u'Bot: Kategori dipindahkan ke [[Category:%s|%s]]',
'it':u'Bot: La categoria è stata sostituita da [[Categoria:%s|%s]]',
+ 'ja':u'ロボットによる: カテゴリ [[Category:%s]]へ移動',
'lt':u'robotas: Kategorija pervadinta į [[Category:%s|%s]]',
'kk':u'Бот: Санат [[Санат:%s|%s]] дегенге жылжытылды',
'ko': u'로봇: 분류가 [[분류:%s|%s]]로 옮겨짐',
@@ -150,7 +153,7 @@
'pl':u'Robot przenosi kategorię do [[Category:%s|%s]]',
'sr':u'Бот: Категорија премештена у [[Category:%s|%s]]',
'sv':u'Robot: Kategori flyttades till [[Category:%s|%s]]',
- 'zh':u'機器人:正在移動到[[Category:%s]]',
+ 'zh':u'機器人:正在移動目錄至 [[Category:%s]]',
}
cfd_templates = {
Modified: trunk/pywikipedia/catlib.py
===================================================================
--- trunk/pywikipedia/catlib.py 2007-12-30 21:23:18 UTC (rev 4785)
+++ trunk/pywikipedia/catlib.py 2007-12-31 19:45:27 UTC (rev 4786)
@@ -25,11 +25,12 @@
msg_created_for_renaming = {
'de':u'Bot: Verschoben von %s. Autoren: %s',
'en':u'Robot: Moved from %s. Authors: %s',
+ 'fr':u'Robot : déplacé depuis %s. Auteurs: %s',
+ 'he':u'בוט: הועבר מהשם %s. כותבים: %s',
'ia':u'Robot: Transferite de %s. Autores: %s',
'id':u'Bot: Memindahkan dari %s. Kontributor: %s',
'it':u'Bot: Voce spostata da %s. Autori: %s',
- 'fr':u'Robot : déplacé depuis %s. Auteurs: %s',
- 'he':u'בוט: הועבר מהשם %s. כותבים: %s',
+ 'ja': u'ロボットによる: %s から移動しました。原作者は %s',
'nl':u'Bot: hernoemd van %s. Auteurs: %s',
'pl':u'Robot przenosi z %s. Autorzy: %s',
'pt':u'Bot: Movido de %s. Autor: %s',
Modified: trunk/pywikipedia/checkimages.py
===================================================================
--- trunk/pywikipedia/checkimages.py 2007-12-30 21:23:18 UTC (rev 4785)
+++ trunk/pywikipedia/checkimages.py 2007-12-31 19:45:27 UTC (rev 4786)
@@ -80,16 +80,18 @@
# That's what you want that will be added. (i.e. the {{no source}} with the right day/month/year )
n_txt = {
'commons':'\n{{subst:nld}}',
- 'en' :'\n{{subst:nld}}',
- 'it' :'\n{{subst:unverdata}}',
- 'hu' :u'\n{{nincslicenc|~~~~~}}',
- }
+ 'en' :'\n{{subst:nld}}',
+ 'it' :'\n{{subst:unverdata}}',
+ 'hu' :u'\n{{nincslicenc|~~~~~}}',
+ 'zh' :'{{subst:no source/auto}}',
+}
txt_find = {
- 'commons':['{{no license', '{{nld'],
+ 'commons':['{{no license', '{{nld'],
'en':['{{nld', '{{no license'],
- 'it':['{{unverdata', '{{unverified'],
- 'hu':[u'{{nincsforrás',u'{{nincslicenc'],
+ 'it':['{{unverdata', '{{unverified'],
+ 'hu':[u'{{nincsforrás',u'{{nincslicenc'],
+ 'zh':['{{no source','{{unknown'],
}
# Summary for when the will add the no source
@@ -98,6 +100,7 @@
'en' :'Bot: Marking newly uploaded untagged file',
'it' :"Bot: Aggiungo unverified",
'hu' :'Robot: Frissen feltöltött licencsablon nélküli fájl megjelölése',
+ 'zh':u'機器人:標示新上傳且未有任何資訊的檔案',
}
# Summary that the bot use when it notify the problem with the image's license
@@ -106,6 +109,7 @@
'en' :"Bot: Requesting source information." ,
'it' :"Bot: Notifico l'unverified",
'hu' :'Robot: Forrásinformáció kérése',
+ 'zh' :u"機器人: 正在請求來源資訊"
}
# When the Bot find that the usertalk is empty is not pretty to put only the no source without the welcome, isn't it?
@@ -114,6 +118,7 @@
'en' :'{{welcome}}\n~~~~\n',
'it' :'{{benvenuto}}\n~~~~\n',
'hu' :u'{{subst:Üdvözlet|~~~~}}\n',
+ 'zh':'{{subst:welcome|sign=~~~~}}',
}
# General summary
@@ -122,6 +127,7 @@
'en' :'Bot: no source',
'it' :'Bot: Unverified!',
'hu' :'Robot: nincs forrás',
+ 'zh':u'機器人:沒有來源資訊',
}
# if the file has an unknown extension it will be tagged with this template.
@@ -131,6 +137,7 @@
'en' :"{{db-meta|The file has .%s as extension.}}",
'it' :'{{cancella subito|motivo=Il file ha come estensione ".%s"}}',
'hu' :u'{{azonnali|A fájlnak .%s a kiterjesztése}}',
+ 'zh' :u'{{delete|未知檔案格式',
}
# The header of the Unknown extension's message.
@@ -139,6 +146,7 @@
'en' :"\n== Unknown extension! ==\n",
'it' :'\n== File non specificato ==\n',
'hu' :u'\n== Ismeretlen kiterjesztésű fájl ==\n',
+ 'zh':u'\n==您上載的檔案格式可能有誤==\n',
}
# Text that will be add if the bot find a unknown extension.
@@ -147,6 +155,7 @@
'en' :'The [[:Image:%s]] file has a wrong extension, please check. ~~~~',
'it' :'{{subst:Utente:Filbot/Ext|%s}}',
'hu' :u'A [[:Kép:%s]] fájlnak rossz a kiterjesztése, kérlek ellenőrízd. ~~~~',
+ 'zh' :u'您好,你上傳的[[:Image:%s]]無法被識別,請檢查您的檔案,謝謝。--~~~~',
}
# Summary of the delate immediately. (f.e: Adding {{db-meta|The file has .%s as extension.}})
del_comm = {
@@ -154,6 +163,7 @@
'en' :'Bot: Adding %s',
'it' :'Bot: Aggiungo %s',
'hu' :u'Robot:"%s" hozzáadása',
+ 'zh' :u'機器人: 正在新增 %s',
}
# This is the most important header, because it will be used a lot. That's the header that the bot
@@ -163,6 +173,7 @@
'en' :"\n== Image without license ==\n",
'it' :"\n== Immagine senza licenza ==\n",
'hu' :u"\n== Licenc nélküli kép ==\n",
+ 'zh' :None,
}
# That's the text that the bot will add if it doesn't find the license.
nothing_notification = {
@@ -170,6 +181,7 @@
'en' :"{{subst:image source|Image:%s}} --~~~~",
'it' :"{{subst:Utente:Filbot/Senza licenza|%s}} --~~~~",
'hu' :u"{{subst:adjforrást|Kép:%s}} \n Ezt az üzenetet ~~~ automatikusan helyezte el a vitalapodon, kérdéseddel fordulj a gazdájához, vagy a [[WP:KF|Kocsmafalhoz]]. --~~~~",
+ 'zh' :u'{{subst:Uploadvionotice|Image:%s}} ~~~~ ',
}
# This is a list of what bots used this script in your project.
# NOTE: YOUR Botnick is automatically added. It's not required to add it twice.
@@ -177,6 +189,7 @@
'commons':['Siebot', 'CommonsDelinker'],
'en' :['OrphanBot'],
'it' :['Filbot', 'Nikbot', '.snoopyBot.'],
+ 'zh':['alexbot'],
}
# The message that the bot will add the second time that find another license problem.
@@ -185,6 +198,7 @@
'en': None,
'it':'{{subst:Utente:Filbot/Senza licenza2|%s}} --~~~~',
'hu':u'\nSzia! Úgy tűnik a [[:Kép:%s]] képpel is hasonló a probléma, mint az előbbivel. Kérlek olvasd el a [[WP:KÉPLIC|feltölthető képek]]ről szóló oldalunk, és segítségért fordulj a [[WP:KF-JO|Jogi kocsmafalhoz]]. Köszönöm --~~~~',
+ 'zh':None,
}
# You can add some settings to wikipedia. In this way, you can change them without touch the code.
# That's useful if you are running the bot on Toolserver.
@@ -193,6 +207,7 @@
'en':None,
'hu':None,
'it':'Utente:Nikbot/Settings#Settings',
+ 'zh':None,
}
# The bot can report some images (like the images that have the same name of an image on commons)
# This is the page where the bot will store them.
@@ -201,6 +216,7 @@
'en' :'User:Filnik/Report',
'it' :'Utente:Nikbot/Report',
'hu' :'User:Bdamokos/Report',
+ 'zh' :u'User:Alexsh/checkimagereport',
}
# Adding the date after the signature.
timeselected = u' ~~~~~'
@@ -210,6 +226,7 @@
'en':"\n*[[:Image:%s]] " + timeselected,
'it':"\n*[[:Immagine:%s]] " + timeselected,
'hu':u"\n*[[:Kép:%s]] " + timeselected,
+ 'zh':"\n*[[:Image:%s]] " + timeselected,
}
# The summary of the report
comm10 = {
@@ -217,6 +234,7 @@
'en':'Bot: Updating the log',
'it':'Bot: Aggiorno il log',
'hu': 'Robot: A napló frissítése',
+ 'zh': u'機器人:更新記錄',
}
# If a template isn't a license but it's included on a lot of images, that can be skipped to
@@ -229,10 +247,11 @@
'en':['information'],
'it':['edp', 'informazioni[ _]file', 'information'],
'hu':[u'információ','enwiki', 'azonnali'],
+ 'zh':[u'information'],
}
# Add your project (in alphabetical order) if you want that the bot start
-project_inserted = ['commons', 'en','hu', 'it']
+project_inserted = ['commons', 'en','hu', 'it','zh']
# Ok, that's all. What is below, is the rest of code, now the code is fixed and it will run correctly in your project.
#########################################################################################################################
Modified: trunk/pywikipedia/featured.py
===================================================================
--- trunk/pywikipedia/featured.py 2007-12-30 21:23:18 UTC (rev 4785)
+++ trunk/pywikipedia/featured.py 2007-12-31 19:45:27 UTC (rev 4786)
@@ -62,6 +62,7 @@
'pl': u'Bot: Link do artykułu wyróżnionego [[%s:%s]]',
'pt': u'Bot: Ligando artigos destacados para [[%s:%s]]',
'sr': u'Bot: Међувики за изабране чланке за [[%s:%s]]',
+ 'sv': u'Bot: [[%s:%s]] är en utmärkt artikel',
'th': u'บอต: ลิงก์บทความคัดสรร [[%s:%s]]',
'vo': u'Bot: Yüm yegeda gudik tefü [[%s:%s]]',
'zh': u'機器人: 連結特色條目 [[%s:%s]]',
@@ -149,6 +150,7 @@
'ro': (CAT, u"Categorie:Articole de calitate"),
'ru': (CAT, u"Категория:Википедия:Избранные статьи"),
'sh': (CAT, u"Category:Izabrani članci"),
+ 'simple': (BACK, u"template:vgood-large"),
'sk': (BACK, u"Šablóna:Perfektný článok"),
'sl': (CAT, u"Category:Izbrani članki"),
'sq': (BACK, u"Template:Perfekt"),
Modified: trunk/pywikipedia/redirect.py
===================================================================
--- trunk/pywikipedia/redirect.py 2007-12-30 21:23:18 UTC (rev 4785)
+++ trunk/pywikipedia/redirect.py 2007-12-31 19:45:27 UTC (rev 4786)
@@ -65,6 +65,7 @@
'pt': u'Bot: Corrigido duplo redirecionamento',
'ru': u'Робот: исправление двойного перенаправления',
'sr': u'Бот: Поправка дуплих преусмерења',
+ 'sv': u'Robot: Rättar dubbel omdirigering',
'th': u'โรบอต: แก้หน้าเปลี่ยนทางซ้ำซ้อน',
'tr': u'Bot değişikliği: Yönlendirmeye olan yönlendirme',
'zh': u'機器人:修正雙重重定向',
Patches item #1861136, was opened at 2007-12-30 23:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1861136&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gerben van der Stouwe (gerbennn)
Assigned to: Nobody/Anonymous (nobody)
Summary: image.py namespace translation
Initial Comment:
This patches image.py to also look for images using the local namespace. For example on nl.wp:
It will now look (in addition to [[Image:<arg>]]) for [[Afbeelding:<arg>]].
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1861136&group_…