Modulo:European and national party data/config: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Update following module deployment
Added PACE support
 
(10 versioni intermedie di uno stesso utente non sono mostrate)
Riga 6:
 
local settings_t = {
template_name = 'EUPPEuropean seatsand national party data', -- name of the template that #invokes this module
err_category = 'ArticlesArticoli withcon EUPPEuropean seatsand errorsnational party data errori', -- name of category that lists article with EUPP seats errors
help = 'helpaiuto' -- help link display text for error messages
}
 
Riga 19:
 
local error_messages_t = {
thisparty = 'notnon calledchiamato fromdalla thepagina pagedi ofun apartito European partyeuropeo', -- misapplied 'thisparty' keyword
inst_unknown_party = 'institutionistituzione $1 hasha unknownun partypartito sconosciuto: $2', -- $1 is institution; $2 is party
missing_inst = 'institutionistituzione is requirednecessaria', -- first positional parameter is always required
party_req = 'partypartito is requirednecessario', -- for those cases when party is missing when required
party_req_share = 'partypartito is required for sharenecessario', -- for those cases when party is missing when required because share is called
ind_only_euco = 'theil INDparametro parameterIND isè onlydisponibile availablesolo forper EUCO',
all_none_unavailable = 'theil parameterparametro $1 isnon notè availabledisponibile forper nationalle legislatureslegislature nazionali',
unknown_inst = 'unknownistituzione institutionsconosciuta: $1', -- $1 is content of first positional parameter (should be institution abbrev)
unknown_party = 'unknownpartito partysconosciuto: $1', -- $1 is content of second positional parameter (should be party abbrev)
unknown_house_type = 'unknowntipo housede typecamera sconosciuto: $1', -- $1 is content of second positional parameter (should be accepted house types)
unknown_param = 'unknownparametro parametersconosciuto: $1', -- $1 is content of third positional parameter; not '%' or 'share'
parameter_invalid = 'parameterparametro invalidinvalido: $1',
percentage_invalid = 'percentagepercentuale invalidinvalido: $1', -- $1 is content of fourth positional parameter; not 'yes' or 'pc=yes'
reference_invalid = 'referencereferenza invalidinvalida: $1', -- $1 is content of fifth positional parameter; not 'yes' or 'ref=yes'
no_qid = 'thela pagepagina doesnon notha haveun aqID Wikidatadi qIDWikidata', -- if no qID
not_a_member_party = 'notnon calledchiamato fromdalla thepagina pagedi ofun apartito membermembro partydi ofun apartito Europeanpolitico political partyeuropeo, see https://www.wikidata.org/wiki/$1', --if qid but not listed in table
no_data = 'nonessun datadato availabledisponibile onsu Wikidata forper $2; see https://www.wikidata.org/wiki/$1', --if no data
no_data_short = 'nessun dato disponibile su Wikidata', --if no data
not_member_state = 'the qID does not belong to a member state or there is no data available on Wikidata, see https://www.wikidata.org/wiki/$1', --if not member state qID or no data
no_countrynot_member_state = 'noil countryqID isnon associatedappartiene witha thisuno qIDstato membro o non ci sono dati disponibili su Wikidata, see https://www.wikidata.org/wiki/$1', --if not member state qID or no data
no_country = 'nessun paese è associato a questo qID, see https://www.wikidata.org/wiki/$1', --if not member state qID or no data
unknown_data_type = 'unknown data type: $1',
unknown_data_type = 'tipo di dati sconosciuto: $1',
not_valid_eupp_parameter = 'European party or parameter not valid: $1',
not_valid_eupp_parameter = 'partito europeo o parametro non valido: $1',
not_valid_npp = 'National party not valid: $1',
unknown_party_typenot_valid_npp = 'unknownpartito partynazionale typenon valido: $1',
unknown_party_type = 'tipo di partito sconosciuto: $1'
}
 
Riga 55 ⟶ 56:
EC = 'Q8880', -- European Commission
EP = 'Q8889', -- European Parliament
EUCO = 'Q8886', -- European Council
PACE = 'Q939743' -- Parliamentary Assembly of the Council of Europe
}
 
