Revision: 5579 Author: nicdumz Date: 2008-06-15 16:35:46 +0000 (Sun, 15 Jun 2008)
Log Message: ----------- Patch #1994318 by lin4h [update for Locale ja,zh and namespace, obsolete info...etc]
Modified Paths: -------------- trunk/pywikipedia/basic.py trunk/pywikipedia/blockpageschecker.py trunk/pywikipedia/checkimages.py trunk/pywikipedia/editarticle.py trunk/pywikipedia/families/wikibooks_family.py trunk/pywikipedia/families/wikinews_family.py trunk/pywikipedia/families/wikisource_family.py trunk/pywikipedia/image.py trunk/pywikipedia/isbn.py
Modified: trunk/pywikipedia/basic.py =================================================================== --- trunk/pywikipedia/basic.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/basic.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -32,8 +32,10 @@ 'ar': u'روبوت: تغيير ...', 'de': u'Bot: Ändere ...', 'en': u'Robot: changing ...', + 'ja':u'ロボットによる:編集', 'pt': u'Bot: alterando...', 'sv': u'Bot: Ändrar ...', + 'zh': u'機器人:編輯.....', }
def __init__(self, generator, debug):
Modified: trunk/pywikipedia/blockpageschecker.py =================================================================== --- trunk/pywikipedia/blockpageschecker.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/blockpageschecker.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -149,23 +149,19 @@
def understandBlock(text, TTP, TSP, TSMP, TTMP): """ Understand if the page is blocked and if it has the right template """ - for catchRegex in TTP: # TTP = templateTotalProtection - resultCatch = re.findall(catchRegex, text) + resultCatch = re.findall(TTP, text) + if resultCatch: + return ('sysop-total', catchRegex) + resultCatch = re.findall(TSP, text) + if resultCatch: + return ('autoconfirmed-total', catchRegex) + if TSMP != '' and TTMP != '' and TTP != TTMP and TSP != TSMP: + resultCatch = re.findall(TTMP, text) if resultCatch: - return ('sysop-total', catchRegex) - for catchRegex in TSP: - resultCatch = re.findall(catchRegex, text) + return ('sysop-move', catchRegex) + resultCatch = re.findall(TSMP, text) if resultCatch: - return ('autoconfirmed-total', catchRegex) - if TSMP != None and TTMP != None and TTP != TTMP and TSP != TSMP: - for catchRegex in TTMP: - resultCatch = re.findall(catchRegex, text) - if resultCatch: - return ('sysop-move', catchRegex) - for catchRegex in TSMP: - resultCatch = re.findall(catchRegex, text) - if resultCatch: - return ('autoconfirmed-move', catchRegex) + return ('autoconfirmed-move', catchRegex) return ('editable', r'\A\n') # If editable means that we have no regex, won't change anything with this regex
def debugQuest(site, page):
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/checkimages.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -94,7 +94,7 @@ 'de' :u'{{Benutzer:ABF/D|~~~~}} {{Dateiüberprüfung/benachrichtigt (Kategorie)|{{subst:LOCALYEAR}}|{{subst:LOCALMONTH}}|{{subst:LOCALDAY}}}} {{Dateiüberprüfung/benachrichtigt (Text)|Lizenz|||||}} --This was added by ~~~~-- ', 'en' :u'\n{{subst:nld}}', 'it' :u'\n{{subst:unverdata}}', - 'ja' :u'{{subst:Nsd}}', + 'ja' :u'{{subst:Nld}}', 'hu' :u'\n{{nincslicenc|~~~~~}}', 'ta' :u'\n{{subst:nld}}', 'zh' :u'{{subst:No license/auto}}', @@ -124,7 +124,7 @@ 'en' :u'Bot: Marking newly uploaded untagged file', 'hu' :u'Robot: Frissen feltöltött licencsablon nélküli fájl megjelölése', 'it' :u"Bot: Aggiungo unverified", - 'ja' :u'ロボットによる:出典やライセンスなしの画像をタグ', + 'ja' :u'ロボットによる:著作権情報なしの画像をタグ', 'ta' :u'தானியங்கி:காப்புரிமை வழங்கப்படா படிமத்தை சுட்டுதல்', 'zh' :u'機器人:標示新上傳且未包含必要資訊的檔案', } @@ -135,7 +135,7 @@ 'de' :u'{{subst:willkommen}} ~~~~', 'en' :u'{{welcome}}\n~~~~\n', 'it' :u'<!-- inizio template di benvenuto -->\n{{subst:Benvebot}}\n~~~~\n<!-- fine template di benvenuto -->', - 'ja' :u'{{welcome}}\n--~~~~\n', + 'ja' :u'{{subst:Welcome/intro}}\n{{subst:welcome|--~~~~}}\n', 'hu' :u'{{subst:Üdvözlet|~~~~}}\n', 'zh' :u'{{subst:welcome|sign=~~~~}}', } @@ -147,12 +147,11 @@ 'de' :u'Bot:Notify User', 'en' :u"Bot: Requesting source information." , 'it' :u"Bot: Notifico l'unverified", - 'ja' :u"ロボットによる:出典とライセンス明記のお願い", + 'ja' :u"ロボットによる:著作権情報明記のお願い", 'hu' :u'Robot: Forrásinformáció kérése', - 'ja' :u'{{welcome}}\n--~~~~\n', 'hu' :u'{{subst:Üdvözlet|~~~~}}\n', 'ta' :u'தானியங்கி:மூலம் வழங்கப்படா படிமத்தை சுட்டுதல்', - 'zh' :u'{{subst:welcome|sign=~~~~}}', + 'zh' :u'機器人:告知用戶', }
# if the file has an unknown extension it will be tagged with this template. @@ -161,7 +160,7 @@ 'commons':u"{{speedy|The file has .%s as extension. Is it ok? Please check.}}", 'en' :u"{{db-meta|The file has .%s as extension.}}", 'it' :u'{{cancella subito|motivo=Il file ha come estensione ".%s"}}', - 'ja' :u'{{db|知らないファイルフォーマット%s}}', + 'ja' :u'{{db|知らないファイルフォーマット %s}}', 'hu' :u'{{azonnali|A fájlnak .%s a kiterjesztése}}', 'ta' :u'{{delete|இந்தக் கோப்பு .%s என்றக் கோப்பு நீட்சியைக் கொண்டுள்ளது.}}', 'zh' :u'{{delete|未知檔案格式%s}}', @@ -220,7 +219,7 @@ 'de' :u'\n{{subst:Benutzer:ABF/D2|%s}} ~~~~ ', 'en' :u"{{subst:image source|Image:%s}} --~~~~", 'it' :u"{{subst:Utente:Filbot/Senza licenza|%s}} --~~~~", - 'ja' :u"\n{{subst:image source|Image:%s}}--~~~~", + 'ja' :u"\n{{subst:Image copyright|Image:%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]]. --~~~~", 'ta' :u'\n{{subst:Di-no license-notice|படிமம்:%s}} ~~~~ ', 'zh' :u'\n{{subst:Uploadvionotice|Image:%s}} ~~~~ ',
Modified: trunk/pywikipedia/editarticle.py =================================================================== --- trunk/pywikipedia/editarticle.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/editarticle.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -34,6 +34,7 @@ 'pt': u'Editando manualmente com bot: %s', 'sv': u'Manuell redigering: %s', 'is': u'Handvirk breyting: %s', + 'zh': u'手動編輯: %s', }
class TextEditor:
Modified: trunk/pywikipedia/families/wikibooks_family.py =================================================================== --- trunk/pywikipedia/families/wikibooks_family.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/families/wikibooks_family.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -69,6 +69,7 @@ 'sl': u'Wikiknjige', 'sr': u'Викикњиге', 'tr': u'Vikikitap', + 'uk': u'Вікіпідручник', 'ur': u'وکی کتب', 'uz': u'Vikikitob', 'vo': u'Vükibuks', @@ -158,7 +159,7 @@ 'th': u'คุยเรื่องWikibooks', 'tr': u'Vikikitap tartışma', 'tt': u'Wikibooks bäxäse', - 'uk': u'Обговорення Wikibooks', + 'uk': u'Обговорення Вікіпідручника', 'ur': u'تبادلۂ خیال وکی کتب', 'uz': u'Vikikitob munozarasi', 'vi': u'Thảo luận Wikibooks', @@ -176,6 +177,7 @@ 'ro': u'Raft', 'ru': u'Полка', 'tr': u'Yemek', + 'uk': u'Полиця', }
self.namespaces[101] = { @@ -188,6 +190,7 @@ 'ro': u'Discuţie Raft', 'ru': u'Обсуждение полки', 'tr': u'Yemek tartışma', + 'uk': u'Обговорення полиці', }
self.namespaces[102] = { @@ -201,6 +204,7 @@ 'ro': u'Wikijunior', 'ru': u'Импортировано', 'sr': u'Кувар', + 'uk': u'Рецепт', }
self.namespaces[103] = { @@ -214,6 +218,7 @@ 'ro': u'Discuţie Wikijunior', 'ru': u'Обсуждение импортированного', 'sr': u'Разговор о кувару', + 'uk': u'Обговорення рецепта', }
self.namespaces[104] = { @@ -285,6 +290,7 @@
self.obsolete = { 'aa': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Afa... + 'ak': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Aka... 'as': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ass... 'ay': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Aym... 'ba': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Bas... @@ -300,6 +306,7 @@ 'jp': 'ja', 'ks': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Kas... 'ln': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Lin... + 'mi': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Mao... 'minnan':'zh-min-nan', 'nah': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Nah... 'nb': 'no',
Modified: trunk/pywikipedia/families/wikinews_family.py =================================================================== --- trunk/pywikipedia/families/wikinews_family.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/families/wikinews_family.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -79,6 +79,7 @@
self.namespaces[100] = { 'ar': u'بوابة', + 'cs': u'Portál', 'de': u'Portal', 'en': u'Portal', 'es': u'Comentarios', @@ -95,6 +96,7 @@
self.namespaces[101] = { 'ar': u'نقاش البوابة', + 'cs': u'Portál diskuse', 'de': u'Portal Diskussion', 'en': u'Portal talk', 'es': u'Comentarios Discusión',
Modified: trunk/pywikipedia/families/wikisource_family.py =================================================================== --- trunk/pywikipedia/families/wikisource_family.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/families/wikisource_family.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -274,6 +274,9 @@ 'sv','te','th','tr','uk','vi','yi','zh']
self.obsolete = { + 'ang': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Old... + + 'dk': 'da', 'ht': None, # http://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Hai... 'jp': 'ja',
Modified: trunk/pywikipedia/image.py =================================================================== --- trunk/pywikipedia/image.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/image.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -52,12 +52,14 @@ 'fr': u'Bot: Remplace image %s par %s', 'he': u'בוט: מחליף את התמונה %s בתמונה %s', 'it': u"Bot: Sostituisco l'immagine %s con %s", + 'ja': u'ロボットによる:画像置き換え %s から %s へ', 'lt': u'robotas: vaizdas %s keičiamas į %s', 'nn': u'robot: erstatta biletet %s med %s', 'no': u'robot: erstatter bildet %s med %s', 'nl': u'Bot: afbeelding %s vervangen door %s', 'pl': u'Robot zamienia obraz %s na %s', 'pt': u'Bot: Alterando imagem %s para %s', + 'zh': u'機器人:取代圖像 %s 至 %s', }
# Summary messages for removing images @@ -69,12 +71,14 @@ 'fr': u'Bot: Enleve image %s', 'he': u'בוט: מסיר את התמונה %s', 'it': u"Bot: Rimuovo l'immagine %s", + 'ja': u'ロボットによる:画像削除 %s', 'lt': u'robotas: Šalinamas vaizdas %s', 'nl': u'Bot: afbeelding %s verwijderd', 'no': u'robot: fjerner bildet %s', 'nn': u'robot: fjerna biletet %s', 'pl': u'Robot usuwa obraz %s', 'pt': u'Bot: Alterando imagem %s', + 'zh': u'機器人:移除圖像 %s', }
def __init__(self, generator, oldImage, newImage = None, summary = '', always = False, loose = False):
Modified: trunk/pywikipedia/isbn.py =================================================================== --- trunk/pywikipedia/isbn.py 2008-06-15 16:13:25 UTC (rev 5578) +++ trunk/pywikipedia/isbn.py 2008-06-15 16:35:46 UTC (rev 5579) @@ -53,6 +53,7 @@ 'he': u'בוט: מעצב ISBN', 'ja': u'ロボットによる ISBN の書式化', 'pt': u'Bot: Formatando ISBN', + 'zh': u'機器人:ISBN格式化', }
# Maps each group number to the list of its publisher number ranges.
On Sun, June 15, 2008 6:35 pm, nicdumz@svn.wikimedia.org wrote:
Log Message:
Patch #1994318 by lin4h [update for Locale ja,zh and namespace, obsolete info...etc]
All files, except blockpageschecker.py, are translation diffs, while blockpageschecker.py has a code change. Was this meant?
If so, please consider multiple commits: for example in this case one for the translations, one for the wiki closures and one for the code change. In this case, combining the translations and closures is useful because they are mixed up in some files. However, the code change is completely unrelated, so a separate commit would be more logical.
If not, please check if the code is correct ;)
--valhallasw
yup, you were right. I started working on blockpageschecker.py, doing some local tests, then gave up changing my mind. And I committed the patch forgetting to revert my changes :)
Thanks !
2008/6/15 Merlijn van Deen valhallasw@arctus.nl:
On Sun, June 15, 2008 6:35 pm, nicdumz@svn.wikimedia.org wrote:
Log Message:
Patch #1994318 by lin4h [update for Locale ja,zh and namespace, obsolete info...etc]
All files, except blockpageschecker.py, are translation diffs, while blockpageschecker.py has a code change. Was this meant?
If so, please consider multiple commits: for example in this case one for the translations, one for the wiki closures and one for the code change. In this case, combining the translations and closures is useful because they are mixed up in some files. However, the code change is completely unrelated, so a separate commit would be more logical.
If not, please check if the code is correct ;)
--valhallasw
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l