Difference between revisions of "Template:Updates/core"

From Team Fortress Wiki
Jump to: navigation, search
(Undo edit by EpicEric (Talk) (184998) Looks like an error in this template is what broke the patch template)
m
 
(30 intermediate revisions by 15 users not shown)
Line 1: Line 1:
 
<includeonly>{{#switch:{{{1|{{{type|}}}}}}
 
<includeonly>{{#switch:{{{1|{{{type|}}}}}}
| patch = {{#switch:{{SUBPAGENAME}}<!--
 
  
//
+
| 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}}}}}]]
// PATCHES
 
//
 
  
  // dd mm yyyy -- "Date Month Year" (without comma) DATE FORMATTING -->
+
| 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
 
  | es
 
  | de
 
  | fr
 
  | pl
 
  | ro
 
  | ru = [[{{lang date|force=en|1={{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}} Patch{{if lang}}|<!--
 
            -->{{{patch-day}}} {{lang date|1={{{patch-month}}}}} {{{patch-year}}}]]<!--
 
  
  // mm dd, yyyy -- "Month Date, Year" (with comma) DATE FORMATTING <default> -->
+
| blog = [https://www.teamfortress.com/post.php?id={{{blog-id}}} {{date fmt|1={{{blog-month}}}|2={{{blog-day}}}|3={{{blog-year}}}}}]
  | blank
 
  | none
 
  | en
 
  | #default = [[{{lang date|force=en|1={{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}} Patch{{if lang}}|<!--
 
            -->{{lang date|1={{{patch-month}}}}} {{{patch-day}}}, {{{patch-year}}}]]
 
  }}
 
  
| blog = [http://www.teamfortress.com/post.php?id={{{blog-id}}} {{#switch:{{SUBPAGENAME}}<!--
+
| patch-daysago      = {{Days ago|1={{{patch-year}}}|2={{{patch-month}}}|3={{{patch-day}}}}}
 +
| patch-beta-daysago = {{Days ago|1={{{patch-beta-year}}}|2={{{patch-beta-month}}}|3={{{patch-beta-day}}}}}
 +
| blog-daysago      = {{Days ago|1={{{blog-year}}}|2={{{blog-month}}}|3={{{blog-day}}}}}
  
//
+
| patch-month = {{{patch-month|}}}
// BLOG
+
| patch-day = {{{patch-day|}}}
//
+
| patch-year = {{{patch-year|}}}
 +
| patch-num = {{{patch-num|}}}
  
  // dd mm yyyy -- "Date Month Year" (without comma) DATE FORMATTING -->
+
| patch-beta-month = {{{patch-beta-month|}}}
  | cs
+
| patch-beta-day = {{{patch-beta-day|}}}
  | es
+
| patch-beta-year = {{{patch-beta-year|}}}
  | de
+
| patch-beta-num = {{{patch-beta-num|}}}
  | fr
 
  | pl
 
  | ro
 
  | ru = {{{blog-day}}} {{lang date|1={{{blog-month}}}}} {{{blog-year}}}<!--
 
  
  // mm dd, yyyy -- "Month Date, Year" (with comma) DATE FORMATTING <default> -->
+
| blog-month = {{{blog-month|}}}
  | blank
+
| blog-day = {{{blog-day|}}}
  | none
+
| blog-year = {{{blog-year|}}}
  | en
+
| blog-id = {{{blog-id|}}}
  | #default = {{lang date|{{{blog-month}}}}} {{{blog-day}}}, {{{blog-year}}}
 
  }}]<!--
 
  
//  
+
| community-title  = {{{community-title|}}}
// DAYS AGO
+
| 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|}}}
| patch-daysago = {{Days ago|1={{{patch-month}}}|2={{{patch-day}}}}}
 
| blog-daysago  = {{Days ago|1={{{blog-month}}}|2={{{blog-day}}}}}<!--
 
  
//  
+
| #default = <span class="error small">ERROR {{tl|Updates/core}}: type doesn't match.</span>
// LOCALIZED TEXT
 
