Vés al contingut

Mòdul:Itemgroup/groups: diferència entre les revisions

De la Viquipèdia, l'enciclopèdia lliure
Contingut suprimit Contingut afegit
doc
Qid for two rounds
Línia 31: Línia 31:
-- <!--direct --><!-- indirect --> <!-- first-past-the-post -->
-- <!--direct --><!-- indirect --> <!-- first-past-the-post -->
["direct"] = {'Q1196727', 'Q877353', 'Q5557375', 'direct', 'directa', 'indirect'},
["direct"] = {'Q1196727', 'Q877353', 'Q5557375', 'direct', 'directa', 'indirect'},
["two_rounds"] = {'two_rounds', 'two rounds', 'dues rondes', 'dues voltes', 'dos rondas'},
["two_rounds"] = {'Q615255', 'two_rounds', 'two rounds', 'dues rondes', 'dues voltes', 'dos rondas'},
["proportional"] = {'Q31764', 'proportional', 'proporcional'}, -- party-list proportional representation
["proportional"] = {'Q31764', 'proportional', 'proporcional'}, -- party-list proportional representation
["referendum"] = {'Q43109', 'referendum'},
["referendum"] = {'Q43109', 'referendum'},

Revisió del 16:16, 14 abr 2021

--[[
This module is a data table used by function "group" of module:itemgroup.

It contains a list of "values" associated with a ["my group"], 
 which will be returned if the Qid in {{{item|}}} matches any of the values in the list. 
It allows templates to simulate a multivalue "if" or "switch" asking by the ["my group"],
 instead having the Qid target within code. In fact, it sinonimize different Qid to be processed in the same way.
It allows platform-level customization of template operation.

To have different collections of series linked to one (["my group"]), them may be gather under ["mytable"] subtable. 
When invoked, the value of {{{item|}}} is searched within all ["mytable"] values
 and returns the corresponding ["my group"], or null if none match. 

The name assigned to ["mytable"] and ["my group"] is free, but is determined by the template's use. 
]]

local data = {

--["mytable"] = {
--	["mygroup"] = {'Qid1', 'Qid2'},
--}

-- tables and groups, edit below

-- Values used in template infobox elections and its subtemplates
["IBelection_yesorno"] = {
	["yes_in_referendum"]	= {'Q41216873', 'Q231043', 'Q24759380'},	-- /prepare
	["no_in_referendum"]	= {'Q41216897', 'Q19358049', 'Q24759450'}	-- /prepare
	},
["IBelection_type_election"] = {
        	-- <!--direct --><!-- indirect --> <!-- first-past-the-post -->
	["direct"]		 = {'Q1196727', 'Q877353', 'Q5557375', 'direct', 'directa', 'indirect'},
	["two_rounds"] 	 = {'Q615255', 'two_rounds', 'two rounds', 'dues rondes', 'dues voltes', 'dos rondas'},
	["proportional"] = {'Q31764', 'proportional', 'proporcional'},  -- party-list proportional representation
	["referendum"] 	 = {'Q43109', 'referendum'},    
	["limited"] 	 = {'Q3786779', 'limited'},      --vot limitat
	["double"]		 = {'double', 'double election', 'doble', 'doble elecció', 'doble elección'}
	},
["infobox organisation"] = {
	["esport"]  = {'Q847017','Q4438121'},
	["edifici"] = {'Q411761', 'Q55488', 'Q483110', 'Q7540126', 'Q16560', 'Q644371', 'Q1021645'}

}



-- end of tables, do not edit below
}
return data