"틀:Season"의 두 판 사이의 차이

Stardew Valley Wiki
둘러보기로 가기 검색하러 가기
(sync with english template)
1번째 줄: 1번째 줄:
<includeonly><span style="display:inline; margin-right:0;">{{#switch: {{lc:{{{1}}}}}
+
<includeonly><!--
|spring|봄        = [[File:Spring.png|{{{width|24px}}}|link=봄]]&nbsp;[[봄]]
+
 
|summer|여름      = [[File:Summer.png|{{{width|24px}}}|link=여름]]&nbsp;[[여름]]
+
// Define the allowed values, with handling for various quirks/oddities.
|fall|autumn|가을  = [[File:Fall.png|{{{width|24px}}}|link=가을]]&nbsp;[[가을]]
+
//  First column=icon name -> same in all languages
|winter|겨울      = [[File:Winter.png|{{{width|24px}}}|link=겨울]]&nbsp;[[겨울]]
+
//  Second column=link (wiki page) name, generally same as displayed text -> needs translation
|marriage|결혼    = [[File:Mermaid's Pendant.png|{{{width|24px}}}|link=결혼]]&nbsp;[[결혼]]
+
//  All other values are synonyms
|deviations|일탈  = 일탈
+
// Marriage, Deviations are for sake of NPC schedule sections (and translations)
|all|any|모든|어떤 = [[File:All Seasons Icon.png|{{{width|24px}}}|link=계절]]&nbsp;[[계절|모든 계절]]
+
// For 'All Seasons' case, display text doesn't match icon or wiki-link, so
|#default={{{1|}}} }}</span></includeonly><noinclude>{{Englishdoc}}</noinclude>
+
// define default display text in $lang_allseasons, with parameter allowing any other preferred value
 +
-->{{ParseInputValues|code=season||
 +
,All Seasons Icon,  계절, Seasons,  All, All Seasons, Any, Always, Any Season, 모든, 어떤, 모든 계절,
 +
,Spring,            봄,
 +
,Summer,            여름,
 +
,Fall,              가을, Autumn, 
 +
,Winter,            겨울,
 +
,Mermaid's Pendant, 결혼, Marriage,
 +
,Deviations,        일탈,
 +
}}{{#arraydefine:$lang_allseasons | 모든}}<!--
 +
 
 +
// 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:$sseason|{{ParseInputValues|{{{1|}}}|code=season|default=true}}}}<!--
 +
-->{{#arrayprint:$sseason||@season@|<!--
 +
 
 +
// Convert @season@ (icon name) into translated page name
 +
-->{{#arraydefine:$slink_text|{{ParseInputValues|code=season|@season@|translate=true}}}}<!--
 +
 
 +
// On first entry, add sort-key if requested. On other entries, add space and bullet.
 +
-->{{#ifexpr:{{#arraysearch:$sseason|@season@}}>0
 +
    |&#32;•&#32;
 +
    |{{#if:{{{sortkey|}}}|
 +
        <span class="sortkey" style="display:none;">{{#if:{{#arrayprint:$slink_text}}
 +
  |{{#expr:{{ParseInputValues|code=season|@season@|translate=index}}+1}}
 +
  |0}}</span>
 +
  }}}}<span style="display:inline; margin-right:0; white-space: nowrap"><!--
 +
 
 +
// Display the non-icon, non-linkable cases: Deviations, and unmatched text (detected by empty link_text)
 +
// This is also where text_only option is handled
 +
-->{{#ifeq:{{#arrayprint:$slink_text}}|
 +
    | {{ucfirst:@season@}}
 +
    | {{#ifexpr: {{#ifeq:@season@|Deviations|1|0}} or {{#if:{{{text_only|}}}|1|0}}
 +
        | {{#if:{{{no_translate|}}}
 +
    |{{#ifeq:@season@|All Seasons Icon|All|@season@}}
 +
    |{{#ifeq:@season@|All Seasons Icon|{{#arrayprint:$lang_allseasons}}|{{#arrayprint:$slink_text}}}}}}
 +
|<!--
 +
 
 +
// Display the normal cases: first display icon
 +
-->[[File:@season@.png|
 +
    {{#if:{{{size|}}}|{{{size}}}px|{{{width|24px}}}}} | link={{#arrayprint:$slink_text}} | alt=]]&nbsp;<!--
 +
// Add day if provided
 +
-->{{#if:{{{2|}}}|{{{2}}}&nbsp;}}<!--
 +
 
 +
// Add link, with special treatment for text of All Seasons
 +
-->[[{{#arrayprint:$slink_text}}|<!--
 +
-->{{#ifeq:@season@|All Seasons Icon
 +
      |{{#if:{{{all|}}}|{{{all|}}}|{{#arrayprint:$lang_allseasons}}}}
 +
      |{{#arrayprint:$slink_text}}}}]]<!--
 +
-->}}}}</span>}}}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
 +
{{{{FULLPAGENAME}}/doc}} }}</noinclude>

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

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

용도

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

{{Season}}

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

    24px | link=틀:ParseInputValues | alt=]] [[틀:ParseInputValues|틀:ParseInputValues]]