Difference between revisions of "Module:TV ratings/data"

From blackwiki
Jump to navigation Jump to search
blackwiki>Kingsif
blackwiki>Kingsif
Line 6: Line 6:
 
{ 'S5', 'S5' },
 
{ 'S5', 'S5' },
 
}
 
}
 
local function setupSortkeys(t)
 
local retval = {}
 
for k, v in ipairs(t) do
 
retval[v[2]] = { name = v[1], sortkey = k }
 
end
 
return retval
 
end
 
  
 
return {
 
return {
 
reviewers = setupSortkeys(reviewers),
 
reviewers = setupSortkeys(reviewers),
 
aggregators = setupSortkeys(aggregators),
 
aggregators = setupSortkeys(aggregators),
systems = setupSortkeys(systems),
+
seasons = setupSortkeys(seasons),
 
i18n = {
 
i18n = {
 
wrapper = 'Template:TV ratings',
 
wrapper = 'Template:TV ratings',

Revision as of 17:11, 21 April 2020

Documentation for this module may be created at Module:TV ratings/data/doc

local seasons = {
	{ 'S1', 'S1' },
	{ 'S2', 'S2' },
	{ 'S3', 'S3' },
	{ 'S4', 'S4' },
	{ 'S5', 'S5' },
}

return {
	reviewers = setupSortkeys(reviewers),
	aggregators = setupSortkeys(aggregators),
	seasons = setupSortkeys(seasons),
	i18n = {
		wrapper = 'Template:TV ratings',
		emptyCategory = '[[Category:Empty templates on articles]]',
		multiseasonCategory = '[[Category:Articles using TV ratings template with multiple seasons]]',
		aggregateScore = 'Aggregate score',
		aggregateScores = 'Aggregate scores',
		aggregator = 'Aggregator',
		na = 'N/A',
		publication = 'Publication',
		reception = 'Reception',
		reviewScore = 'Review score',
		reviewScores = 'Review scores',
		score = 'Score',
	},
	argi18n = {
		-- For non-English wikis, add translations of argument keys here.
		-- Example:
		-- subtitle = 'untertitel'
	}
}