Vorlage:Season: Unterschied zwischen den Versionen

Aus Stardew Valley Wiki
Zur Navigation springen Zur Suche springen
(Revamp using new helper templates)
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]]&nbsp;[[Frühling]]
+
 
| summer | sommer  = [[File:Summer.png|{{{width|24px}}}|link=Sommer]]&nbsp;[[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]]&nbsp;[[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]]&nbsp;[[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]]&nbsp;[[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]]&nbsp;[[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|&#32;}}<!--
 +
 
 +
// 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}}]]&nbsp;<!--
 +
 
 +
// 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>

Version vom 3. September 2020, 02:10 Uhr

Details zur Vorlage finden Sie auf der englischsprachigen Dokumentationsseite.

Verwendung

Diese Vorlage kann verwendet werden, indem Sie auf eine relevante Seite folgendes eingeben.

{{Season}}

Ergibt... Vorlage:ParseInputValues