Difference between revisions of "Template:Patch name/sandbox"
GrampaSwood (talk | contribs) (Test) |
m |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq: {{{sort|}}} | yes |<span style="display:none">{{#time:Y-m-d|{{{3|}}}-{{{1|}}}-{{{2|}}}}}</span>}}{{#ifeq: {{{date-only|}}} | yes | {{dictionary/common strings/date-fmt|2={{{1|}}}|3={{{2|}}}|4={{{3|}}}}} | <includeonly>{{#ifeq: {{{sort|}}} | yes |<span style="display:none">{{#time:Y-m-d|{{{3|}}}-{{{1|}}}-{{{2|}}}}}</span>}}{{#ifeq: {{{date-only|}}} | yes | {{dictionary/common strings/date-fmt|2={{{1|}}}|3={{{2|}}}|4={{{3|}}}}} | ||
|{{#ifeq: {{{no-link|}}} | yes | |{{#ifeq: {{{no-link|}}} | yes | ||
− | | {{dictionary/common strings/patch-{{{4|default}}}-fmt|1={{{1|07}}}|2={{{2|13}}}|3={{{3|2012}}}|{{#if:{{{lang|}}}|lang|null}}={{{lang|{{{force|}}}}}}}} | + | | {{dictionary/common strings/patch-{{#if:{{{num|}}}|num|{{{4|default}}}}}-fmt|1={{{1|07}}}|2={{{2|13}}}|3={{{3|2012}}}|4={{{num|}}}|{{#if:{{{lang|}}}|lang|null}}={{{lang|{{{force|}}}}}}}}{{#if:{{{major|}}}| {{parenthesis|{{update name|{{{major}}}}}}}|}} |
− | + | | [[{{{link|{{lang date|force=en|1={{{1}}}}} {{{2}}}, {{{3}}} Patch{{#if: {{{4|}}}|{{dictionary/common strings/patch-suffix|{{{4}}}}}}}{{if lang}}}}}|{{dictionary/common strings/patch-{{#ifeq: {{{date|}}}|true|date-}}{{#if:{{{num|}}}|num|{{{4|default}}}}}-fmt|1={{{1|07}}}|2={{{2|13}}}|3={{{3|2012}}}|4={{{num|}}}|{{#if:{{{lang|}}}|lang|null}}={{{lang|{{{force|}}}}}}}}]]{{#if:{{{major|}}}| {{parenthesis|{{update link|{{{major}}}}}}}|}} | |
− | + | }}}}</includeonly><noinclude> | |
{{Complex template}} | {{Complex template}} | ||
− | + | {{translation switching|en, ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant}} | |
{{doc begin}} | {{doc begin}} | ||
Dates should be inputted in MM-DD-YYYY format with no leading zeros (e.g. {{tlx|patch name|month|day|year}}). To edit the date formatting and month names for each language, see '''{{tl|dictionary/common strings}}'''. | Dates should be inputted in MM-DD-YYYY format with no leading zeros (e.g. {{tlx|patch name|month|day|year}}). To edit the date formatting and month names for each language, see '''{{tl|dictionary/common strings}}'''. | ||
=== Usage === | === Usage === | ||
− | * {{tlx|patch name|04|15|2011}} (where {{code|04}} is the month of April, {{code|15}} is the day and {{code|2011}} the year) produces: {{patch name|04|15|2011}} | + | * {{tlx|patch name|04|15|2011}} (where {{code|04}} is the month of April, {{code|15}} is the day and {{code|2011}} the year) produces: {{patch name/sandbox|04|15|2011}} |
− | * {{tlx|patch name|04|15|2011}} on [[Page/pt-br]] would produce: {{patch name|04|15|2011|lang=pt-br}} | + | * {{tlx|patch name|04|15|2011}} on [[Page/pt-br]] would produce: {{patch name/sandbox|04|15|2011|lang=pt-br}} |
− | * {{tlx|patch name|04|15|2011|5=no-link=yes}} produces: {{patch name|04|15|2011|no-link=yes}} | + | * {{tlx|patch name|04|15|2011|5=no-link=yes}} produces: {{patch name/sandbox|04|15|2011|no-link=yes}} |
− | * {{tlx|patch name|04|15|2011|5=link=Test}} produces: {{patch name|04|15|2011|link=Test}} | + | * {{tlx|patch name|04|15|2011|5=link=Test}} produces: {{patch name/sandbox|04|15|2011|link=Test}} |
− | * {{tlx|patch name|04|15|2011|5=date=true}} produces: {{patch name|04|15|2011|date=true}} (link label contains the date only) | + | * {{tlx|patch name|04|15|2011|5=date=true}} produces: {{patch name/sandbox|04|15|2011|date=true}} (link label contains the date only) |
− | * {{tlx|patch name|04|15|2011|5=date-only=yes}} produces: {{patch name|04|15|2011|date-only=yes}} (no links to patches and label only contains the date. Useful for events not associated with patches) | + | * {{tlx|patch name|04|15|2011|5=date-only=yes}} produces: {{patch name/sandbox|04|15|2011|date-only=yes}} (no links to patches and label only contains the date. Useful for events not associated with patches) |
+ | * {{tlx|patch name|04|15|2011|5=num=2}} produces: {{patch name/sandbox|04|15|2011|num=2}} (indicates it is the ''second'' or ''n'' patch of the day) | ||
+ | * {{tlx|patch name|04|15|2011|5=num=2|6=date=true}} produces: {{patch name/sandbox|04|15|2011|num=2|date=true}} (date and number only) | ||
* {{tlx|patch name|04|15|2011|5=sort=yes}} will add an invisible string ''2011-04-15'' at the start of the result. This can be useful in sortable tables | * {{tlx|patch name|04|15|2011|5=sort=yes}} will add an invisible string ''2011-04-15'' at the start of the result. This can be useful in sortable tables | ||
− | * {{tlx|patch name|April|15|2011}} produces: {{patch name|April|15|2011}} ('''English''' month names work) | + | * {{tlx|patch name|April|15|2011}} produces: {{patch name/sandbox|April|15|2011}} ('''English''' month names work) |
− | * {{tlx|patch name|4|15|2011}} produces: {{patch name|4|15|2011}} ('''Single-digit''' month numbers work) | + | * {{tlx|patch name|4|15|2011}} produces: {{patch name/sandbox|4|15|2011}} ('''Single-digit''' month numbers work) |
− | * {{tlx|patch name|04|15|2011|in-the}} produces: {{patch name|4|15|2011|in-the}} ( | + | * {{tlx|patch name|04|15|2011|in-the}} produces: {{patch name|4|15|2011|in-the}} (No difference in English, but useful in languages for which the wording is different in sentences of the type "In the '''April 15th Patch''', something happened".) |
− | You can also indicate if patch is beta: | + | You can also indicate if patch is a named patch: |
− | * {{tlx|patch name|11|18|2011|beta}} produces: {{patch name|11|18|2011|beta}} | + | * {{tlx|patch name|10|20|2017|5=major=Jungle Inferno Update}} produces: {{patch name/sandbox|10|20|2017|major=Jungle Inferno Update}} |
− | * {{tlx|patch name|11|18|2011|5=beta|6=no-link=yes}} produces: {{patch name|11|18|2011|beta|no-link=yes}} | + | * {{tlx|patch name|10|20|2017|5=major=Jungle Inferno Update|6=no-link=yes}} produces: {{patch name/sandbox|10|20|2017|major=Jungle Inferno Update|no-link=yes}} |
+ | * {{tlx|patch name|10|20|2017|5=major=Jungle Inferno Update|6=num=1}} produces: {{patch name/sandbox|10|20|2017|major=Jungle Inferno Update|num=1}} | ||
+ | * {{tlx|patch name|10|20|2017|5=major=Jungle Inferno Update|6=num=2}} produces: {{patch name/sandbox|10|20|2017|major=Jungle Inferno Update|num=2}} | ||
+ | ** '''Note''': in this case, the second patch is a hotfix, not ''<u>the</u>'' major patch. You should probably use {{tlx|patch name|10|20|2017|5=num=2}} instead (produces {{patch name/sandbox|10|20|2017|num=2}}). | ||
+ | Or a beta patch: | ||
+ | * {{tlx|patch name|11|18|2011|beta}} produces: {{patch name/sandbox|11|18|2011|beta}} | ||
+ | * {{tlx|patch name|11|18|2011|5=beta|6=no-link=yes}} produces: {{patch name/sandbox|11|18|2011|beta|no-link=yes}} | ||
Or a Xbox patch: | Or a Xbox patch: | ||
− | * {{tlx|patch name|07|21|2009|xbox}} produces: {{patch name|07|21|2009|xbox}} | + | * {{tlx|patch name|07|21|2009|xbox}} produces: {{patch name/sandbox|07|21|2009|xbox}} |
− | * {{tlx|patch name|07|21|2009|5=xbox|6=no-link=yes}} produces: {{patch name|07|21|2009|xbox|no-link=yes}} | + | * {{tlx|patch name|07|21|2009|5=xbox|6=no-link=yes}} produces: {{patch name/sandbox|07|21|2009|xbox|no-link=yes}} |
Or a Classic patch: | Or a Classic patch: | ||
− | * {{tlx|patch name|03|23|2004|classic}} produces: {{patch name|03|23|2004|classic}} | + | * {{tlx|patch name|03|23|2004|classic}} produces: {{patch name/sandbox|03|23|2004|classic}} |
− | * {{tlx|patch name|03|23|2004|5=classic|6=no-link=yes}} produces: {{patch name|03|23|2004|classic|no-link=yes}} | + | * {{tlx|patch name|03|23|2004|5=classic|6=no-link=yes}} produces: {{patch name/sandbox|03|23|2004|classic|no-link=yes}} |
− | [[ | + | [[Category:Templates|Patch name]] |
</noinclude> | </noinclude> |
Latest revision as of 21:56, 21 August 2024
This template is very complex. If you have questions about this template, feel free to ask on the IRC. |
This template uses translation switching. The correct language will be displayed automatically. Localized versions of this template (e.g. Template:Patch name/sandbox/ru) are not necessary. Add your translations directly to this template by editing it. Supported languages for this template: en, ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant (add) |
Documentation for Patch name/sandbox
Dates should be inputted in MM-DD-YYYY format with no leading zeros (e.g. {{patch name|month|day|year}}
). To edit the date formatting and month names for each language, see {{dictionary/common strings}}
.
Usage
{{patch name|04|15|2011}}
(where04
is the month of April,15
is the day and2011
the year) produces: April 15, 2011 Patch{{patch name|04|15|2011}}
on Page/pt-br would produce: Atualização de 15 de April de 2011{{patch name|04|15|2011|no-link=yes}}
produces: April 15, 2011 Patch{{patch name|04|15|2011|link=Test}}
produces: April 15, 2011 Patch{{patch name|04|15|2011|date=true}}
produces: April 15, 2011 (link label contains the date only){{patch name|04|15|2011|date-only=yes}}
produces: April 15, 2011 (no links to patches and label only contains the date. Useful for events not associated with patches){{patch name|04|15|2011|num=2}}
produces: April 15, 2011 Patch 2 (indicates it is the second or n patch of the day){{patch name|04|15|2011|num=2|date=true}}
produces: April 15, 2011 (#2) (date and number only){{patch name|04|15|2011|sort=yes}}
will add an invisible string 2011-04-15 at the start of the result. This can be useful in sortable tables{{patch name|April|15|2011}}
produces: April 15, 2011 Patch (English month names work){{patch name|4|15|2011}}
produces: April 15, 2011 Patch (Single-digit month numbers work){{patch name|04|15|2011|in-the}}
produces: April 15, 2011 Patch (No difference in English, but useful in languages for which the wording is different in sentences of the type "In the April 15th Patch, something happened".)
You can also indicate if patch is a named patch:
{{patch name|10|20|2017|major=Jungle Inferno Update}}
produces: October 20, 2017 Patch (Jungle Inferno Update){{patch name|10|20|2017|major=Jungle Inferno Update|no-link=yes}}
produces: October 20, 2017 Patch (Jungle Inferno Update){{patch name|10|20|2017|major=Jungle Inferno Update|num=1}}
produces: October 20, 2017 Patch 1 (Jungle Inferno Update){{patch name|10|20|2017|major=Jungle Inferno Update|num=2}}
produces: October 20, 2017 Patch 2 (Jungle Inferno Update)- Note: in this case, the second patch is a hotfix, not the major patch. You should probably use
{{patch name|10|20|2017|num=2}}
instead (produces October 20, 2017 Patch 2).
- Note: in this case, the second patch is a hotfix, not the major patch. You should probably use
Or a beta patch:
{{patch name|11|18|2011|beta}}
produces: November 18, 2011 Patch (Beta){{patch name|11|18|2011|beta|no-link=yes}}
produces: November 18, 2011 Patch (Beta)
Or a Xbox patch:
{{patch name|07|21|2009|xbox}}
produces: July 21, 2009 Patch (Xbox){{patch name|07|21|2009|xbox|no-link=yes}}
produces: July 21, 2009 Patch (Xbox)
Or a Classic patch:
{{patch name|03|23|2004|classic}}
produces: March 23, 2004 Patch (Classic){{patch name|03|23|2004|classic|no-link=yes}}
produces: March 23, 2004 Patch (Classic)