"틀:Weather inline"의 두 판 사이의 차이

Stardew Valley Wiki
둘러보기로 가기 검색하러 가기
(더 자주 쓰는 단어로 바꿈)
(sync with english template)
1번째 줄: 1번째 줄:
<includeonly>{{#switch: {{lc:{{{1|}}}}}
+
<includeonly><!--
| sunny | sun | 맑음 = [[File:Sunny.png|link=]]&nbsp;[[날씨|맑음]]
+
// Define the list of recognized weather names
| rainy | rain | = [[File:Rain.png|link=]]&nbsp;[[날씨|비]]
+
//  First column=icon name -> same in all languages
| polleny | pollen | wind | windy | 바람 = [[File:Pollen_fall.png|link=]]&nbsp;[[날씨|바람]]
+
//  Second column=displayed text -> needs translation
| springwind = [[File:Pollen spring.png|link=]]&nbsp;[[날씨|바람]]
+
//  All other values are synonyms
| stormy | storm | 폭풍우 = [[File:Thunderstorm.png|link=]]&nbsp;[[날씨|폭풍우]]
+
-->{{ParseInputValues|code=weather||
| snowy | snow | = [[File:Snow.png|link=]]&nbsp;[[날씨|]]
+
,Any,          어떤, All,  Always,  모든, 항상,
| #default = <span style="color:red">WEATHER TEMPLATE ERROR</span>}}</includeonly><noinclude>{{Englishdoc}}</noinclude>
+
,Sunny,        맑음,    Sun, 
 +
,Pollen fall,  바람,    Wind,  Pollen,    Polleny, Windy,
 +
,Pollen spring, 바람,    Wind,  Springwind,
 +
,Rain,          비,    Rainy,
 +
,Thunderstorm,  폭풍우,  Storm, Stormy,   
 +
,Snow,          눈,    Snowy,
 +
}}<!--
 +
// 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}}}}<!--
 +
 
 +
// 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>

2020년 10월 3일 (토) 14:37 판

이 틀 대한 자세한 내용은 영어 설명서 페이지를 참조하십시오.

용도

이 틀은 관련된 페이지에 다음과 같이 입력하여 사용할 수 있습니다:

{{Weather inline}}

결과... 틀:ParseInputValues[[File:틀:ParseInputValues.png|

      | link=날씨| alt=]] [[날씨|틀:ParseInputValues]]