मोड्युल:Infobox television season disambiguation check
स्वरूप
मोड्युल कागजात[हेर्नुहोस्] [सम्पादन गर्नुहोस्] [इतिहास] [ताजा गर्नुहोस्]
This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
यो मोड्युल निम्न अन्य मोड्युलहरूमा निर्भर छ: |
Module:Infobox television season disambiguation check is used to validate the disambiguation of a page using {{Infobox television season}}.
What it does
[सम्पादन गर्नुहोस्]The module preforms two checks:
- It checks by a series of validations if one of the accepted WP:NCTV disambiguation styles appears in the parenthesis. If it is incorrect, it places the page in Category:Television articles with incorrect naming style. Validations currently supported:
- Validates the format used is one of the accepted values.
- Validates the country adjective used is correct.
- Validates the year is using 4 digits.
- Validates that the style is in the style of one of the following:
- season/series <#>
- <country> season/series <#>
- <country> season/series
- <year> TV series, season/series <#>
- <country> TV series, season/series <#>
- <year> <country> TV series, season/series <#>
- It checks if a page is using "(TV series)" as disambiguation, but uses {{Infobox television season}} instead of {{Infobox television}}. If so, it places the page in Category:Television articles using incorrect infobox.
Usage
[सम्पादन गर्नुहोस्]{{#invoke:Infobox television season disambiguation check|main}}
Parameter list
[सम्पादन गर्नुहोस्]The following parameter can be used as a positional parameter.
Parameter | Explanation | Status |
---|---|---|
1
|
The page's title. | required |
See also
[सम्पादन गर्नुहोस्]Tracking 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, season",
"TV series, series",
"season",
"series"
}
local validDisambiguationPatternList = {
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) ([%D]+) TV series, season (%d+)$", type = 8}, -- "VALIDATION_TYPE_YEAR_COUNTRY_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) ([%D]+) TV series, series (%d+)$", type = 8}, -- "VALIDATION_TYPE_YEAR_COUNTRY_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) TV series, season (%d+)$", type = 4}, -- "VALIDATION_TYPE_YEAR_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^(%d+) TV series, series (%d+)$", type = 4},
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) TV series, season (%d+)$", type = 5}, -- "VALIDATION_TYPE_COUNTRY_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) TV series, series (%d+)$", type = 5},
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) season (%d+)$", type = 5}, -- "VALIDATION_TYPE_COUNTRY_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) series (%d+)$", type = 5},
validateDisambiguation.DisambiguationPattern{pattern = "^([%D]+) season$", type = 7}, -- "VALIDATION_TYPE_COUNTRY_SEASON"
validateDisambiguation.DisambiguationPattern{pattern = "^season (%d+)$", type = 6}, -- "VALIDATION_TYPE_SEASON_NUMBER"
validateDisambiguation.DisambiguationPattern{pattern = "^series (%d+)$", type = 6}
}
local exceptionList = {
"^Bigg Boss %(Bangla season %d+%)$",
"^Bigg Boss %(Hindi season %d+%)$",
"^Bigg Boss %(Malayalam season %d+%)$",
"^Bigg Boss %(Tamil season %d+%)$",
"^Bigg Boss %(Telugu season %d+%)$"
}
local otherInfoboxList = {
["^[^,]*TV series$"] = "[[Category:Television articles using incorrect infobox|T]]"
}
local invalidTitleStyleList = {
"List of"
}
local function getOtherInfoboxListMerged()
local infoboxTelevisionDisambiguation = require('Module:Infobox television disambiguation check')
local list = infoboxTelevisionDisambiguation.getDisambiguationTypeList()
for i = 1, #list do
otherInfoboxList[list[i]] = "[[Category:Television articles using incorrect infobox|T]]"
end
return otherInfoboxList
end
local function _main(args)
local title = args[1]
local otherInfoboxListMerged = getOtherInfoboxListMerged()
return validateDisambiguation.main(title, "infobox television season", validDisambiguationTypeList, validDisambiguationPatternList, exceptionList, otherInfoboxListMerged, invalidTitleStyleList)
end
function p.main(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return category
end
function p.test(frame)
local args = getArgs(frame)
local category, debugString = _main(args)
return debugString
end
return p