//
 
  
-->
+
}}</includeonly><noinclude>
| patch-text = {{lang
+
{{doc begin}}
  | cs = Nejnovější [[Patches/cs|patch]] byl vydán
+
This template takes values from '''{{tl|Updates}}''' and displays them in different ways.
  | de = Das letzte [[Patches/de|Update]] war am
+
 
  | en = The latest [[Patches|patch]] was on
+
=== Parameters ===
  | ko = 가장 최근의 [[Patches|패치]]는
+
'''Links'''
  | es = La última [[Patches/es|actualización]] fue el
+
 
  | fr = Le dernier [[Patches/fr|patch]] date du
+
:; ''patch''
  | hu = A legutóbbi [[Patches|patch]] megjelenési napja
+
:: Provides a lang-formatted proper link to the latest patch article.
  | pl = Najnowszy [[Patches/pl|patch]] został wydany
 
  | ro = Ultimul [[Patches/ro|patch]] a fost pe
 
  | ru = Последнее [[Patches/ru|обновление]] игры было
 
  }}
 
  
| blog-text = {{lang
+
:; ''patch-beta''
  | cs = [[TF2 Official Blog/cs|Oficiální TF2 blog]] byl naposled aktualizován
+
:: Provides a lang-formatted proper link to [[Patches (Beta)]].
  | de = Das letzte Update des [[TF2 Official Blog/de|TF2 Blog]]s war am
 
  | en = The [[TF2 Official Blog|blog]] was last updated on
 
  | ko = 가장 최근의 [[TF2 Official Blog|TF2 공식 블로그]] 글은
 
  | es = El último mensaje en el [[TF2 Official Blog/es|Blog Oficial de TF2]] fue el
 
  | fr = Le [[TF2 Official Blog/fr|blog]] a été mis à jour le
 
  | hu = A [[TF2 Official Blog/hu|blog]] legutóbbi bejegyzésének megjelenési napja
 
  | pl = [[TF2 Official Blog/pl|Oficjalny blog TF2]] ostatnio zaktualizowano
 
  | ro = [[TF2 Official Blog/ro|Blogul]] a fost ultima oară actualizat pe
 
  | ru = Последнее обновление [[TF2 Official Blog/ru|блога]] было
 
  }}
 
  
| #default = <span class="error small">{{#ifeq:{{BASEPAGENAME}}|Main Page|<span style="color:#000;">''This Main Page requires updating to the [[Template:Main Page layout|new design]].''</span>|ERROR &#123;&#123;[[Template:latest updates|latest updates]]&#125;&#125; failure: no type specified.}}</span>
+
:; ''blog''
 +
:: Provides a lang-formatted proper external link to the latest blog post based on the given ID.
  
}}</includeonly><noinclude>
+
'''Days ago'''
{{Translation switching|cs, es, de, fr, ko, hu, pl, ro, ru}}
+
 
* Generates patch & blog update links and text plainly based on the parameter {{code|type}} (or the first unnamed parameter).  
+
:; ''patch-daysago'', ''patch-beta-daysago'', ''blog-daysago''
* To update dates of blog updates & patches, '''see [[Template:Updates]]'''.
+
:: Uses {{tl|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 {{tl|Updates}} so they can be used anywhere.
  
== Usage ==
+
<pre>
* Date input parameters:
 
<pre><nowiki>
 
 
| patch-month =  
 
| patch-month =  
| patch-day   =  
+
| patch-day =  
| patch-year =  
+
| patch-year =
| blog-month =  
+
 
| blog-day   =  
+
| patch-beta-month =  
| blog-year   =  
+
| patch-beta-day =
| blog-id     =  
+
| patch-beta-year =
</nowiki></pre>
+
 
* Formatting type parameters: {{code|1=type=}}
+
| blog-month =  
** {{code|patch}} for a language link to the patch article for that date.
+
| blog-day =  
** {{code|blog}} for a link to the blog post (specified by {{code|blog-id}}).
+
| blog-year =  
** {{code|patch-daysago}} and {{code|blog-daysago}} for processing of date input parameters into {{tl|Days ago}}.
+
| blog-id =  
* Localized text parameters:
+
 
** {{code|patch-text}} for a localized version of "The latest [[Patches|patch]] was on" (language link)
+
| community-title =  
** {{code|blog-text}} for a localized version of "The [[TF2 Official Blog|blog]] was last updated on" (language link)
+
| community-article =
 +
| community-blog =
 +
| community-start =
 +
| community-end =
 +
 
 +
| wiki-cap-recipient =
 +
</pre>
 +
 
 +
=== Translation ===
 +
* To edit date formats, see [[Template:Dictionary/common strings#patch names]].
 +
 
 +
=== See also ===
 +
* {{tl|Updates}}
 +
* {{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