Module:European and national party data/doc: Difference between revisions

Content deleted Content added
Added info on data update
Undid revision 1296358208 by Julius Schwarz (talk)
 
(9 intermediate revisions by the same user not shown)
Line 25:
* <code>country</code>: the country in which the entity is registered (P17);
* <code>foundation date</code>: the date on which the entity was founded (P571);
* <code>foundation year</code>: the year in which the entity was founded (P571);
* <code>individual members</code>: the number of individual members of the entity (P2124);
* <code>individual members date</code>: the reference date for the number of individual members of the entity (based on P2124);
* <code>individual members year</code>: the reference year for the number of individual members of the entity (based on P2124);
* <code>label</code>: the name of the entity;
* <code>official name</code>: the official long-form name of the entity (P1448);
Line 78 ⟶ 80:
* [[European Council]]: EUCO
* [[European Committee of the Regions]]: COR
* [[Parliamentary Assembly of the Council of Europe]]: PACE
* Lower houses in EU member states: ms-lower-house (alternatively, "lower-house" and "lower" also work)
* Upper houses in EU member states: ms-upper-house (alternatively, "upper-house" and "upper" also work)
Line 83 ⟶ 86:
Notes:
* For lower and upper houses for national parties, the module will automatically determine the relevant body, using [[:commons:Data:Mapping of national parties members of European parties to lower and upper houses.tab|this table]];
* For lower and upper houses for European parties, the module will sum the number of seats of their member parties across member states; and
* For the European Parliament for national parties, the module will automatically use the member state's number of seats in the Parliament.; and
* As of June 2025, the per-European party breakdown of seats of PACE political groups is rarely available.
This parameter is mandatory when <code>data_type</code> is <code>seat</code>, <code>seat share</code>, or <code>seat composition bar</code>.
|-
Line 105 ⟶ 109:
== Related templates ==
 
The module is directly implemented by twothree templates:
* [[Template:EUPP data]], which presets <code>|party_type=european_entity</code>;
* [[Template:Political party data]], which presets <code>|party_type=national_party</code>; and
Line 144 ⟶ 148:
Updating Wikidata ensures that updated and sourced information is available not just to this Wiki, but to all versions of Wikipedia, as well as to other services drawing information from Wikidata.
 
== Translating the module ==
 
To adapt the module to a new Wiki, follow these steps:
# Create two modules to replicate the modules below (the content must remain the same as in the English version):
## [[Module:European and national party data]], and
## [[Module:European and national party data/Wd]];
# Create the following files and translate them as needed (translate only the non-English parts, as indicated):
## [[Module:European and national party data/config]], and
## [[Module:European and national party data/Wd/i18n]];
# Translate the module documentations, and adapt the examples as necessary using the translated terms;
# Create testcases, such as the ones below, and adapt the examples as necessary using the translated terms:
## [[Module:European and national party data/testcases]], and
## [[Module:European and national party data/testcases composition bar]];
# Create three templates to replicate the ones below:
## [[Template:EUPP data]],
## [[Template:Political party data]], and
## [[Template:EU institution seats]];
# Translate the template documentations, based on the module documentations, and adapt the examples as necessary using the translated terms;
# Add the two modules in the "Wikipedia" sections of the two relevant Wikidata pages below:
## [[:wikidata:item:Q133503746|Module:European and national party data]]
## [[:wikidata:item:Q134564209|Module:European and national party data/Wd]]
# Create a topic on the consolidated [[Module talk:European and national party data|module talk page]] to adapt the content of the common module (in particular its function for composition bars) to the new Wiki. After being adapted, the main module will be synchronised to update the modules in all Wiki languages; this helps ensure that the same module is used across Wikis, which is essential to keep its functions updated.
 
== Examples ==
Line 298 ⟶ 324:
| colour of the Party of European Socialists
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entitynational_party|colorcountry|PESQ1315362}}</nowiki></code>
| {{#invoke:European and national party data|main|national_party|country|Q1315362}}
| country of Levice (called by its Wikidata qID)
Line 309 ⟶ 335:
| {{#invoke:European and national party data|main|european_entity|individual members|EPP|reference=yes}}
| individual members of the European People's Party, with reference
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entity|individual members date|EPP}}</nowiki></code>
| {{#invoke:European and national party data|main|european_entity|individual members date|EPP}}
| date of reference for individual members of the European People's Party
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entity|individual members date|Volt}}</nowiki></code>
| {{#invoke:European and national party data|main|european_entity|individual members date|Volt}}
| date of reference for individual members of Volt (year only)
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entity|individual members year|EPP}}</nowiki></code>
| {{#invoke:European and national party data|main|european_entity|individual members year|EPP}}
| year of reference for individual members of the European People's Party
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entity|individual members year|Volt}}</nowiki></code>
| {{#invoke:European and national party data|main|european_entity|individual members year|Volt}}
| year of reference for individual members of Volt (year only)
|-
| <code><nowiki>{{#invoke:European and national party data|main|european_entity|label|ALDE}}</nowiki></code>