ਮੌਡਿਊਲ:Infobox television disambiguation check
Module:Infobox television disambiguation check is used to validate the disambiguation of a page using {{Infobox television}}. What it doesThe module preforms two checks:
UsageParameter listThe following parameter can be used as a positional parameter.
See alsoTracking categories
-- This module requires the use of the following modules.
local getArgs = require('Module:Arguments').getArgs
local validateDisambiguation = require('Module:Television infoboxes disambiguation check')
local p = {}
local validDisambiguationTypeList = {
"TV series",
"TV programme",
"TV program",
"TV film",
"film",
"miniseries",
"serial",
"game show",
"talk show",
"web series"
}
local validDisambiguationPatternList = {
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) (%D+)", type = 1}, --"VALIDATION_TYPE_YEAR_COUNTRY"
validateDisambiguation.DisambiguationPattern{pattern = "^%d+$", type = 2}, --"VALIDATION_TYPE_YEAR"
validateDisambiguation.DisambiguationPattern{pattern = "^%D+$", type = 3} --"VALIDATION_TYPE_COUNTRY"
}
local exceptionList = {
"The (206)",
"Bigg Boss (Hindi TV series)",
"Bigg Boss (Malayalam TV series)",
"Bigg Boss (Tamil TV series)",
"Bigg Boss (Telugu TV series)",
"Cinderella (Apakah Cinta Hanyalah Mimpi?)",
"Deal or No Deal Malaysia (English-language game show)",
"Deal or No Deal Malaysia (Mandarin-language game show)",
"How to Live with Your Parents (For the Rest of Your Life)",
"How to Sell Drugs Online (Fast)",
"I (Almost) Got Away With It",
"Kevin (Probably) Saves the World",
"Love (ft. Marriage and Divorce)",
"M.R.S. (Most Requested Show)",
"Monty Python: Almost the Truth (Lawyers Cut)",
"Off Sides (Pigs vs. Freaks)",
"Randall and Hopkirk (Deceased)",
"Wednesday 9:30 (8:30 Central)",
"Who the (Bleep)...",
"Who the (Bleep) Did I Marry?",
}
local otherInfoboxList = {
["franchise"] = "[[Category:Television articles using incorrect infobox|FRANCHISE]]",
["radio"] = "[[Category:Television articles using incorrect infobox|R]]",
["season"] = "[[Category:Television articles using incorrect infobox|S]]",
["series %d*"] = "[[Category:Television articles using incorrect infobox|S]]",
["TV programming block"] = "[[Category:Television articles using incorrect infobox|P]]",
["film series"] = "[[Category:Television articles using incorrect infobox|FILM]]"
}
-- Empty for now.
local invalidTitleStyleList = {}
local function _main(args)
local title = args[1]
return validateDisambiguation.main(title, "infobox television", validDisambiguationTypeList, validDisambiguationPatternList, exceptionList, otherInfoboxList, invalidTitleStyleList)
end
function p.main(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return category
end
local function removeFromArray(t, delete)
local j = 1
local n = #t
for i = 1, n do
if (t[i] ~= delete) then
-- Move i's kept value to j's position, if it's not already there.
if (i ~= j) then
t[j] = t[i]
t[i] = nil
end
j = j + 1 -- Increment position of where we'll place the next kept value.
else
t[i] = nil
end
end
return t
end
function p.getDisambiguationTypeList()
return removeFromArray(validDisambiguationTypeList, "TV series")
end
function p.test(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return debugString
end
return p
|
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve
Portal di Ensiklopedia Dunia