User:R. Hillgentleman/fixes.py

出自維基百科,自由嘅百科全書
# -*- coding: utf-8  -*-
""" File containing all standard fixes """
__version__ = '$Id$'

help = """
                       * HTML       -  Convert HTML tags to wiki syntax, and
                                       fix XHTML.
                       * isbn        - Fix badly formatted ISBNs.
                       * syntax     -  Try to fix bad wiki markup. Do not run
                                       this in automatic mode, as the bot may
                                       make mistakes.
                       * syntax-safe - Like syntax, but less risky, so you can
                                       run this in automatic mode.
                       * case-de     - fix upper/lower case errors in German
                       * grammar-de  - fix grammar and typography in German
                       * commonslink  - replace '(?i)\{\{commonscat' by '{{同享類'
"""

fixes = {
	# These replacements will convert HTML to wiki syntax where possible, and
	# make remaining tags XHTML compliant.
	'HTML': {
		'regex': True,
		'msg': {
			'en':u'Robot: converting/fixing HTML',
			'de':u'Bot: konvertiere/korrigiere HTML',
			'fr':u'Robot: convertit/fixe HTML',
			'he':u'רובוט: ממיר/מתקן HTML',
			'ia':u'Robot: conversion/reparation de HTML',
			'lt':u'robotas: konvertuojamas/taisomas HTML',
			'nl':u'Bot: conversie/reparatie HTML',
			'pl':u'Robot konwertuje/naprawia HTML',
			'pt':u'Bot: Corrigindo HTML',
			'sr':u'Бот: Поправка HTML-а',
			'zh-yue':u'機械人:轉或修 HTML',
		},
		'replacements': [



.....
....
....


			(u' الأرثوذوكس ', u' الأرثوذكس '),
			(u' أرثوذوكسية ', u' أرثوذكسية '),
			(u' الأرثوذوكسية ', u' الأرثوذكسية '),
			(u' الأرثوذوكسي ', u' الأرثوذكسي '),
			(u' ارثوذوكس ', u' أرثوذكس '),
			(u' ارثوذوكسي ', u' أرثوذكسي '),
			(u' ارثوذوكسية ', u' أرثوذكسية '),
			(u' الارثوذوكسية ', u' الأرثوذكسية '),
			(u' اللة ', u' الله '),
			(u' إختبار ', u' اختبار '),
			(u'== روابط خارجية ==', u'== وصلات خارجية =='),
			(u'==روابط خارجية==', u'== وصلات خارجية =='),
		]
	},
        #commonslink  - replace r'(?i)\{\{commonscat' by u'{{同享類'
        'commonslink': {
                'regex'      :True,
                'msg'        : {'zh-yue':u'同享連結'},
                'replacements': [
                                ( r'(?i)\{\{commonscat' , u'{{同享類' )
                ]
        }

}