Zeile 1: |
Zeile 1: |
− | <includeonly><!-- | + | <includeonly><span style="display:inline; margin-right:0;">{{#switch: {{lc:{{{1}}}}} |
| + | |1|01|spring|[[spring]]|frühling|[[frühling]] = [[File:Spring.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}| {{{2|}}}}} [[Frühling]] |
| + | |2|02|summer|[[summer]]|sommer|[[sommer]] = [[File:Summer.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}| {{{2|}}}}} [[Sommer]] |
| + | |3|03|fall|autumn|herbst|[[fall]]|[[autumn]]|[[herbst]] = [[File:Fall.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}| {{{2|}}}}} [[Herbst]] |
| + | |4|04|winter|[[winter]] = [[File:Winter.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}| {{{2|}}}}} [[Winter]] |
| + | |marriage|ehe|[[marriage]]|[[ehe]] = [[File:Mermaid's Pendant.png|{{{width|24px}}}|link=]] [[Ehe]] |
| + | |deviations|abweichungen = Abweichungen |
| + | |5|05|all|any|jahreszeiten|alle|alles|jede|jedes|immer|jeder|irgendein = [[File:All Seasons Icon.png|{{{width|24px}}}|link=]] [[Jahreszeiten|Alle]] |
| + | |#default = {{ucfirst:{{{1|}}} }} }}</span></includeonly><noinclude>{{Englishdoc}} |
| | | |
− | // Define the allowed values. Handling multiple quirks/oddities. Ideally, all of the names would work equally well
| + | ==Verwendung== |
− | // as displayed text, wiki page names, and icon names. But that's not possible. So top priority is to
| + | Zur Verwendung dieser Vorlage kann man englishen oder deutschen Bezeichnungen verwenden, das Ergebnis ist dann auf deutsch. |
− | // create a list of valid page names. That's why 'Seasons' is primary name for 'All', 'Any', 'All Seasons'
| + | <pre>{{Season|Frühling}} |
− | // Marriage, Deviations are for sake of NPC schedule sections (and translations)
| + | {{Season|Summer}} |
− | -->{{#arraydefine:$engl_seasons|Spring, Summer, Fall, Winter, Seasons, Marriage, Deviations, Fall, Seasons, Seasons, Seasons, Seasons, Seasons}}<!--
| + | {{Season|Fall|12}} |
− | -->{{#arraydefine:$lang_seasons|Frühling, Sommer, Herbst, Winter, Jahreszeiten, Ehe, Abweichungen, Autumn, All, Any, Irgendein, Jedes, Ganzjährig}}<!--
| + | {{Season|Winter}} |
− | -->{{#arraydefine:$lang_allshort | Alle }}<!--
| + | {{Season|Ehe}} |
− | -->{{#arraydefine:$lang_alllong | Alle Jahreszeiten}}<!--
| + | {{Season|Deviations}} |
| + | {{Season|All|width=48}} |
| + | {{Season|Irgendein}}</pre> |
| | | |
− | // END OF translated text
| + | {{Season|Frühling}} |
| | | |
− | // Parse input data, then loop over all extracted entries
| + | {{Season|Summer}} |
− | -->{{#arraydefine:$sseason|{{ParseInputValues|{{{1|}}}|{{#arrayprint:$engl_seasons}}|{{#arrayprint:$lang_seasons}}|default=true}}}}<!--
| |
− | -->{{#if:{{#arrayprint:$sseason}} |
| |
− | <span style="display:inline; margin-right:0;"><!--
| |
− | -->{{#arrayprint:$sseason||@season@|<!--
| |
| | | |
− | // Add space and bullet if this is not first entry
| + | {{Season|Fall|12}} |
− | -->{{#ifexpr:{{#arraysearch:$sseason|@season@}}>0| • }}<!--
| |
| | | |
− | // Convert @season@ (english page name) into translated page name
| + | {{Season|Winter}} |
− | -->{{#arraydefine:$slink_text|{{#arrayindex:$lang_seasons|{{#arraysearch:$engl_seasons|@season@}}}}}}<!--
| |
| | | |
− | // Display the non-icon, non-linkable cases: Devations, and unmatched text (detected by empty link_text)
| + | {{Season|Ehe}} |
− | // This is also how text_only option is handled
| |
− | -->{{#ifeq:{{#arrayprint:$slink_text}}|
| |
− | | {{ucfirst:@season@}}
| |
− | | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}}
| |
− | | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$slink_text}}}}
| |
− | | <!--
| |
| | | |
− | // Display the normal cases: first display icon
| + | {{Season|Deviations}} |
− | -->[[File:{{#switch:@season@
| |
− | |Spring
| |
− | |Summer
| |
− | |Fall
| |
− | |Winter = @season@
| |
− | |Seasons = All_Seasons_Icon
| |
− | |Marriage = Mermaid's Pendant
| |
− | }}.png | {{{width|24px}}} | link={{#arrayprint:$slink_text}} | alt={{#arrayprint:$slink_text}}]] <!--
| |
| | | |
− | // Add link, with special treatment for text of All Seasons
| + | {{Season|All|width=48}} |
− | -->[[{{#arrayprint:$slink_text}}|<!--
| + | |
− | -->{{#ifeq:@season@|Seasons
| + | {{Season|Irgendein}} |
− | |{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}}
| + | |
− | |{{#arrayprint:$slink_text}}}}]]<!--
| + | ==Anmerkungen== |
− | -->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
| + | Beachten Sie, dass Ehe- und Saisonabweichungen für die Aufnahme in [[:Vorlage:ScheduleHeader]] hinzugefügt wurden.</noinclude> |
− | {{{{FULLPAGENAME}}/doc}} }}</noinclude>
| |