Foydalanuvchi:MrshaxasBot/Kod
# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------ VERSION 2 -----------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------------------------
fixes['v2'] = {
'regex': True,
'msg': {
'_default':'Bot v2: Umumiy tuzatmalar',
},
'replacements': [
# Boʻlim nomlariga oid almashtirmalar
(r'\=\=\s*([Mm]a\'lumotnomalar|[Mm]alumotnomalar|[Rr]eferences|Примечания|[Pr]rimechaniya|[Mm]anba)\s*\=\=', r'== Manbalar =='),
(r'\=\=\s*([Tt]ashqi havolalar|[Tt]ashki havolalar|[Tt]ashki havola|[Ee]xternal links|Ссылки|Ssilki|[Tt]ashqi havola|[Hh]avola)\s*\=\=', r'== Havolalar =='),
(r'\=\=\s*([Ss]huningdek qarang|[Ss]m. shuningdek|[Yy]ana q.|См. также|[Ss]m. takje|[Yy]ana koʻring|[Ss]huningdek ko\'ring|[Yy]ana ko\'ring|[Ss]huningdek koʻring|[Ss]huningdek qqarg)\s*\=\=', r'== Yana qarang =='),
(r'\=\=\s*(Sujet|Sujeti|Syujet|Syujeti|Voqea|Voqeasi|Voqealari)\s*\=\=', r'== Mazmuni =='),
(r'\=\=\s*Musiqa\s*\=\=', r'== Musiqasi =='),
(r'\=\=\s*Yoshlik\s*\=\=', r'== Yoshligi =='),
(r'\=\=\s*(Karyera|Karera|Karerasi)\s*\=\=', r'== Karyerasi =='),
(r'\=\=\s*Shaxsiy hayot\s*\=\=', r'== Shaxsiy hayoti =='),
(r'\=\=\s*Filmografiya\s*\=\=', r'== Filmografiyasi =='),
(r'\=\=\s*Diskografiya\s*\=\=', r'== Diskografiyasi =='),
(r'\=\=\s*Adabiyot\s*\=\=', r'== Adabiyotlar =='),
(r'\=\=\s*Biografiya\s*\=\=', r'== Hayoti =='),
(r'\=\=\s*(Televizion|Televideniya)\s*\=\=', r'== Televideniye =='),
(r'\=\=\s*Geografiya\s*\=\=', r'== Geografiyasi =='),
(r'\=\=\s*Demografiya\s*\=\=', r'== Demografiyasi =='),
(r'\=\=\s*Iqlim\s*\=\=', r'== Iqlimi =='),
(r'\=\=\s*Tarix\s*\=\=', r'== Tarixi =='),
(r'\=\=\s*Transport\s*\=\=', r'== Transporti =='),
# Sanalarga oid almashtirmalar
# 2000 yil → 2000-yil
(r'(\d{4}) yil ', r'\1-yil '),
(r'(\d{4}) yilga', r'\1-yilga'),
(r'(\d{4}) yilgi', r'\1-yilgi'),
(r'(\d{4}) yilni', r'\1-yilni'),
(r'(\d{4}) yilda', r'\1-yilda'),
# 2000 - yil → 2000-yil
(r'(\d{4})\s*(-|–|—)\s*yil', r'\1-yil'),
(r'(\d{4})\s*(-|–|—)\s*(\d{4})\s*-\s*yil', r'\1—\3-yil'),
# [[2000]]-yil → [[2000-yil]]
(r'\[\[(\d{4})\]\] yil', r'[[\1-yil]]'),
(r'\[\[(\d{4})\]\]-yil', r'[[\1-yil]]'),
(r'\((\d{4})(-|–|—)(\d{4})\)', r'(\1—\3)'),
# mil. avv. 300 yil → miloddan avvalgi 300-yil
(r'mil. (avv.|av.) (\d{2,3}) yil ', r'miloddan avvalgi \2-yil'),
(r'mil. (avv.|av.) (\d{2,3})(-|–)(\d{2,3}) yil', r'miloddan avvalgi \2—\4-yil'),
(r'mil. (avv.|av.) (\d{2,3})(-|–)(\d{2,3})\s*(-|–|—)\s*yil', r'miloddan avvalgi \2—\4-yil'),
# istisno
(r'(\d{4})-yil (avval|oldin|ilgari|muqaddam)', r'\1 yil \2'),
# oylar: 5 dekabr → 5-dekabr
# mart oyi „marta“ bilan adashtirilmasligi uchun kiritilmadi #
(r'(\d{1,2}) (yanvar|fevral|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr)', r'\1-\2'),
(r'(\d{1,2})\s{0,2}(-|–|—)\s{0,2}(yanvar|fevral|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr)', r'\1-\3'),
# mart oyi uchun
(r'(\d{1,2}) mart ', r'\1-mart '),
(r'(\d{1,2}) mart\)', r'\1-mart)'),
(r'(\d{1,2})\s{0,2}(-|–|—)\s{0,2}mart ', r'\1-mart '),
(r'(\d{1,2})\s{0,2}(-|–|—)\s{0,2}mart\)', r'\1-mart)'),
(r'(\d{1,2}) martda', r'\1-martda'),
(r'(\d{1,2}) martida', r'\1-martida'),
# ContentTranslation: xato formatdagi ichki havolalar
# Msl: [[2013]][[14-fevral|-yil 14-fevral]] → [[2013-yil]] [[14-fevral]]
(r'\[\[(\d{4})\]\]\s{0,2}\[\[(\d{1,2})-(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr)\|-yil \2-\3\]\]', r'[[\1-yil]] [[\2-\3]]'),
(r'\[\[(\d{4})\]\]\s{0,2}\[\[(\d{1,2})-(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr)\|-yil \2-\3da\]\]', r'[[\1-yil]] [[\2-\3]]da'),
(r'\[\[(\d{4})\]\]\s{0,2}\[\[(\d{1,2})-(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr)\|-yil \2-\3ida\]\]', r'[[\1-yil]] [[\2-\3]]ida'),
# 1960-62 yil → 1960—1962-yil
(r'19(\d{2})(-|–|—)(\d{2}) yil', r'19\1—19\3-yil'),
(r'19(\d{2})(-|–|—)(\d{2})-yil', r'19\1—19\3-yil'),
(r'19(\d{2})(-|–|—)(\d{2})\s*\)', r'19\1—19\3)'),
# {{Futbolchi bilgiqutisi}}dagi |yillar= parametriga berilgan qiymat uchun
(r'yillar(\d{1,2})=(\d{4})(-|–)(\d{4})', r'yillar\1=\2—\4'),
(r'yillari(\d{1,2})=(\d{4})(-|–)(\d{4})', r'yillari\1=\2—\4'),
# Boshqalar
# {{Lang-xx → {{lang-xx
(r'\{\{Lang\-', r'{{lang-'),
# Tashqi havolalar
(r' Official [Ww]ebsite\] ', r' Rasmiy sayti] '),
# <ref> tegi
(r'\s{0,3}<ref(?:\s+name="")?(\s|>)', r'<ref\1'),
(r'\|<ref', r'| <ref'),
(r'</ref>([A-Za-z\d])', r'</ref> \1'),
(r'</ref> ([.,])', r'</ref>\1'),
(r'\/ref>\s{0,3}([.,])', r'/ref>\1'),
(r'<references group="" responsive=""></references>', r'{{manbalar}}'),
(r'<references group="" responsive="0"></references>', r'{{manbalar}}'),
(r'<references group="" responsive="1"></references>', r'{{manbalar}}'),
(r'<references\s{0,1}/>', r'{{manbalar}}'),
(r' \{\{[Ss]fn', r'{{sfn'),
(r' \{\{[Hh]arv', r'{{harv'),
# Keraksiz joylarda qoldirilgan probellar
(r'([A-Za-z\w(!?"“))])\s{0,3}([.,])', r'\1\2'),
(r'([a-z\)\»\“\"\]])(\s*)(\,)([a-z\(\«\„\"\[])', r'\1\3 \4'),
(r'([a-z\)\»\“\"\]])(\s)([\,\;])(\s)([a-z\(\«\„\"\[])', r'\1\3 \5'),
(r'(\()( +)', r'\1'),
(r'( +)(\))', r'\2'),
(r'\]\]\(', r']] ('),
(r'(\w)\(', r'\1 ('),
(r'\'\'\s{0,2}\(', r"'' ("),
# HTML va ayrim nomfazolar almashtirmalari
(r'\[\[[Ff]ile\:', r'[[Fayl:'),
(r'\[\[[Cc]ategory\:', r'[[Turkum:'),
(r'\[\[[Ii]mage\:', r'[[Tasvir:'),
(r'<nowiki/>', r''),
(r'\<i id\=\"([\w\s]+)\"\>(.*?)\<\/i\>', r"''\2''"),
(r'(?i)<br *>', r'<br />'),
(r'(?i)<br ([^>/]+?)>', r'<br \1 />'),
(r'(?i)<b>(.*?)</b>', r"'''\1'''"),
(r'(?i)<strong>(.*?)</strong>', r"'''\1'''"),
(r'(?i)<i>(.*?)</i>', r"''\1''"),
(r'(?i)<em>(.*?)</em>', r"''\1''"),
(r'(?i)([\r\n])<hr[ /]*>([\r\n])', r'\1----\2'),
(r'(?i)<hr ([^>/]+?)>', r'<hr \1 />'),
(r'(?i)([\r\n]) *<h1> *([^<]+?) *</h1> *([\r\n])', r'\1= \2 =\3'),
(r'(?i)([\r\n]) *<h2> *([^<]+?) *</h2> *([\r\n])', r'\1== \2 ==\3'),
(r'(?i)([\r\n]) *<h3> *([^<]+?) *</h3> *([\r\n])', r'\1=== \2 ===\3'),
(r'(?i)([\r\n]) *<h4> *([^<]+?) *</h4> *([\r\n])', r'\1==== \2 ====\3'),
(r'(?i)([\r\n]) *<h5> *([^<]+?) *</h5> *([\r\n])', r'\1===== \2 =====\3'),
(r'(?i)([\r\n]) *<h6> *([^<]+?) *</h6> *([\r\n])', r'\1====== \2 ======\3'),
# (song)| → (qoʻshiq)|
(r' \(magazine\)\|', r' (jurnal)|'),
(r' \(journal\)\|', r' (jurnal)|'),
(r' \(album\)\|', r' (albom)|'),
(r' \(song\)\|', r' (qoʻshiq)|'),
(r' album\)\|', r' albomi)|'),
(r' song\)\|', r' qoʻshigʻi)|'),
(r' \(actor\)\|', r' (aktyor)|'),
(r' \(actress\)\|', r' (aktrisa)|'),
(r' \(writer\)\|', r' (yozuvchi)|'),
(r' \(author\)\|', r' (yozuvchi)|'),
(r' \(producer\)\|', r' (produser)|'),
(r' \(musician\)\|', r' (musiqachi)|'),
(r' \(singer\)\|', r' (qoʻshiqchi)|'),
(r' \(screenwriter\)\|', r' (ssenariynavis)|'),
(r' \(footballer\)\|', r' (futbolchi)|'),
(r' \(director\)\|', r' (rejissor)|'),
(r' \(basketball\)\|', r' (basketbolchi)|'),
(r' \(journalist\)\|', r' (jurnalist)|'),
(r' \(comics\)\|', r' (komiks)|'),
(r' \(historian\)\|', r' (tarixchi)|'),
(r' \(politician\)\|', r' (siyosatchi)|'),
(r' \(website\)\|', r' (vebsayt)|'),
(r' \(company\)\|', r' (shirkat)|'),
(r' \(newspaper\)\|', r' (gazeta)|'),
(r' \(chemist\)\|', r' (kimyogar)|'),
(r' \(physicist\)\|', r' (fizik)|'),
(r' \([Tt][Vv] series\)\|', r' (teleserial)|'),
(r' \(designer\)\|', r' (dizayner)|'),
(r' \(baseball player\)\|', r' (beysbolchi)|'),
(r' \(architect\)\|', r' (meʼmor)|'),
# Nooʻrin vergul
(r'\, va ', r' va '),
# Xato tarjimalar
(r'class\s*\=\s*\"unsortable\"\s*\|\s*Eslatmalar', r'class="unsortable" | Izohlar'),
(r'class\s*\=\s*\"unsortable\"\s*\|\s*Havl.', r'class="unsortable" | Manba(lar)'),
(r'scope\s*\=\s*\"col\"\s*\|\s*Havl.', r'scope="col" | Manba(lar)'),
# Ham „ABC“, ham ''ABC'' ning qoʻllanilishi
# (r'“\s{0,2}\'\'(.*?)\'\'\s{0,2}”', r"''\1''"),
# (r'„\s{0,2}\'\'(.*?)\'\'\s{0,2}“', r"''\1''"),
# (r'“\s{0,2}\'\'(.*?)”\s{0,2}\'\'', r"''\1''"),
# (r'„\s{0,2}\'\'(.*?)“\s{0,2}\'\'', r"''\1''"),
# (r'\'\'\s{0,2}„(.*?)“\s{0,2}\'\'', r"''\1''"),
# Ayrim formatlashlar
(r'„\s{0,2}\'\'\[\[(.*?)\|(.*?)“\]\]\s{0,2}\'\'', r"''[[\1|\2]]''"),
(r'\[\[ *([^|[\]]+?) *\| *«([^»|[\]]*)» *\]\]', r'„[[\1|\2]]“'),
(r'\[\[ *([^|[\]]+?) *\| *„([^“|[\]]*)“ *\]\]', r'„[[\1|\2]]“'),
(r'\[\[ *([^|[\]]+?) *\| *“([^”|[\]]*)” *\]\]', r'„[[\1|\2]]“'),
(r'\[\[ *([^|[\]]+?) *\| *"([^"|[\]]*)" *\]\]', r'„[[\1|\2]]“'),
(r'\(\[\[Inglizcha\|Inglizcha\:\]\]', r'([[inglizcha]]:'),
(r'\(\[\[Koreyscha\|Koreyscha\:\]\]', r'([[koreyscha]]:'),
# msl: -''' 1898-yilda → ''' — 1898-yilda
(r'\-\'\'\' (\d{4})', r"''' — \1"),
# [[A B|A]] B → [[A B]]
(r'\[\[ *([^|[\]]+)([^|\[\]()]+?) *\| *\1 *\]\]\2', r'[[\1\2]]'),
# Jadvallarda {{abbr| ... }} andozasi ichida kelgan "References"ning tarjimasi
(r'\{\{abbr\|Ref\.\|Reference\}\}', r'Manba(lar)'),
(r'\{\{abbr\|Ref\.\|References\}\}', r'Manba(lar)'),
# Imloviy xatolar
(r'([Ff])rantsuz', r'\1ransuz'),
(r'([Ff])rantsiya', r'\1ransiya'),
(r'fransiya ', r'Fransiya '),
(r' [Ee]vropa', r' Yevropa'),
(r'([Ff])unktsiya', r'\1unksiya'),
(r'([Oo])hirgi', r'\1xirgi'),
(r'([Oo])hirida', r'\1xirida'),
(r'([Ss])hahsiy', r'\1haxsiy'),
(r'([Tt])ehnologiya', r'\1exnologiya'),
(r'([Tt])ehnika', r'\1exnika'),
(r'([Tt])ug[ʻʼ\']ulgan', r'\1ugʻilgan'),
(r'([Ss])haxar', r'\1hahar'),
(r'([Ss])haxri', r'\1hahri'),
(r'([Ss])hveytsariya', r'\1hveysariya'),
(r'([Kk])onferentsiya', r'\1onferensiya'),
(r'([Rr])eaktsiya', r'\1eaksiya'),
(r'([Ii])nfektsiya', r'\1nfeksiya'),
(r'([Tt])elevideniya', r'\1elevideniye'),
(r'Frantsisko', r'Fransisko'),
(r'Hayol', r'Xayol'),
(r'hayol', r'xayol'),
(r'Xamkasb', r'Hamkasb'),
(r'xamkasb', r'hamkasb'),
(r'Xozir', r'Hozir'),
(r'xozir', r'hozir'),
(r'Harid', r'Xarid'),
(r'harid', r'xarid'),
(r'Mashxur', r'Mashhur'),
(r'mashxur', r'mashhur'),
(r'([Mm])oʻʼtadil', r'\1oʻtadil'),
(r'(bʼyekt|bʼekt)', r'byekt'),
(r'film qismlari', r'filmlar seriyasi'),
(r'filmi qismlari', r'filmlar seriyasi'),
(r'Gollivud', r'Hollywood'),
(r'Official release poster', r'Film posteri'),
(r'(davomiyligi|runtime|vaqt|vaqti)(\s{0,5})\=(\s{0,5})(\d{1,3}) minutes', r'\1\2=\3\4 daqiqa'),
(r'Oskar mukofoti', r'Oscar mukofoti'),
(r'Oskar“ mukofoti', r'Oscar“ mukofoti'),
(r'Emmi mukofoti', r'Emmy mukofoti'),
(r'Emmi“ mukofoti', r'Emmy“ mukofoti'),
(r'u er ', r'u yer '),
(r'u erni', r'u yerni'),
(r'u erda', r'u yerda'),
(r'seriyalida', r'serialida'),
# Andozalar nomlari almashtirilmalari
(r'\{\{[Rr]eflist\}\}', r'{{manbalar}}'),
(r'\{\{[Oo]fficial\|', r'{{Rasmiy sayt|'),
(r'\{\{[Oo]fficial (website|site)', r'{{Rasmiy sayt'),
(r'\{\{[Aa]uthority control', r'{{Tashqi havolalar'),
(r'\{\{[Cc]ord\s*\|', r'{{koord|'),
(r'\{\{[Mm]ain\s*\|', r'{{Asosiy|'),
(r'\{\{[Mm]ain article\s*\|', r'{{Asosiy|'),
(r'\{\{[Aa]sosiy maqola\s*\|', r'{{Asosiy|'),
# Shaxsiyatlarga oid andozalar
(r'\{\{[Bb]irth date and age\s*\|', r'{{tugʻilgan sanasi va yoshi|'),
(r'\{\{[Bb]irth date\s*\|', r'{{tugʻilgan sanasi|'),
(r'\{\{[Dd]eath date and age\s*\|', r'{{vafot sanasi va yoshi|'),
(r'\{\{[Dd]eath date\s*\|', r'{{vafot sanasi|'),
(r'\{\{[Mm]arriage\s*\|', r'{{nikoh|'),
(r'\{\{[Hh]eight\s*\|', r'{{boʻy|'),
# Cite andozalari
(r'\{\{[Cc]ite web', r'{{veb manbasi'),
(r'\{\{[Cc]ite news', r'{{yangiliklar manbasi'),
(r'\{\{[Cc]ite book', r'{{kitob manbasi'),
(r'\{\{[Cc]ite (journal|magazine)', r'{{jurnal manbasi'),
(r'\{\{[Cc]ite tweet', r'{{tweet manbasi'),
(r'\{\{[Cc]ite press release', r'{{pres-reliz manbasi'),
(r'\{\{[Cc]ite AV media', r'{{video manbasi'),
(r'\{\{[Cc]ite episode', r'{{qism manbasi'),
# Filmlarga oid andozalar
(r'\{\{[Ii]nfobox film', r'{{Film bilgiqutisi'),
(r'\{\{[Ii][Mm][Dd][Bb] title', r'{{IMDbda film'),
(r'\{\{[Ii][Mm][Dd][Bb] name', r'{{IMDbda kishi'),
(r'\{\{[Aa][Ll][Ll][Mm][Oo][Vi][Ii][Ee] title', r'{{AllMovieda film'),
(r'\{\{[Aa][Mm][Gg] title', r'{{AllMovieda film'),
(r'\{\{[Aa][Ll][Ll][Mm][Oo][Vi][Ii][Ee] person', r'{{AllMovieda kishi'),
(r'\{\{[Aa][Ll][Ll][Rr][Oo][Vi][Ii] person', r'{{AllMovieda kishi'),
(r'\{\{[Mm]ojo title', r'{{Mojoda film'),
(r'\{\{[Mm]etacrit title', r'{{Metacriticda film'),
(r'\{\{[Nn]etflix title', r'{{Netflixda film'),
(r'\{\{[Cc]ast list\|', r'{{Aktyorlar roʻyxati|'),
(r'\{\{[Cc]ast listing', r'{{Aktyorlar roʻyxati'),
(r'\{\{[Ff]ilm date', r'{{reliz sanasi'),
# Stub andozalari
(r'\{\{[Ss]tub\}\}', r'{{chala}}'),
# Qoʻshiqlarga oid andozalar
(r'\{\{[Ii]nfobox song', r'{{Qoʻshiq bilgiqutisi'),
(r'\{\{[Tt]rack listing', r'{{Treklist'),
],
'exceptions': {
'inside-tags': [
'comment',
'math',
'pre',
'syntaxhighlight',
],
'inside': [
r'(\[\[(File|Image|Tasvir|Fayl)\:)(.*?)(\||\]\])',
],
}
}
fixes['orfo'] = {
'regex': True,
'msg': {
'_default':'[[Vikipediya:Imlo va grammatika|Imlo va grammatika]]',
},
'replacements': [
# Keraksiz/li probellar
(r'([a-z\)\»\“\"\]])(\s*)(\,)([a-z\(\«\„\"\[])', r'\1\3 \4'),
(r'([a-z\)\»\“\"\]])(\s)([\,\;])(\s)([a-z\(\«\„\"\[])', r'\1\3 \5'),
# Qoʻshtirnoqlar
# (r'([(\s\'\"])(\")([^\"]{0,})([^\s\"(])(\")', r'\1„\3\4“'),
# (r'([(\s\'\"\«])(\«)([^\»]{0,})([^\s\«(])(\»)', r'\1„\3\4“'),
# (r'([(\s\'\"\“])(\“)([^\”]{0,})([^\s\“(])(\”)', r'\1„\3\4“'),
# (r'(«|»|“|”|„|\&((la|ra|bd|ld)quo|#132|#147|#148|quot);)', r'"'),
(r'([(\s\"])(\")([^\"]{0,})([^\s\"\=(])(\")', r'\1„\3\4“'),
# Oʻ, Gʻ va tutuq belgisi (ʼ)
(r'(O|o|G|g)(\`)', r'\1ʻ'),
(r'(O|o|G|g)(\')(?!(\'|\'\'|\'\'\'))', r'\1ʻ'),
(r'(O|o|G|g)(\‘)', r'\1ʻ'),
(r'(A|a|E|e|N|n|T|t)(\`)', r'\1ʼ'),
(r'(O|o|G|g)(\ʼ)', r'\1ʻ'),
(r'(A|a|E|e|N|n|T|t)(\ʻ)', r'\1ʼ'),
(r'(A|a|E|e|N|n|T|t)(\')(?!(\'|\'\'|\'\'\'))', r'\1ʼ'),
(r'(A|a|E|e|N|n|O|o|G|g|T|t)[ʻʼ]\'\' ', r"\1''' "),
# Asrlar
(r'([XVI]+)(\s*)-(\s*)asr', r'\1 asr'),
(r'([XVI]+)(-|–)([XVI]+) asr', r'\1—\3 asr'),
# Tire (—)
(r'\)\s*(-|–)\s*([\w]+)', r') — \2'),
(r'\)\s*(-|–)\s*\[\[([\w]+)', r') — [[\2'),
# Foiz (msl: 5 % → 5%)
(r'([^%\/\wA-Za-zʻʼ"]\d+?(?:[\.,]\d+?)?) ([%‰])', r'\1\2'),
# Tiredan keyin amerikalik/fransiyalik/boshqalarning bosh harfda yozilishi
# Msl: ") — Amerikalik" → ") — amerikalik"
(r'(\w|\)|\'|"|“|-|–|,|—) (Amerika|AQSh|AQSH|Rossiya|Italiya|Ispaniya|Turkiya|Chili|Hindiston|Shvetsiya|Shveysariya|Yaponiya|Argentina|Braziliya|Portugaliya|Chexiya|Xitoy|Ukraina|Fransiya|Qozogʻiston|Oʻzbekiston|Turkmaniston|Tojikiston|Qirgʻiziston|Janubiy Koreya|Meksika|Uels|Shotlandiya|Germaniya)lik (\w)', r'\1 {{subst:lc:\2lik}} \3'),
],
'exceptions': {
'inside-tags': [
'nowiki',
'comment',
'gallery',
'hyperlink',
'file',
'math',
'pre',
'tt',
'tr',
'startspace',
'syntaxhighlight',
'timeline',
'imagemap',
'mapframe',
'maplink',
'templatedata',
'references',
],
'inside': [
r'<code>.*</code>',
r'\{\{(.|\r|\n)+?\}\}',
r'(=)(\s?)(\")(.*?)(\")',
r'(\[\[)(.*?)(\||\]\])',
r'\[(https|http)\:(.*?)\]',
r'(<([^>]*?)(.*?)>)',
],
}
}
fixes['cite'] = {
'regex': True,
'msg': {
'_default':'Manba andozalarida formatlash',
},
'replacements': [
# Cite andozalaridagi |lang= parametriga berilgan qiymatlarning oʻzbekchalashtirilmasi
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Aa]lbanian|sq)(\s{0,15})(\||\}\})', r'\1\2=\3albancha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Aa]rabic|ar)(\s{0,15})(\||\}\})', r'\1\2=\3arabcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Aa]rmenian|hy)(\s{0,15})(\||\}\})', r'\1\2=\3armancha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Bb]ulgarian|bg)(\s{0,15})(\||\}\})', r'\1\2=\3bolgarcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Cc]hinese|zh)(\s{0,15})(\||\}\})', r'\1\2=\3xitoycha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Cc]roatian|hr)(\s{0,15})(\||\}\})', r'\1\2=\3xorvatcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Cc]zech|cz)(\s{0,15})(\||\}\})', r'\1\2=\3chexcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Dd]anish|da)(\s{0,15})(\||\}\})', r'\1\2=\3datcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Dd]utch|nl)(\s{0,15})(\||\}\})', r'\1\2=\3niderlandcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ee]nglish|eng|en|en-AU|en-BZ|en-CA|en-IE|en-JM|en-NZ|en-ZA|en-TT|en-GB|en-US|EN-AU|EN-CA|EN-GB|EN-ZA|EN-NZ|EN-US)(\s{0,15})(\||\}\})', r'\1\2=\3inglizcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ee]stonian|et)(\s{0,15})(\||\}\})', r'\1\2=\3estoncha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ff]ilipino|fil)(\s{0,15})(\||\}\})', r'\1\2=\3filippincha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ff]innish|fi)(\s{0,15})(\||\}\})', r'\1\2=\3fincha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ff]rench|fr)(\s{0,15})(\||\}\})', r'\1\2=\3fransuzcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Gg]eorgian|ka)(\s{0,15})(\||\}\})', r'\1\2=\3gruzincha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Gg]erman|de)(\s{0,15})(\||\}\})', r'\1\2=\3olmoncha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Gg]reek|el)(\s{0,15})(\||\}\})', r'\1\2=\3grekcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Hh]ebrew|he)(\s{0,15})(\||\}\})', r'\1\2=\3ivritcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Hh]ungarian|hu)(\s{0,15})(\||\}\})', r'\1\2=\3vengercha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ii]celandic|is)(\s{0,15})(\||\}\})', r'\1\2=\3islandcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ii]ndonesian|id)(\s{0,15})(\||\}\})', r'\1\2=\3indonezcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ii]talian|it)(\s{0,15})(\||\}\})', r'\1\2=\3italyancha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Jj]apanese|ja)(\s{0,15})(\||\}\})', r'\1\2=\3yaponcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Kk]orean|ko)(\s{0,15})(\||\}\})', r'\1\2=\3koreyscha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Nn]orwegian|nn|no)(\s{0,15})(\||\}\})', r'\1\2=\3norvegcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Pp]ersian|fa)(\s{0,15})(\||\}\})', r'\1\2=\3forscha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Pp]olish|pl)(\s{0,15})(\||\}\})', r'\1\2=\3polyakcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Pp]ortuguese|pt)(\s{0,15})(\||\}\})', r'\1\2=\3portugalcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Rr]omanian|ro)(\s{0,15})(\||\}\})', r'\1\2=\3rumincha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Rr]ussian|ru|rus)(\s{0,15})(\||\}\})', r'\1\2=\3ruscha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ss]erbian|sr)(\s{0,15})(\||\}\})', r'\1\2=\3serbcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ss]lovakian|sk)(\s{0,15})(\||\}\})', r'\1\2=\3slovakcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ss]lovenian|sl)(\s{0,15})(\||\}\})', r'\1\2=\3slovencha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ss]panish|es)(\s{0,15})(\||\}\})', r'\1\2=\3ispancha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Ss]wedish|sv)(\s{0,15})(\||\}\})', r'\1\2=\3shvedcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Tt]hai|th)(\s{0,15})(\||\}\})', r'\1\2=\3taycha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Tt]urkish|tr)(\s{0,15})(\||\}\})', r'\1\2=\3turkcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Tt]urkmen|tk)(\s{0,15})(\||\}\})', r'\1\2=\3turkmancha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Uu]krainian|uk)(\s{0,15})(\||\}\})', r'\1\2=\3ukraincha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Uu]zbek|uz|uzb)(\s{0,15})(\||\}\})', r'\1\2=\3oʻzbekcha\5\6'),
(r'(lang|language|til)(\s{0,15})=(\s{0,15})([Vv]ietnamese|vi)(\s{0,15})(\||\}\})', r'\1\2=\3vyetnamcha\5\6'),
# Cite andozalaridagi |sana= yoki |date= parametrlariga berilgan qiymatlarning oʻzbekchalashtirilmasi
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})January (\d{1,2}), (\d{4})', r'\1\2=\3\4-yanvar \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})February (\d{1,2}), (\d{4})', r'\1\2=\3\4-fevral \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})March (\d{1,2}), (\d{4})', r'\1\2=\3\4-mart \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})April (\d{1,2}), (\d{4})', r'\1\2=\3\4-aprel \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})May (\d{1,2}), (\d{4})', r'\1\2=\3\4-may \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})June (\d{1,2}), (\d{4})', r'\1\2=\3\4-iyun \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})July (\d{1,2}), (\d{4})', r'\1\2=\3\4-iyul \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})August (\d{1,2}), (\d{4})', r'\1\2=\3\4-avgust \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})September (\d{1,2}), (\d{4})', r'\1\2=\3\4-sentabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})October (\d{1,2}), (\d{4})', r'\1\2=\3\4-oktabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})November (\d{1,2}), (\d{4})', r'\1\2=\3\4-noyabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})December (\d{1,2}), (\d{4})', r'\1\2=\3\4-dekabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jan (\d{1,2}), (\d{4})', r'\1\2=\3\4-yanvar \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Feb (\d{1,2}), (\d{4})', r'\1\2=\3\4-fevral \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Mar (\d{1,2}), (\d{4})', r'\1\2=\3\4-mart \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Apr (\d{1,2}), (\d{4})', r'\1\2=\3\4-aprel \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})May (\d{1,2}), (\d{4})', r'\1\2=\3\4-may \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jun (\d{1,2}), (\d{4})', r'\1\2=\3\4-iyun \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jul (\d{1,2}), (\d{4})', r'\1\2=\3\4-iyul \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Aug (\d{1,2}), (\d{4})', r'\1\2=\3\4-avgust \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Sep (\d{1,2}), (\d{4})', r'\1\2=\3\4-sentabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Oct (\d{1,2}), (\d{4})', r'\1\2=\3\4-oktabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Nov (\d{1,2}), (\d{4})', r'\1\2=\3\4-noyabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Dec (\d{1,2}), (\d{4})', r'\1\2=\3\4-dekabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) January (\d{4})', r'\1\2=\3\4-yanvar \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) February (\d{4})', r'\1\2=\3\4-fevral \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) March (\d{4})', r'\1\2=\3\4-mart \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) April (\d{4})', r'\1\2=\3\4-aprel \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) May (\d{4})', r'\1\2=\3\4-may \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) June (\d{4})', r'\1\2=\3\4-iyun \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) July (\d{4})', r'\1\2=\3\4-iyul \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) August (\d{4})', r'\1\2=\3\4-avgust \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) September (\d{4})', r'\1\2=\3\4-sentabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) October (\d{4})', r'\1\2=\3\4-oktabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) November (\d{4})', r'\1\2=\3\4-noyabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) December (\d{4})', r'\1\2=\3\4-dekabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Jan (\d{4})', r'\1\2=\3\4-yanvar \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Feb (\d{4})', r'\1\2=\3\4-fevral \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Mar (\d{4})', r'\1\2=\3\4-mart \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Apr (\d{4})', r'\1\2=\3\4-aprel \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) May (\d{4})', r'\1\2=\3\4-may \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Jun (\d{4})', r'\1\2=\3\4-iyun \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Jul (\d{4})', r'\1\2=\3\4-iyul \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Aug (\d{4})', r'\1\2=\3\4-avgust \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Sep (\d{4})', r'\1\2=\3\4-sentabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Oct (\d{4})', r'\1\2=\3\4-oktabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Nov (\d{4})', r'\1\2=\3\4-noyabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{1,2}) Dec (\d{4})', r'\1\2=\3\4-dekabr \5-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})January (\d{4})', r'\1\2=\3\4-yil yanvar'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})February (\d{4})', r'\1\2=\3\4-yil fevral'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})March (\d{4})', r'\1\2=\3\4-yil mart'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})April (\d{4})', r'\1\2=\3\4-yil aprel'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})May (\d{4})', r'\1\2=\3\4-yil may'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})June (\d{4})', r'\1\2=\3\4-yil iyun'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})July (\d{4})', r'\1\2=\3\4-yil iyul'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})August (\d{4})', r'\1\2=\3\4-yil avgust'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})September (\d{4})', r'\1\2=\3\4-yil sentabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})October (\d{4})', r'\1\2=\3\4-yil oktabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})November (\d{4})', r'\1\2=\3\4-yil noyabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})December (\d{4})', r'\1\2=\3\4-yil dekabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-01-(\d{1,2})', r'\1\2=\3\5-yanvar \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-02-(\d{1,2})', r'\1\2=\3\5-fevral \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-03-(\d{1,2})', r'\1\2=\3\5-mart \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-04-(\d{1,2})', r'\1\2=\3\5-aprel \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-05-(\d{1,2})', r'\1\2=\3\5-may \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-06-(\d{1,2})', r'\1\2=\3\5-iyun \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-07-(\d{1,2})', r'\1\2=\3\5-iyul \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-08-(\d{1,2})', r'\1\2=\3\5-avgust \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-09-(\d{1,2})', r'\1\2=\3\5-sentabr \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-10-(\d{1,2})', r'\1\2=\3\5-oktabr \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-11-(\d{1,2})', r'\1\2=\3\5-noyabr \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})(\d{4})-12-(\d{1,2})', r'\1\2=\3\5-dekabr \4-yil'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jan (\d{4})', r'\1\2=\3\4-yil yanvar'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Feb (\d{4})', r'\1\2=\3\4-yil fevral'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Mar (\d{4})', r'\1\2=\3\4-yil mart'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Apr (\d{4})', r'\1\2=\3\4-yil aprel'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})May (\d{4})', r'\1\2=\3\4-yil may'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jun (\d{4})', r'\1\2=\3\4-yil iyun'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Jul (\d{4})', r'\1\2=\3\4-yil iyul'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Aug (\d{4})', r'\1\2=\3\4-yil avgust'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Sep (\d{4})', r'\1\2=\3\4-yil sentabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Oct (\d{4})', r'\1\2=\3\4-yil oktabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Nov (\d{4})', r'\1\2=\3\4-yil noyabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Dec (\d{4})', r'\1\2=\3\4-yil dekabr'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Spring (\d{4})', r'\1\2=\3\4-yil bahor'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Summer (\d{4})', r'\1\2=\3\4-yil yoz'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Autumn (\d{4})', r'\1\2=\3\4-yil kuz'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Fall (\d{4})', r'\1\2=\3\4-yil kuz'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})Winter (\d{4})', r'\1\2=\3\4-yil qish'),
(r'(sana|sanasi|date)(\s{0,2})=(\s{0,2})0(\d)\-(yanvar|fevral|mart|aprel|may|iyun|iyul|avgust|sentabr|sentyabr|oktabr|oktyabr|noyabr|dekabr) (\d{4})\-yil', r'\1\2=\3\4-\5 \6-yil'),
# |kirish sanasi= → |qaralgan sana=
(r'kirish sanasi', r'qaralgan sana'),
],
'exceptions': {
'inside-tags': [
'nowiki',
'comment',
'gallery',
'hyperlink',
'file',
'math',
'pre',
'startspace',
'syntaxhighlight',
'timeline',
'imagemap',
'mapframe',
'maplink',
'templatedata',
],
'inside': [
r'<code>.*</code>',
],
}
}