打开/关闭菜单
331
1.7K
131
11.8K
星露谷物语扩展百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:Weather inline:修订间差异

来自星露谷物语扩展百科
Margotbean留言 | 贡献
无编辑摘要
Margotbean留言 | 贡献
update
第1行: 第1行:
<includeonly><!--
<includeonly><span style="display:inline; margin-right:0; white-space: nowrap;">{{#switch: {{lc:{{{1}}}}}
// Define the list of recognized weather names
|all|any|任何|任意 = [[天气|任何]]
//  First column=icon name -> same in all languages
|sun|晴天|= [[File:Sunny.png|{{{width|16px}}}|link=]]&nbsp;[[天气|晴天]]
//  Second column=displayed text -> needs translation
|springwind = [[File:Pollen spring.png|{{{width|16px}}}|link=]]&nbsp;[[天气|风]]
//  All other values are synonyms
|rain||雨天 = [[File:Rain.png|{{{width|16px}}}|link=]]&nbsp;[[天气|雨天]]
-->{{ParseInputValues|code=weather||
|festival|节日 = [[File:Festival.png|{{{width|16px}}}|link=]]&nbsp;[[节日]]
,Any,          任何, All,  Always, 任意,
|fallwind = [[File:Pollen fall.png|{{{width|16px}}}|link=]]&nbsp;[[天气|风]]
,Sunny,        晴天, Sun,  晴,     
|storm|暴风雨|风暴 = [[File:Thunderstorm.png|{{{width|16px}}}|link=]]&nbsp;[[天气|暴风雨]]
,Pollen fall,  风, Wind,  Pollen, Polleny, Windy, 花粉, 落叶, 刮风, Fallwind,
|snow|下雪|雪天 = [[File:Snow.png|{{{width|16px}}}|link=]]&nbsp;[[天气|下雪]]
,Pollen spring, 风,  Wind,  Springwind,
|#default = {{ucfirst:{{{1|}}} }}
,Rain,          雨天, Rainy, 雨,     
}}</span></includeonly><noinclude>{{Englishdoc}}</noinclude>
,Thunderstorm,  风暴, Storm, Stormy, 暴风雨,   
,Snow,          下雪, Snowy, 雪天,
,Festival,      节日
}}<!--
// The name of the weather wiki page
-->{{#arraydefine:$lang_weatherlink|天气}}<!--
 
// 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}}}}<!--
 
// Wrap a sort-key span around all items if requested. On other entries, add {{{space}}} or bullet.
-->{{#ifexpr:{{#arraysearch:$wweather|@weather@}}>0
    |{{{space|&#32;•&#32;}}}
    |{{#ifexpr:{{#if:{{{sortkey|}}}|1|0}} or {{#ifeq:{{{sortkey}}}||1|0}}
        |<span data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true
          |{{#expr:{{#if:{{#arrayprint:$wlink_text}}
            |({{ParseInputValues|code=weather|@weather@|translate=index}}+1)
    |0}}}}
          |{{{sortkey|}}}}}}}">
  }}}}<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>}}<!--
-->{{#ifexpr:{{#if:{{{sortkey|}}}|1|0}} or {{#ifeq:{{{sortkey}}}||1|0}}|</span>}}
}}</includeonly><noinclude>{{Englishdoc}}</noinclude>

2022年5月27日 (五) 02:24的版本