| Vorlagenprogrammierung | Diskussionen | Lua | Unterseiten | |||
| Modul | Deutsch | English | Modul: | Dokumentation | ||
Partei – This module has got three aims:
2.1A.DABAD0.| Daten | Quelltext | Ausgabe | ||
|---|---|---|---|---|
| Kode | Beispiel | |||
| Standard Farbe | ||||
| Party name | Standard Name | {{#invoke:Partei|farbe|Piratenpartei Deutschland}} | FF820A |
|
| Alternative Name (alias) | {{#invoke:Partei|farbe|Piratenpartei Berlin}} | FF820A |
||
| Acronym/Shortname | Standard Name | {{#invoke:Partei|farbe|PIRATEN|DE}} | FF820A |
|
| Alternative Name (alias) | {{#invoke:Partei|farbe|PIRATEN|DE-BE}} | FF820A |
||
| Alternative color | ||||
| Party name | Standard Name | {{#invoke:Partei|farbe|Piratenpartei Deutschland|V=A}} | 000000 |
|
| Alternative Name (alias) | {{#invoke:Partei|farbe|Piratenpartei Berlin|V=A}} | 000000 |
||
| Acronym/Shortname | Standard Name | {{#invoke:Partei|farbe|PIRATEN|DE|V=A}} | 000000 |
|
| Alternative Name (alias) | {{#invoke:Partei|farbe|PIRATEN|DE-BE|V=A}} | 000000 |
||
PIRATEN, DE;PIRATEN, DE-BE.2.1A, the alternative color code is shown.h = 0.6 applies to a party color an opacity equal to 60 % of the original opacity.F8F2F6.FFE6CEFFB46CCCCCCC666666FFE6CEFFB46CCCCCCC666666FFE6CEFFB46CCCCCCC666666CCCCCC6666662.1A, the alternative color code is shown.text-align:left is predefined and cannot be overwritten. Other styles (for example: font-size) can be included only in the table's styles (for example: {| class="wikitable" style="font-size:90%").DABAD0 (colour) + the same party.[[Christlich Demokratische Union Deutschlands|CDU]])[[Centre Démocrate Humaniste|CDH]]/<br/>[[Christen-Democratisch en Vlaams|CVP]])[[Fraktionslose Mitglieder des Europäischen Parlaments|Fraktionslose]]2.1A, the alternative color code is shown.{| class="wikitable" style="font-size:90%").DABAD0 (colour) + the same party.2.1A: the alternative color code is shown;H: the lighter standard color code is shown;HA: the lighter alternative color code is shown.{| class="wikitable" style="text-align:center").DABAD0.1A, the alternative color will be shown.3 = P → P = Lua/Modul/Partei/en, so Party name = Article3A, the alternative color will be shown.center, right. Default: left/ seats of the assembly * 100)| {{#invoke:Partei|parteisitze|50|100|Piratenpartei Deutschland}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|50|100|Piratenpartei Deutschland|V=A}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|50|100|PIRATEN|DE}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|50|100|PIRATEN|DE|V=A}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|40|120|Piratenpartei Deutschland|V=A|w=ja}} | 40 / 120 (33,3 %) |
| {{#invoke:Partei|parteisitze|50|100|Hallo}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|50|100|f=CC0000}} | 50 / 100 |
| {{#invoke:Partei|parteisitze|50|100}} | 50 / 100 |
partei.info={
...
["Piratenpartei Deutschland"]={"FF820A", "DEU", "000000"},
...
}
There are two or three values stored for each party, respectively:
The altname group contains the alternate names of a party (Landesverbände, old names). The following is an example of alternate name for the Sozialdemokratische Partei Deutschlands:
partei.altname={
...
["Piratenpartei Berlin"]="Piratenpartei Deutschland",
...
}
partei.info={
...
["AT-ÖVP"]={"Österreichische Volkspartei"},
["DE-PIRATEN"]={"Piratenpartei Deutschland"},
...
}
The first value is used, at the same time:
[[partei|akronym]]→ Support to Vorlage:Parlamentswahl.
Inside the wikilink [[partei|akronym]]:
partei (link target) is connected with the value nationality-acronym;acronym (link label) is part of that local value.Particular case
A. Disambiguation – If two or more acronyms are homonymous and the parties have the same nationality, these acronyms must be disambiguated, so that the couple nationality-acronym could identify a party in an unequivocal way. In these cases, the additional information (tipically, the date of foundation) must be written in brackets.
partei.akronym={
...
["DE-DSP (1889)"]={"Deutschsoziale Partei"},
["DE-DSP (1918)"]={"Deutschsozialistische Partei"},
...
["DE-FW"]={"Bundesverband der Freien Wähler"},
["DE-FW (BV)"]={"Freie Wähler (Partei)"},
...
}
B. Sequence – If a sequence of parties is necessary, it must be written as second argument:
partei.akronym={
...
["BE-PSC/CVP"]={"Centre Démocrate Humaniste", "[[Centre Démocrate Humaniste|PSC]]/<br/>[[Christen-Democratisch en Vlaams|CVP]]"},
...
}
The string [[Centre Démocrate Humaniste|PSC]]/<br/>[[Christen-Democratisch en Vlaams|CVP]] is used as party's name inside the template Parlamentswahl.
C. Link-label – If a wikilink must consist of a link target and of a link label, the same link label can be written after the parameter label:
partei.akronym={
...
["EU-NI"]={"Fraktionslose Mitglieder des Europäischen Parlaments", label="Fraktionslose"},
...
}
Result: [[Fraktionslose Mitglieder des Europäischen Parlaments|Fraktionslose]]:
The functions as documented above can be used by other modules per require().
local farbe = require('Modul:Partei').farbe
DABAD0.local hell = require('Modul:Partei').hell
F8F2F6.farbe passed to it (i.e. the standard color or the alternative color), or a local color code.local parteinamefarbe = require('Modul:Partei').parteinamefarbe
farbe passed to it, i.e. the standard color or – through the parameter/value V = A – the alternative color.local parteifarbezeile = require('Modul:Partei').parteifarbezeile
farbe passed to it, i.e. the standard color or – through the parameter/value V = A – the alternative color.local parteifarbezelle = require('Modul:Partei').parteifarbezelle
farbe passed to it, i.e. the standard color or – through the parameter/value V = A – the alternative color, or otherwisehell passed to it, i.e. the light standard color – through the parameter/value V = H – or the light alternative color – through the parameter/value V = HA.local pipelink = require('Modul:Partei').pipelink