Шаблон:Season: различия между версиями

Материал из Stardew Valley Wiki
Перейти к навигации Перейти к поиску
м (sync with english template)
 
(не показаны 3 промежуточные версии 2 участников)
Строка 1: Строка 1:
<includeonly><!--
+
<includeonly><span style="display:inline; margin-right:0;">{{#switch: {{lc:{{{1}}}}}
 
+
|1|01|spring|[[spring]]|весна|[[весна]] = [[File:Spring.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}|&thinsp;{{{2|}}}}}&nbsp;[[Весна]]
// Define the allowed values, with handling for various quirks/oddities.
+
|2|02|summer|[[summer]]|лето|[[лето]] = [[File:Summer.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}|&thinsp;{{{2|}}}}}&nbsp;[[Лето]]
//  First column=icon name -> same in all languages
+
|3|03|fall|autumn|[[fall]]|[[autumn]]|осень|[[осень]] = [[File:Fall.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}|&thinsp;{{{2|}}}}}&nbsp;[[Осень]]
//  Second column=link (wiki page) name, generally same as displayed text -> needs translation
+
|4|04|winter|[[winter]]|зима|[[зима]] = [[File:Winter.png|{{{width|24px}}}|link=]]{{#if:{{{2|}}}|&thinsp;{{{2|}}}}}&nbsp;[[Зима]]
//  All other values are synonyms
+
|marriage|[[marriage]]|брак|[[брак]] = [[File:Mermaid's Pendant.png|{{{width|24px}}}|link=]]&nbsp;[[Брак]]
// Marriage, Deviations are for sake of NPC schedule sections (and translations)
+
|deviations|отклонения = Отклонения
// For 'All Seasons' case, display text doesn't match icon or wiki-link, so
+
|5|05|all|any|времена года|круглый год|любое|любая|все|любой|любой сезон|все сезоны = [[File:All Seasons Icon.png|{{{width|24px}}}|link=]]&nbsp;[[Времена года|Все сезоны]]
// define default display text in $lang_allseasons, with parameter allowing any other preferred value
+
|#default = {{ucfirst:{{{1|}}} }} }}</span></includeonly><noinclude>{{Englishdoc}}</noinclude>
-->{{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;">{{#expr:
 
          {{#if:{{#arrayprint:$slink_text}}
 
            |({{ParseInputValues|code=season|@season@|translate=index}}+1)*100
 
    |0}}
 
          {{#iferror:{{#expr:{{{2|0}}}>0}}|| + {{{2|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>
 

Текущая версия на 17:48, 11 мая 2022

Для получения подробной информации о данном шаблоне обратитесь к документации на английском языке.

Применение

Этот шаблон можно использовать путем ввода следующего на соответствующей странице:

{{Season}}

Результаты в ...