Terraria Wiki
Terraria Wiki
mAucun résumé des modifications
m (test)
Ligne 1 : Ligne 1 :
<includeonly><!--
+
<!--
   
 
//localization info in [[template:potionlength/l10n]].(autoload)
 
//localization info in [[template:potionlength/l10n]].(autoload)
Ligne 47 : Ligne 47 :
 
-->{{#vardefine:potl_n|{{#len:{{#var:potl_dsk}}{{#var:potl_cns|{{#var:potl_old}}}}{{#var:potl_mbl}}{{#var:potl_3ds}}}}}}<!-- console and old-gen count as one because they have the same text
 
-->{{#vardefine:potl_n|{{#len:{{#var:potl_dsk}}{{#var:potl_cns|{{#var:potl_old}}}}{{#var:potl_mbl}}{{#var:potl_3ds}}}}}}<!-- console and old-gen count as one because they have the same text
 
-->{{#vardefine:potl_ntot|{{#var:potl_n}}}}<!--
 
-->{{#vardefine:potl_ntot|{{#var:potl_n}}}}<!--
  +
   
 
// output
 
// output
-->{{l10n/long|potionlength|maintext|$duration$={{{1|{{red|{{l10n|potionlength|error|$template_link$={{tl|potionlength}}}}}}}}}|$ways$=<!--
+
-->{{l10n|potionlength|maintext|$duration$={{{1|{{red|{{l10n|potionlength|error|$template_link$={{tl|potionlength}}}}}}}}}}}<!--
-->{{#if:{{#var:potl_dsk}}|<!--
 
-->{{l10n|potionlength|dsk}}<!--
 
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{l10n|potionlength|paren|$icons$={{icon/desktop}}}}}}<!-- only display icon if this is not the only version
 
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
 
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas (sep1); sep2 is the separator in front of last item
 
-->{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
 
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
-->}}<!--
 
   
-->{{#if:{{#var:potl_cns|{{#var:potl_old}}}}|<!--
+
-->{{#if:{{#var:potl_dsk}}|<!--
-->{{l10n|potionlength|cns}}<!--
+
-->{{l10n|potionlength|dsk}}<!--
-->{{#ifexpr:{{#var:potl_ntot}}>1|<!-- only display icon(s) if this is not the only version
+
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/desktop}})}}<!-- only display icon if this is not the only version
 
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
-->{{l10n|potionlength|paren|$icons$=<!--
 
 
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas (sep1); sep2 is the separator in front of last item
-->{{#if:{{#var:potl_cns}}|{{icon/console}}}}<!--
 
-->{{#ifeq:{{#var:potl_cns}}{{#var:potl_old}}|yy|&thinsp;}}<!--
+
-->&#32;{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
-->{{#if:{{#var:potl_old}}|{{icon/old-gen}}}}<!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
 
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item
 
-->{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
 
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
 
-->}}<!--
 
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
-->}}<!--
   
-->{{#if:{{#var:potl_mbl}}|<!--
+
-->{{#if:{{#var:potl_cns|{{#var:potl_old}}}}|<!--
-->{{l10n|potionlength|mbl}}<!--
+
-->{{l10n|potionlength|cns}}<!--
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{l10n|potionlength|paren|$icons$={{icon/mobile}}}}}}<!-- only display icon if this is not the only version
+
-->{{#ifexpr:{{#var:potl_ntot}}>1|<!-- only display icon(s) if this is not the only version
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
+
-->{{nbsp}}({{#if:{{#var:potl_cns}}|{{icon/console}}}}<!--
 
-->{{#ifeq:{{#var:potl_cns}}{{#var:potl_old}}|yy|&thinsp;}}<!--
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item
 
-->{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
+
-->{{#if:{{#var:potl_old}}|{{icon/old-gen}}}})<!--
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
 
-->}}<!--
 
-->}}<!--
 
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
 
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item
 
-->&#32;{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
 
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
-->}}<!--
   
-->{{#if:{{#var:potl_3ds}}|<!--
+
-->{{#if:{{#var:potl_mbl}}|<!--
-->{{l10n|potionlength|3ds}}<!--
+
-->{{l10n|potionlength|mbl}}<!--
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{l10n|potionlength|paren|$icons$={{icon/3ds}}}}}}<!-- only display icon if this is not the only version
+
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/mobile}})}}<!-- only display icon if this is not the only version
  +
-->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version
 
-->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item
 
-->&#32;{{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left
 
-->}}<!--
 
-->}}<!--
 
-->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!--
 
-->}}<!--
 
-->}}<!--
   
 
-->{{#if:{{#var:potl_3ds}}|<!--
--></includeonly><noinclude>{{i18n-ready}}{{doc}}</noinclude>
 
 
-->{{l10n|potionlength|3ds}}<!--
 
-->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/3ds}})}}<!-- only display icon if this is not the only version
 
-->}}<!--
  +
 
-->.<!--
  +
 
--><noinclude>{{i18n-ready}}{{doc}}</noinclude>

Version du 30 juillet 2020 à 00:07

 (Version Bureau)  (Version ConsoleVersion Console old-gen)  (Version Mobile)  (Version 3DS).

Ce modèle est considéré comme prêt pour i18n, signifiant qu'il est facile à régionaliser pour les différentes langues. Veuillez regarder i18n & l10n pour les modèles (en) pour en apprendre plus.
Voir Modèle:Buffduration/l10n pour la localisation de ce modèle.
Template-info Documentation La documentation ci-dessous est transcluse de Modèle:Buffduration/doc. (modifier | historique)

Use as a shortcut when adding in the buff times in the main paragraph of a buff item.

Usage

{{ buffduration | <buff duration> | eversions = no/<page name> }}

Unnamed parameter 1
Duration of the buff.
eversions
By default, the template will hide information about how to cancel a buff on certain platforms based on the platforms the buff is available on (utilizing {{eversions}} with the name of the page the template is used on). Set this parameter to no to suppress this behavior and make it display information for all versions. Set it to any page's name to cause the template to take that entity as an {{eversions}} base.
Exclusivity can be manually overridden with the version parameters described on Template:Exclusive.

Examples

Code Result Notes
{{buffduration| 5 minutes }}  (Version Bureau)  (Version ConsoleVersion Console old-gen)  (Version Mobile)  (Version 3DS). Standard behavior. This page ("Buffduration") does not have any exclusivity information, so all platforms are displayed.
{{buffduration| 5 minutes | eversions = Moon Lord }}  (Version Bureau)  (Version Console)  (Version Mobile). Specify a different page for exclusivity.
{{buffduration| 5 minutes | 3ds = no }}  (Version Bureau)  (Version ConsoleVersion Console old-gen)  (Version Mobile). Remove the information about explicitly specified platforms.
{{buffduration| 5 minutes | console = no | mobile = no }}  (Version Bureau)  (Version Console old-gen)  (Version 3DS).
{{buffduration| 5 minutes | console = no | old-gen = no | 3ds = no }}  (Version Bureau)  (Version Mobile).
{{buffduration| 5 minutes | desktop = no | console = no | old-gen = no | mobile = no }} .
{{buffduration| 5 minutes | eversions = Moon Lord | mobile = no | 3ds = yes }}  (Version Bureau)  (Version Console)  (Version 3DS). Specify a page for exclusivity and modify the eversions manually.