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, with handling for various quirks/oddities.
| + | ==Verwendung== |
− | // First column=icon name -> same in all languages
| + | Zur Verwendung dieser Vorlage kann man englishen oder deutschen Bezeichnungen verwenden, das Ergebnis ist dann auf deutsch. |
− | // Second column=link (wiki page) name, generally same as displayed text -> needs translation
| + | <pre>{{Season|Frühling}} |
− | // All other values are synonyms
| + | {{Season|Summer}} |
− | // Marriage, Deviations are for sake of NPC schedule sections (and translations)
| + | {{Season|Fall|12}} |
− | // For 'All Seasons' case, display text doesn't match icon or wiki-link, so
| + | {{Season|Winter}} |
− | // define default display text in $lang_allseasons, with parameter allowing any other preferred value
| + | {{Season|Ehe}} |
− | -->{{ParseInputValues|code=season||
| + | {{Season|Deviations}} |
− | ,All Seasons Icon, Jahreszeiten, Seasons, All, All Seasons, Any, Always, Alle, Alles, Irgendein, Jede, Jedes, Ganzjährig,
| + | {{Season|All|width=48}} |
− | ,Spring, Frühling,
| + | {{Season|Irgendein}}</pre> |
− | ,Summer, Sommer,
| |
− | ,Fall, Herbst, Autumn,
| |
− | ,Winter, Winter,
| |
− | ,Mermaid's Pendant, Ehe,
| |
− | ,Deviations, Abweichungen,
| |
− | }}{{#arraydefine:$lang_allseasons | Alle }}<!-- | |
| | | |
− | // END OF translated text
| + | {{Season|Frühling}} |
| | | |
− | // Check whether there's already a file link in {{{1}}}... implying this is probably a recursive call. Return immediately
| + | {{Season|Summer}} |
− | -->{{#if:{{#pos:{{{1|}}}|{{Bracket|2}}File}}|{{{1}}}|<!--
| |
− | // Parse input data, then loop over all extracted entries
| |
− | -->{{#arraydefine:$sseason|{{ParseInputValues|{{{1|}}}|code=season|default=true}}}}<!--
| |
− | -->{{#arrayprint:$sseason||@season@|<!--
| |
| | | |
− | // Convert @season@ (icon name) into translated page name
| + | {{Season|Fall|12}} |
− | -->{{#arraydefine:$slink_text|{{ParseInputValues|code=season|@season@|translate=true}}}}<!--
| |
| | | |
− | // On first entry, add sort-key if requested. On other entries, add space and bullet.
| + | {{Season|Winter}} |
− | -->{{#ifexpr:{{#arraysearch:$sseason|@season@}}>0
| |
− | | • 
| |
− | |{{#if:{{{sortkey|}}}|
| |
− | <span class="sortkey" style="display:none;">{{#if:{{#arrayprint:$slink_text}}
| |
− | |{{#expr:{{ParseInputValues|code=season|@season@|translate=index}}+1}}
| |
− | |0}}</span>
| |
− | }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!--
| |
| | | |
− | // Display the non-icon, non-linkable cases: Deviations, and unmatched text (detected by empty link_text)
| + | {{Season|Ehe}} |
− | // This is also where 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|}}}
| |
− | |{{#ifeq:@season@|All Seasons Icon|All|@season@}}
| |
− | |{{#ifeq:@season@|All Seasons Icon|{{#arrayprint:$lang_allseasons}}|{{#arrayprint:$slink_text}}}}}}
| |
− | |<!--
| |
| | | |
− | // Display the normal cases: first display icon
| + | {{Season|Deviations}} |
− | | |
− | {{#if:{{{size|}}}|{{{size}}}px|{{{width|24px}}}}} | link={{#arrayprint:$slink_text}} | alt=]] <!--
| |
| | | |
− | // Add link, with special treatment for text of All Seasons
| + | {{Season|All|width=48}} |
− | -->[[{{#arrayprint:$slink_text}}|<!--
| + | |
− | -->{{#ifeq:@season@|All Seasons Icon
| + | {{Season|Irgendein}} |
− | |{{#if:{{{all|}}}|{{{all|}}}|{{#arrayprint:$lang_allseasons}}}}
| + | |
− | |{{#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>
| |