Vorlage:Season: Unterschied zwischen den Versionen

Aus Stardew Valley Wiki
Zur Navigation springen Zur Suche springen
(Revamp using new helper templates)
K (unique arrays for each template)
Zeile 13: Zeile 13:
  
 
// Parse input data, then loop over all extracted entries
 
// Parse input data, then loop over all extracted entries
-->{{#arraydefine:$season|{{ParseInputValues|{{{1|}}}|{{#arrayprint:$engl_seasons}}|{{#arrayprint:$lang_seasons}}|default=true}}}}<!--
+
-->{{#arraydefine:$sseason|{{ParseInputValues|{{{1|}}}|{{#arrayprint:$engl_seasons}}|{{#arrayprint:$lang_seasons}}|default=true}}}}<!--
-->{{#if:{{#arrayprint:$season}} |
+
-->{{#if:{{#arrayprint:$sseason}} |
 
<span style="display:inline; margin-right:0;"><!--
 
<span style="display:inline; margin-right:0;"><!--
-->{{#arrayprint:$season||@season@|<!--
+
-->{{#arrayprint:$sseason||@season@|<!--
  
 
// Add space if this is not first entry
 
// Add space if this is not first entry
-->{{#ifexpr:{{#arraysearch:$season|@season@}}>0|&#32;}}<!--
+
-->{{#ifexpr:{{#arraysearch:$sseason|@season@}}>0|&#32;}}<!--
  
 
// Convert @season@ (english page name) into translated page name
 
// Convert @season@ (english page name) into translated page name
-->{{#arraydefine:$link_text|{{#arrayindex:$lang_seasons|{{#arraysearch:$engl_seasons|@season@}}}}}}<!--
+
-->{{#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)
 
// 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
 
// This is also how text_only option is handled
-->{{#ifeq:{{#arrayprint:$link_text}}|
+
-->{{#ifeq:{{#arrayprint:$slink_text}}|
 
     | {{ucfirst:@season@}}
 
     | {{ucfirst:@season@}}
 
     | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}}
 
     | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}}
         | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$link_text}}}}
+
         | {{#if:{{{no_translate|}}}|@season@|{{#arrayprint:$slink_text}}}}
 
| <!--
 
| <!--
  
Zeile 40: Zeile 40:
 
       |Seasons    = All_Seasons_Icon
 
       |Seasons    = All_Seasons_Icon
 
       |Marriage  = Mermaid's Pendant
 
       |Marriage  = Mermaid's Pendant
   }}.png | {{{width|24px}}} | link={{#arrayprint:$link_text}} | alt={{#arrayprint:$link_text}}]]&nbsp;<!--
+
   }}.png | {{{width|24px}}} | link={{#arrayprint:$slink_text}} | alt={{#arrayprint:$slink_text}}]]&nbsp;<!--
  
 
// Add link, with special treatment for text of All Seasons
 
// Add link, with special treatment for text of All Seasons
-->[[{{#arrayprint:$link_text}}|<!--
+
-->[[{{#arrayprint:$slink_text}}|<!--
 
-->{{#ifeq:@season@|Seasons
 
-->{{#ifeq:@season@|Seasons
 
       |{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}}
 
       |{{#if:{{{do_short|}}}|{{#arrayprint:$lang_allshort}}|{{#arrayprint:$lang_alllong}}}}
       |{{#arrayprint:$link_text}}}}]]<!--
+
       |{{#arrayprint:$slink_text}}}}]]<!--
 
-->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
 
-->}}}}}}</span>}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
 
{{{{FULLPAGENAME}}/doc}} }}</noinclude>
 
{{{{FULLPAGENAME}}/doc}} }}</noinclude>

Version vom 3. September 2020, 07:45 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