Riga 76 ⟶ 78:
VOLT = 'Q55229798', -- Volt Europa
DIEM25 = 'Q22674451', -- Democracy in Movement 2025
PPEU = 'Q15081858', -- European Pirate Party
APEU = 'Q22079847', -- Animal Politics EU
ECA = 'Q123785828', -- European Communist Action
}
Riga 89 ⟶ 91:
EC = 'P208', -- executive body
EP = 'P194',
EUCO = 'P208',
PACE = 'P194'
}
 
Riga 126 ⟶ 129:
UPPER_HOUSE = true,
}
 
--[[--------------------------< T R A N S L A T I O N >--------------------------------------------------
 
translate these (except this_project_language).
 
]]
 
local this_project_language = mw.language.getContentLanguage():getCode(); -- get local language
 
local xlate_t = {
it = { -- translations for Italian (it)
-- party type
entita_europea = 'european_entity',
partito_nazionale = 'national_party',
-- data type
seggi = 'seats',
quota_di_seggi = 'seat share',
barra_di_composizione_di_seggi = 'seat composition bar',
acronimo = 'acronym',
colore = 'color',
paese = 'country',
data_fondazione = 'foundation date',
anno_fondazione = 'foundation year',
membri_individuali = 'individual members',
data_membri_individuali = 'individual members date',
anno_membri_individuali = 'individual members year',
etichetta = 'label',
nome_ufficiale = 'official name',
gruppo_parlamentare = 'parliamentary group',
finanziamento_pubblico = 'public funding',
sito_web = 'website',
-- European political parties and alliances
ALDE = 'ALDE', -- Alliance of Liberals and Democrats for Europe Party
PPCE = 'ECPP', -- European Christian Political Party
CRE = 'ECR', -- European Conservatives and Reformists
PDE = 'EDP', -- European Democratic Party
ALE = 'EFA', -- European Free Alliance
PVE = 'EGP', -- European Green Party
SE = 'EL', -- Party of the European Left
ELA = 'ELA', -- European Left Alliance for the People and the Planet
PPE = 'EPP', -- European People's Party
ESN = 'ESN', -- Europe of Sovereign Nations
PATRIOTS = 'PATRIOTS', -- Patriots.eu
PSE = 'PES',
VOLT = 'VOLT', -- Volt Europa
DIEM25 = 'DIEM25', -- Democracy in Movement 2025
PPEU = 'PPEU', -- European Pirate Party
APEU = 'APEU', -- Animal Politics EU
ECA = 'ECA', -- European Communist Action
-- special parameters
IND = 'IND',
TUTTI = 'ALL',
NESSUNO = 'NONE',
QUESTOPARTITO = 'THISPARTY',
-- yes
si = 'yes',
-- institutions
CDR = 'COR',
CE = 'EC',
PE = 'EP', -- European Parliament; translated from pt language to default (en)
EUCO = 'EUCO',
APCE = 'PACE',
["CAMERA-BASSA"] = 'LOWER_HOUSE',
["CAMERA-ALTA"] = 'UPPER_HOUSE',
-- extra parameters
referenza = 'reference',
circoscrizione = 'constituency',
larghezza = 'width',
["per-cento"] = 'percent',
["colore-barra"] = 'bar-color',
["colore-di-sfondo"] = 'background-color',
bordo = 'border',
numero1 = 'num1',
barra = 'bar',
numero2 = 'num2',
verboso = 'verbose',
},
}
 
local xlate_param_t = {
it = { -- translations for Italian (it)
-- extra parameters
reference = 'referenza',
constituency = 'circoscrizione',
width = 'larghezza',
percent = 'per-cento',
["bar-color"] = 'colore-barra',
["background-color"] = 'colore-di-sfondo',
border = 'bordo',
num1 = 'numero1',
bar = 'barra',
num2 = 'numero2',
verbose = 'verboso',
Y = 'A', -- for formatDate year
},
}
 
 
--[[--------------------------< B U I L D _ T A B _ D A T A >--------------------------------------------------
Riga 234 ⟶ 340:
rev_parties_t = invert_qid_map (parties_t),
rev_alliances_t = invert_qid_map (alliances_t),
this_project_language = this_project_language,
xlate_t = xlate_t,
xlate_param_t = xlate_param_t,
 
tab_data_t = tab_data_t;