Revision: 5007 Author: rotem Date: 2008-02-11 18:00:40 +0000 (Mon, 11 Feb 2008)
Log Message: ----------- (bug 1891296) zh: and ja: locale
Modified Paths: -------------- trunk/pywikipedia/blockpageschecker.py
Modified: trunk/pywikipedia/blockpageschecker.py =================================================================== --- trunk/pywikipedia/blockpageschecker.py 2008-02-11 17:54:26 UTC (rev 5006) +++ trunk/pywikipedia/blockpageschecker.py 2008-02-11 18:00:40 UTC (rev 5007) @@ -79,7 +79,7 @@ 'it':[r'{{(?:[Tt]emplate:|)[Aa]vvisobloccoparziale(?:|[ _]scad|.*?||.*?)}}', r'{{(?:[Tt]emplate:|)[Aa]vvisoblocco(?:|[ _]scad|(?:.*?))}}', r'{{(?:[Tt]emplate:|)[Aa]bp(?:|[ _]scad|(?:.*?))}}'], - 'ja':[r'{{(?:[Tt]emplate:|)(?:半|移動|移動半|)保護(?:S|)}}',], + 'ja':[ur'{{(?:[Tt]emplate:|)(?:半|移動|移動半|)保護(?:[Ss]|)(?:|.+|)}}(\n+?|)'], 'pt':[r'{{(?:[Tt]emplate:|)[Pp]rotegido(?:|*)}}', r'{{(?:[Tt]emplate:|)(?:[Ss]emi-|)[Pp]rotegid[ao](?:IP|[- _]ip|PP|)}}'], 'zh':[r'{{(?:[Tt]emplate:|)Protected(?:|*)}}',r'{{(?:[Tt]emplate:|)Mini-protected(?:|*)}}', @@ -93,25 +93,34 @@ 'en': None, 'it':[r'{{(?:[Tt]emplate:|)[Aa]vvisobloccoparziale(?:|[ _]scad|.*?||.*?)}}', r'{{(?:[Tt]emplate:|)[Aa]bp(?:|[ _]scad|(?:.*?))}}'], + 'ja':[ur'{{(?:[Tt]emplate:|)半保護(?:[Ss]|)(?:|.+|)}}(\n+?|)'], + 'zh':[ur'{{(?:[Tt]emplate:|)Protected|(?:[Ss]|[Ss]emi|半)(?:|.+|)}}(\n+?|)',ur'{{(?:[Tt]emplate:|)Mini-protected|(?:[Ss]|[Ss]emi|半)(?:|.+|)}}(\n+?|)',ur'{{(?:[Tt]emplate:|)Protected-logo|(?:[Ss]|[Ss]emi|半)(?:|.+|)}}(\n+?|)'], } # Regex to get the total-protection template templateTotalProtection = { 'en': None, 'it':[r'{{(?:[Tt]emplate:|)[Aa]vvisoblocco(?:|[ _]scad|(?:.*?))}}'], + 'ja':[ur'{{(?:[Tt]emplate:|)保護(?:[Ss]|)(?:|.+|)}}(\n+?|)'], + 'zh':[r'{{(?:[Tt]emplate:|)Protected|(?:[Nn]|[Nn]ormal)(?:|.+|)}}(\n+?|)',r'{{(?:[Tt]emplate:|)Mini-protected|(?:[Nn]|[Nn]ormal)(?:|.+|)}}(\n+?|)',r'{{(?:[Tt]emplate:|)Protected-logo|(?:[Nn]|[Nn]ormal)(?:|.+|)}}(\n+?|)'], } # Regex to get the semi-protection move template templateSemiMoveProtection = { 'en': None, 'it': None, + 'ja':[ur'{{(?:[Tt]emplate:|)移動半保護(?:[Ss]|)(?:|.+|)}}(\n+?|)'], + 'zh':[r'{{(?:[Tt]emplate:|)Protected|(?:MS|ms)(?:|.+|)}}(\n+?|)',r'{{(?:[Tt]emplate:|)Mini-protected|(?:MS|ms)(?:|.+|)}}(\n+?|)',r'{{(?:[Tt]emplate:|)Protected-logo|(?:MS|ms)(?:|.+|)}}(\n+?|)'], } # Regex to get the total-protection move template templateTotalMoveProtection = { 'en': None, 'it': None, + 'ja':[ur'{{(?:[Tt]emplate:|)移動保護(?:[Ss]|)(?:|.+|)}}(\n+?|)'], + 'zh':[ur'{{(?:[Tt]emplate:|)Protected|(?:[Mm]|[Mm]ove|移[動动])(?:|.+|)}}(\n+?|)',ur'{{(?:[Tt]emplate:|)Mini-protected|(?:[Mm]|[Mm]ove|移[動动])(?:|.+|)}}(\n+?|)',ur'{{(?:[Tt]emplate:|)Protected-logo|(?:[Mm]|[Mm]ove|移[動动])(?:|.+|)}}(\n+?|)'], } # Array: 0 => Semi-block, 1 => Total Block, 2 => Semi-Move, 3 => Total-Move templateNoRegex = { 'it':['{{Avvisobloccoparziale}}', '{{Avvisoblocco}}', None, None], + 'ja':[u'{{半保護}}', u'{{保護}}', u'{{移動半保護}}',u'{{移動保護}}'], }
# Category where the bot will check
pywikipedia-l@lists.wikimedia.org