Jump to content

Module:European and national party data/config

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Trappist the monk (talk | contribs) at 17:47, 24 March 2025 (create;). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
--[[--------------------------< W I K I D A T A   Q I D   M A P >----------------------------------------------

do not translate these.  These tables map abbreviations use in the template/module call to wikidata qids

]]

local institutions_t = {														-- map institution abbreviation to wikidata qid
	COR = 'Q205203',															-- European Committee of the Regions
	EC = 'Q8880',																-- European Commission
	EP = 'Q8889',																-- European Parliament
	EUCO = 'Q8886'																-- European Council
	}

local parties_t = {																-- map party abbreviation to wikidata qid
	ALDE = 'Q25079',															-- Alliance of Liberals and Democrats for Europe Party
	ECPM = 'Q1377279',															-- European Christian Political Movement
	ECR = 'Q1577483',															-- European Conservatives and Reformists
	EDP = 'Q734792',															-- European Democratic Party
	EFA = 'Q639383',															-- European Free Alliance
	EGP = 'Q950179',															-- European Green Party
	EL = 'Q202649',																-- Party of the European Left
	ELA = 'Q130219314',															-- European Left Alliance for the People and the Planet
	EPP = 'Q208242',															-- European People's Party
	ESN = 'Q130269264',															-- Europe of Sovereign Nations
	PATRIOTS = 'Q18907386',														-- Patriots.eu
	PES = 'Q220945'																-- Party of European Socialists
	}

local misc_parties_t = {
	IND = 'Q327591',															-- independent politicians on the European Council
	}

																				-- TODO: replace <pseudo_parties_t> with <misc_parties_t> and <keywords_t> in main module
local pseudo_parties_t = {														-- allowed names that are not 'parties' but in the 'party' positional parameter
	ALL = true,																	-- seats of all European parties combined
	NONE = true,																-- seats not occupied by European parties
	IND = 'Q327591',															-- independent politicians on the European Council
	THISPARTY = true,															-- for use when module is called from the page of a European party
	}

--[[--------------------------< K E Y W O R D S >--------------------------------------------------------------

do not translate these.  this table lists all known keywords that may appear in the party (2nd) positional parameter

]]

local keywords_t = {
	ALL = true,																	-- seats of all European parties combined
	NONE = true,																-- seats not occupied by European parties
	THISPARTY = true,															-- for us when module is called from the page of a European party
	}

--[[--------------------------< E R R O R _ M E S S A G E S _ T >----------------------------------------------

error message definitions for i18n; translate only the rvalues

]]

local error_messages_t = {
	['thisparty'] = 'not called from the page of a European party',				-- misapplied 'thisparty' keyword
	['inst_unknown_party'] = 'institution $1 has unknown party: $2',			-- $1 is institution; $2 is party
	['missing_inst'] = 'institution is required',								-- first positional parameter is always required
	['party_req'] = 'party is required',										-- for those cases when party is missing when required
	['unknown_inst'] = 'unknown institution: $1',								-- $1 is content of first positional parameter (should be institution abbrev)
	['unknown_party'] = 'unknown party: $1',									-- $1 is content of second positional parameter (should be party abbrev)
	['unknown_param'] = 'unknown parameter: $1',								-- $1 is content of third positional parameter; not '%' or 'share'
	}


--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]

return {
	error_messages_t = error_messages_t,
	
	institutions_t = institutions_t,
	keywords_t = keywords_t,
	misc_parties_t = misc_parties_t,
	parties_t = parties_t,
	pseudo_parties_t = pseudo_parties_t,										-- TODO: delete this table
	}