Zeile 1: |
Zeile 1: |
− | <includeonly><span style="display:inline; margin-right:0;">{{#switch: {{lc:{{{1}}}}} | + | <includeonly><!-- |
− | | spring | frühling = [[File:Spring.png|{{{width|24px}}}|link=Frühling]] [[Frühling]] | + | |
− | | summer | sommer = [[File:Summer.png|{{{width|24px}}}|link=Sommer]] [[Sommer]] | + | // Define the allowed values. Handling multiple quirks/oddities. Ideally, all of the names would work equally well |
− | | fall | herbst = [[File:Fall.png|{{{width|24px}}}|link=Herbst]] [[Herbst]] | + | // as displayed text, wiki page names, and icon names. But that's not possible. So top priority is to |
− | | winter = [[File:Winter.png|{{{width|24px}}}|link=Winter]] [[Winter]] | + | // create a list of valid page names. That's why 'Seasons' is primary name for 'All', 'Any', 'All Seasons' |
− | | marriage | ehe = [[File:Mermaid's Pendant.png|{{{width|24px}}}|link=Ehe]] [[Ehe]] | + | // Marriage, Deviations are for sake of NPC schedule sections (and translations) |
− | | deviations | abweichungen = Abweichungen | + | -->{{#arraydefine:$engl_seasons|Spring, Summer, Fall, Winter, Seasons, Marriage, Deviations, Fall, Seasons, Seasons, Seasons, Seasons, Seasons}}<!-- |
− | | all | any | alle | irgendein | jedes | ganzjährig= [[File:All_Seasons_Icon.png|{{{width|24px}}}|link=Jahreszeiten]] [[Jahreszeiten|Alle Jahreszeiten]] | + | -->{{#arraydefine:$lang_seasons|Frühling, Sommer, Herbst, Winter, Jahreszeiten, Ehe, Abweichungen, Autumn, All, Any, Irgendein, Jedes, Ganzjährig}}<!-- |
− | |{{{1|}}}}}</span></includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}<br><br>'''{{englishdoc}}'''</noinclude> | + | -->{{#arraydefine:$lang_allshort | Alle }}<!-- |
| + | -->{{#arraydefine:$lang_alllong | Alle Jahreszeiten}}<!-- |
| + | |
| + | // END OF translated text |
| + | |
| + | // Parse input data, then loop over all extracted entries |
| + | -->{{#arraydefine:$season|{{ParseInputValues|{{{1|}}}|{{#arrayprint:$engl_seasons}}|{{#arrayprint:$lang_seasons}}|default=true}}}}<!-- |
| + | -->{{#if:{{#arrayprint:$season}} | |
| + | <span style="display:inline; margin-right:0;"><!-- |
| + | -->{{#arrayprint:$season||@season@|<!-- |
| + | |
| + | // Add space if this is not first entry |
| + | -->{{#ifexpr:{{#arraysearch:$season|@season@}}>0| }}<!-- |
| + | |
| + | // Convert @season@ (english page name) into translated page name |
| + | -->{{#arraydefine:$link_text|{{#arrayindex:$lang_seasons|{{#arraysearch:$engl_seasons|@season@}}}}}}<!-- |
| + | |
| + | // Display the non-icon, non-linkable cases: Devations, and unmatched text (detected by empty link_text) |
| + | // This is also how text_only option is handled |
| + | -->{{#ifeq:{{#arrayprint:$link_text}}| |
| + | | {{ucfirst:@season@}} |
| + | | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}} |
| + | | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$link_text}}}} |
| + | | <!-- |
| + | |
| + | // Display the normal cases: first display icon |
| + | -->[[File:{{#switch:@season@ |
| + | |Spring |
| + | |Summer |
| + | |Fall |
| + | |Winter = @season@ |
| + | |Seasons = All_Seasons_Icon |
| + | |Marriage = Mermaid's Pendant |
| + | }}.png | {{{width|24px}}} | link={{#arrayprint:$link_text}} | alt={{#arrayprint:$link_text}}]] <!-- |
| + | |
| + | // Add link, with special treatment for text of All Seasons |
| + | -->[[{{#arrayprint:$link_text}}|<!-- |
| + | -->{{#ifeq:@season@|Seasons |
| + | |{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}} |
| + | |{{#arrayprint:$link_text}}}}]]<!-- |
| + | -->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/> |
| + | {{{{FULLPAGENAME}}/doc}} }}</noinclude> |