Difference between revisions of "Template:Updates/core"

From Team Fortress Wiki
Jump to: navigation, search
m (Missing ])
(use {{date fmt}}, rm translation switching tag since this template no longer has any (now all in dictionary))
(24 intermediate revisions by 13 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
 
  | pt
 
  | pt-br
 
  | 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 = [http://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
 
  | pt
 
  | pt-br
 
  | 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}}}
 
  }}]<!--
 
  
//
+
| wiki-cap-recipient = {{{wiki-cap-recipient|}}}
// DAYS AGO
 
//
 
  
-->
+
| #default = <span class="error small">ERROR {{tl|Updates/core}}: type doesn't match.</span>
| patch-daysago = {{Days ago|1={{{patch-month}}}|2={{{patch-day}}}}}
 
| blog-daysago  = {{Days ago|1={{{blog-month}}}|2={{{blog-day}}}}}<!--
 
  
//
+
}}</includeonly><noinclude>
// LOCALIZED TEXT
+
{{doc begin}}
//
+
This template takes values from '''{{tl|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''
| patch-text = {{lang
+
:: Provides a lang-formatted proper external link to the latest blog post based on the given ID.
  | cs = Nejnovější [[Patches/cs|patch]] byl vydán
 
  | de = Das letzte [[Patches/de|Update]] war am
 
  | en = The latest [[Patches|patch]] was on
 
  | ko = 가장 최근의 [[Patches|패치]]는
 
  | es = La última [[Patches/es|actualización]] fue el
 
  | fr = Le dernier [[Patches/fr|patch]] date du
 
  | hu = A legutóbbi [[Patches|patch]] megjelenési napja
 
  | pl = Najnowszy [[Patches/pl|patch]] został wydany
 
  | pt = A última [[Patches/pt|atualização]] ocorreu em
 
  | pt-br = A última [[Patches/pt|atualização]] ocorreu em
 
  | ro = Ultimul [[Patches/ro|patch]] a fost pe
 
  | ru = Последнее [[Patches/ru|обновление]] игры было
 
  }}
 
  
| blog-text = {{lang
+
'''Days ago'''
  | cs = [[TF2 Official Blog/cs|Oficiální TF2 blog]] byl naposled aktualizován
 
  | 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
 
  | pt = O [[TF2 Official Blog|blog]] foi atualizado pela última vez em
 
  | pt-br = O [[TF2 Official Blog|blog]] foi atualizado pela última vez em
 
  | 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>
+
:; ''patch-daysago'', ''patch-beta-daysago'', ''blog-daysago''
 +
:: Uses {{tl|Days ago}} to render the days since the last patch / blog update (bracketed).
  
}}</includeonly><noinclude>
+
'''Raw values'''
{{Translation switching|cs, es, de, fr, ko, hu, pl, pt, pt-br, ro, ru}}
+
 
* Generates patch & blog update links and text plainly based on the parameter {{code|type}} (or the first unnamed parameter).
+
:: The following raw values are available as they are given in {{tl|Updates}} so they can be used anywhere.
* To update dates of blog updates & patches, '''see [[Template:Updates]]'''.
 
  
== 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)
+
| wiki-cap-recipient =
** {{code|blog-text}} for a localized version of "The [[TF2 Official Blog|blog]] was last updated on" (language link)
+
</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>

Revision as of 21:43, 13 January 2012

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 = 

| wiki-cap-recipient = 

Translation

See also