Diferenças entre edições de "Predefinição:Weather inline"

Fonte: Stardew Valley Wiki
Saltar para a navegação Saltar para a pesquisa
(sync with english template)
Linha 1: Linha 1:
<includeonly>{{#switch: {{lc:{{{1|}}}}}
+
<includeonly><!--
| sunny | sun | ensolarado | sol = [[File:Sunny.png]]&nbsp;[[Clima|Ensolarado]]
+
// Define the list of recognized weather names
| rainy | rain| chuvoso | chuva = [[File:Rain.png]]&nbsp;[[Clima|Chuvoso]]
+
//  First column=icon name -> same in all languages
| polleny | pollen | wind | windy | pólen | vento | ventoso = [[File:Pollen_fall.png]]&nbsp;[[Clima|Pólen]]
+
//  Second column=displayed text -> needs translation
| springwind = [[File:Pollen spring.png|link=]]&nbsp;[[Clima|Ventoso]]
+
//  All other values are synonyms
| stormy | storm | tempestuoso | tempestade = [[File:Thunderstorm.png]]&nbsp;[[Clima|Tempestade]]
+
-->{{ParseInputValues|code=weather||
| snowy | snow | nevado | neve = [[File:Snow.png]]&nbsp;[[Clima|Nevado]]
+
,Any,          Qualquer,  All,  Always, Todas, 
| #default = <span style="color:red">ERRO DE PREDEFINIÇÃO DE CLIMA</span>
+
,Sunny,        Ensolarado, Sun,  Sol,   
}}</includeonly><noinclude>{{englishdoc}}</noinclude>
+
,Pollen fall,  Pólen,      Wind,  Pollen, Polleny, Windy, Vento, Ventoso,
 +
,Pollen spring, Ventoso,    Wind,  Springwind,
 +
,Rain,          Chuvoso,    Rainy, Chuva, 
 +
,Thunderstorm,  Tempestade, Storm, Stormy, Tempestuoso,
 +
,Snow,          Nevado,    Snowy, Neve,
 +
}}<!--
 +
// The name of the weather wiki page
 +
-->{{#arraydefine:$lang_weatherlink|Tempo}}<!--
 +
 
 +
// END OF translated text
 +
 
 +
// Check whether there's already a file link in {{{1}}}... implying this is probably a recursive call.  Return immediately
 +
-->{{#if:{{#pos:{{{1|}}}|{{Bracket|2}}File}}|{{{1}}}|<!--
 +
// Parse input data, then loop over all extracted entries
 +
-->{{#arraydefine:$wweather|{{ParseInputValues|code=weather|{{{1|}}}|default=true}}}}<!--
 +
-->{{#arrayprint:$wweather||@weather@|<!--
 +
// Convert @weather@ (icon name) into displayed text
 +
-->{{#arraydefine:$wlink_text|{{ParseInputValues|code=weather|@weather@|translate=true}}}}<!--
 +
 
 +
// On first entry, add sort-key if requested. On other entries, add space and bullet.
 +
-->{{#ifexpr:{{#arraysearch:$wweather|@weather@}}>0
 +
    |&#32;•&#32;
 +
    |{{#if:{{{sortkey|}}}|
 +
        <span class="sortkey" style="display:none;">{{#if:{{#arrayprint:$wlink_text}}
 +
  |{{#expr:{{ParseInputValues|code=weather|@weather@|translate=index}}+1}}
 +
  |0}}</span>
 +
  }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!--
 +
 
 +
// Display unmatched text (detected by empty value for $wlink_text)
 +
// And also handle text_only option
 +
-->{{#ifeq:{{#arrayprint:$wlink_text}}|
 +
    | {{ucfirst:@weather@}}
 +
    | {{#if:{{{text_only|}}}
 +
        | {{#if:{{{no_translate|}}}|@weather@|{{#arrayprint:$wlink_text}}}}
 +
| <!--
 +
 
 +
// Display the normal cases: first display icon (except for Any)
 +
-->{{#ifeq:@weather@|Any||[[File:@weather@.png|
 +
      {{#if:{{{size|}}}|{{{size}}}px}} | link={{#arrayprint:$lang_weatherlink}}| alt=]]&nbsp;}}<!--
 +
 
 +
// Add link
 +
-->[[{{#arrayprint:$lang_weatherlink}}|{{#arrayprint:$wlink_text}}]]<!--
 +
-->}}}}</span>}}}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
 +
{{{{FULLPAGENAME}}/doc}} }}</noinclude>

Revisão das 03h40min de 2 de outubro de 2020

Consulte a página de documentação em inglês para obter detalhes sobre este predefinição.

Uso

Este modelo pode ser usado inserindo o seguinte em uma página relevante.

{{Weather inline}}

Resulta em... Predefinição:ParseInputValues[[File:Predefinição:ParseInputValues.png|

      | link=Tempo| alt=]] [[Tempo|Predefinição:ParseInputValues]]