Template:Retrieved: Difference between revisions

From PZwiki
(update)
(added translatability)
Line 33: Line 33:
*This will also add the page to "{{ll|:Category:Version 41.78.16|Version 41.78.16}}" category.
*This will also add the page to "{{ll|:Category:Version 41.78.16|Version 41.78.16}}" category.


{{Translation guide}}
{{Translation guide|<syntaxhighlight lang="html">
{{#switch: {{{1|}}}
| retrieved = Retrieved
| build - Build
| unknown = Unknown Version
| #default = [[Category:Incorrect template usage]]
</syntaxhighlight>}}
}}


==See also==
==See also==
Line 41: Line 48:
}}
}}
{{ll|Category:Templates}}
{{ll|Category:Templates}}
</noinclude><includeonly>''<small>'''{{Translation|Retrieved}}''': {{#if: {{{version|}}}
</noinclude><includeonly>''<small>'''{{tt|name=Retrieved|default=Retrieved|arg1=retrieved}}''': {{#if: {{{version|}}}
| {{ll|Build {{{version}}}{{!}}Build {{{version}}}{{#if: {{{incver|}}}
| {{ll|Build {{{version}}}{{!}}{{tt|name=Retrieved|default=Build|arg1=build}} {{{version}}}{{#if: {{{incver|}}}
   | .{{{incver}}}
   | .{{{incver}}}
   }}}}
   }}}}
| {{Translation|Unknown Version}}
| {{tt|name=Retrieved|default=Unknown Version|arg1=unknown}}
}}{{#if: {{{hidecat|}}}
}}{{#if: {{{hidecat|}}}
|| {{ll|Category:{{#if: {{{version|}}}
|| {{ll|Category:{{#if: {{{version|}}}
Line 51: Line 58:
     | .{{{incver}}}
     | .{{{incver}}}
     }}
     }}
   | Unknown Version
   | {{tt|name=Retrieved|default=Unknown Version|arg1=unknown}}
   }}}}
   }}}}
}} {{#if:{{{date|}}}|({{#dateformat:{{{date}}}|dmy}})}}</small>''</includeonly>
}} {{#if:{{{date|}}}|({{#dateformat:{{{date}}}|dmy}})}}</small>''</includeonly>

Revision as of 11:21, 7 January 2024

Notebook.pngTemplate Documentation

The {{Header}} can be used whenever something, such as code, is retrieved. This template indicates which version the information was retrieved from.

Usage

Used for displaying when game code was retrieved.

Parameters

version
the major Project Zomboid version this page's content is up to date to. The contents of this parameter will also be categorized on the page.
incver
the incremental (minor) Project Zomboid version this information is up to date to. Used to avoid creating many categories for a single release version.
date
the date retrieved can be added. Accepted input formats are: ISO 8601 (yyyy-mm-dd), or any order using the month shorthand (dd mmm yyyy). E.g. 2022-12-12, 12 dec 2022.
hidecat
if not blank (empty) page will not be added to the version category. This should only be used if absolutely necessary.

Examples

Basic usage

Used with game code

Retrieved: Build 41.78.16 (12 December 2022)

item TinOpener
	Weight		= 0.6,
	Type		= Normal,
	DisplayName	= Can Opener,
	Icon		= CanOpener,
	MetalValue 	= 3,

How to translate

This template is translatable.

Template code

Paste the following code into the <includeonly> tag of the translated template and translate the text after each = sign (except for #default =).

{{#switch: {{{1|}}}
| retrieved = Retrieved
| build - Build
| unknown = Unknown Version
| #default = [[Category:Incorrect template usage]]

Template documentation

Copy the code wrapped in the <noinclude> tag in this template and translate the text after doc = in the {{Documentation}} template.

{{Translation guide}} template should be removed from the translated documentation.
Editors can experiment in this template's sandbox.

See also

}}