Revision: 7027
Author: alexsh
Date: 2009-07-07 19:00:37 +0000 (Tue, 07 Jul 2009)
Log Message:
-----------
Add exception for API disabled families, and comment some ideas for get namespaces without API.
Modified Paths:
--------------
trunk/pywikipedia/maintenance/family_check.py
Modified: trunk/pywikipedia/maintenance/family_check.py
===================================================================
--- trunk/pywikipedia/maintenance/family_check.py 2009-07-07 04:55:39 UTC (rev 7026)
+++ trunk/pywikipedia/maintenance/family_check.py 2009-07-07 19:00:37 UTC (rev 7027)
@@ -7,8 +7,14 @@
import simplejson
def check_namespaces(site):
- if not site.apipath():
- output(u'Warning! %s has no apipath() defined!' % site)
+ try:
+ if not site.apipath():
+ output(u'Warning! %s has no apipath() defined!' % site)
+ return
+ except NotImplementedError:
+# TODO: If use Special:Export to get XML file and parse details in <namespaces></namespaces>,
+# we can get the namespace names without API.
+ output(u'Warning! %s is not support API!' % site)
return
predata = { 'action': 'query',
'meta': 'siteinfo',
Revision: 7022
Author: alexsh
Date: 2009-07-06 08:18:43 +0000 (Mon, 06 Jul 2009)
Log Message:
-----------
Patch zh and ru translation (ru from bug #2816849 , zh by myself)
Modified Paths:
--------------
trunk/pywikipedia/imagecopy.py
Modified: trunk/pywikipedia/imagecopy.py
===================================================================
--- trunk/pywikipedia/imagecopy.py 2009-07-06 08:16:35 UTC (rev 7021)
+++ trunk/pywikipedia/imagecopy.py 2009-07-06 08:18:43 UTC (rev 7022)
@@ -198,7 +198,9 @@
'nl': u'Dit bestand staat nu op [[w:nl:Wikimedia Commons|Wikimedia Commons]].',
'pl': u'Plik jest teraz dostępny na Wikimedia Commons.',
'pt': u'Arquivo está agora na Wikimedia Commons.',
+ 'ru': u'Файл теперь доступен на Викискладе.',
'sr': u'Слика је сада доступна и на Викимедија Остави.',
+ 'zh': u'檔案已存在於維基共享資源。',
}
moveToCommonsTemplate = {
@@ -224,6 +226,8 @@
'en': u'[[:File:%s|File]] moved to [[:commons:Image:%s|commons]].',
'hu': u'[[:File:%s|Kép]] átmozgatva a [[:commons:Image:%s|Commons]]ba.',
'nl': u'[[:File:%s|Bestand]] is verplaatst naar [[:commons:Image:%s|commons]].',
+ 'ru': u'[[:File:%s|Файл]] перемещён на [[:commons:Image:%s|Викисклад]].',
+ 'zh': u'[[:File:%s|本檔案]]已移至[[:commons:Image:%s|維基共享資源]]',
}
def pageTextPost(url,parameters):