Difference between revisions of "Template:Updates/core"

From Team Fortress Wiki
Jump to: navigation, search
(Rewrite template and documentation to allow different displays of dates for other language pages.)
m
 
(19 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
<includeonly>{{#switch:{{{1|{{{type|}}}}}}
 
<includeonly>{{#switch:{{{1|{{{type|}}}}}}
  
| patch = [[{{lang date|force=en|1={{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}} Patch{{if lang}}|{{lang
+
| patch = [[{{lang date|force=en|1={{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}} Patch{{if lang}}|{{date fmt|1={{{patch-month}}}|2={{{patch-day}}}|3={{{patch-year}}}}}]]
  | cs = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | de = {{{patch-day}}}. {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | en = {{lang date|{{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}}
 
  | es = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | fr = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | pl = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | pt = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | pt-br = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | ro = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  | ru = {{{patch-day}}} {{lang date|{{{patch-month}}}}} {{{patch-year}}}
 
  }}]]
 
  
| patch-beta = [[Patches (Beta){{if lang}}|{{lang
+
| patch-beta = [[{{lang date|force=en|1={{{patch-beta-month}}}}} {{{patch-beta-day}}}, {{{patch-beta-year}}} Patch (Beta){{if lang}}|{{date fmt|1={{{patch-beta-month}}}|2={{{patch-beta-day}}}|3={{{patch-beta-year}}}}}]]
| cs = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| de = {{{patch-beta-day}}}. {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| en = {{lang date|1={{{patch-beta-month}}}}} {{{patch-beta-day}}}, {{{patch-beta-year}}}
 
| es = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| fr = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| pl = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| pt = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| pt-br = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| ro = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
| ru = {{{patch-beta-day}}} {{lang date|{{{patch-beta-month}}}}} {{{patch-beta-year}}}
 
}}]]
 
  
| blog = [http://www.teamfortress.com/post.php?id={{{blog-id}}} {{lang
+
| blog = [https://www.teamfortress.com/post.php?id={{{blog-id}}} {{date fmt|1={{{blog-month}}}|2={{{blog-day}}}|3={{{blog-year}}}}}]
| cs = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| de = {{{blog-day}}}. {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| en = {{lang date|{{{blog-month}}}}} {{{blog-day}}}, {{{blog-year}}}
 
| es = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| fr = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| pl = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| pt = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| pt-br = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| ro = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
| ru = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}
 
}}]
 
  
 
| patch-daysago      = {{Days ago|1={{{patch-year}}}|2={{{patch-month}}}|3={{{patch-day}}}}}
 
| patch-daysago      = {{Days ago|1={{{patch-year}}}|2={{{patch-month}}}|3={{{patch-day}}}}}
Line 47: Line 14:
 
| patch-day = {{{patch-day|}}}
 
| patch-day = {{{patch-day|}}}
 
| patch-year = {{{patch-year|}}}
 
| patch-year = {{{patch-year|}}}
 +
| patch-num = {{{patch-num|}}}
  
 
| patch-beta-month = {{{patch-beta-month|}}}
 
| patch-beta-month = {{{patch-beta-month|}}}
 
| patch-beta-day = {{{patch-beta-day|}}}
 
| patch-beta-day = {{{patch-beta-day|}}}
 
| patch-beta-year = {{{patch-beta-year|}}}
 
| patch-beta-year = {{{patch-beta-year|}}}
 +
| patch-beta-num = {{{patch-beta-num|}}}
  
 
| blog-month = {{{blog-month|}}}
 
| blog-month = {{{blog-month|}}}
Line 56: Line 25:
 
| blog-year = {{{blog-year|}}}
 
| blog-year = {{{blog-year|}}}
 
| blog-id = {{{blog-id|}}}
 
| blog-id = {{{blog-id|}}}
 +
 +
| community-title  = {{{community-title|}}}
 +
| community-article = {{{community-article|}}}
 +
| community-blog    = https://store.steampowered.com/news/app/440/view/{{{community-id}}}
 +
| community-start  = {{{community-start|}}}
 +
| community-end    = {{{community-end|}}}
  
 
| wiki-cap-recipient = {{{wiki-cap-recipient|}}}
 
| wiki-cap-recipient = {{{wiki-cap-recipient|}}}
  
| #default = <span class="error small">ERROR {{tl|Latest updates}}: type doesn't match.</span>
+
| #default = <span class="error small">ERROR {{tl|Updates/core}}: type doesn't match.</span>
  
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
{{translation switching|cs, es, de, fr, ko, hu, pl, pt, pt-br, ro, ru, sv}}
 
 
{{doc begin}}
 
{{doc begin}}
 
This template takes values from '''{{tl|Updates}}''' and displays them in different ways.  
 
This template takes values from '''{{tl|Updates}}''' and displays them in different ways.  
Line 100: Line 74:
 
| blog-year =  
 
| blog-year =  
 
| blog-id =  
 
| blog-id =  
 +
 +
| community-title =
 +
| community-article =
 +
| community-blog =
 +
| community-start =
 +
| community-end =
  
 
| wiki-cap-recipient =  
 
| wiki-cap-recipient =  
 
</pre>
 
</pre>
 +
 +
=== Translation ===
 +
* To edit date formats, see [[Template:Dictionary/common strings#patch names]].
  
 
=== See also ===
 
=== See also ===
Line 108: Line 91:
 
* {{tl|Days ago}}
 
* {{tl|Days ago}}
  
[[Category:Templates|Latest updates]]
+
[[Category:Templates|Updates/core]]
 
[[Category:Main Page]]
 
[[Category:Main Page]]
 
</noinclude>
 
</noinclude>

Latest revision as of 16:19, 15 June 2024

Documentation for Updates/core

This template takes values from {{Updates}} and displays them in different ways.

Parameters

Links

patch
Provides a lang-formatted proper link to the latest patch article.
patch-beta
Provides a lang-formatted proper link to Patches (Beta).
blog
Provides a lang-formatted proper external link to the latest blog post based on the given ID.

Days ago

patch-daysago, patch-beta-daysago, blog-daysago
Uses {{Days ago}} to render the days since the last patch / blog update (bracketed).

Raw values

The following raw values are available as they are given in {{Updates}} so they can be used anywhere.
| patch-month = 
| patch-day = 
| patch-year = 

| patch-beta-month = 
| patch-beta-day = 
| patch-beta-year = 

| blog-month = 
| blog-day = 
| blog-year = 
| blog-id = 

| community-title = 
| community-article =
| community-blog = 
| community-start = 
| community-end = 

| wiki-cap-recipient = 

Translation

See also