Modèle:Update
{{#switch:
{{#if: | | {{#ifeq:Modèle| | main | other }} }}| main =
{{#if:
|{{#ifeq:|section |{{#if: |This section's factual accuracy may be compromised due to out-of-date information |This section needs to be updated}} |{{#if: |The factual accuracy of parts of this article (those related to ) may be compromised due to out-of-date information |Parts of this article (those related to ) need to be updated}} }} |{{#if: |This article's factual accuracy may be compromised due to out-of-date information |This article needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}} | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} to reflect recent events or newly available information. {{#if: |}} (mai 2024) |
| other
| #default ={{#if:
|{{#if: |The factual accuracy of parts of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} (those related to ) may be compromised due to out-of-date information |Parts of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} (those related to ) need to be updated}} |{{#if: |The factual accuracy of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} may be compromised due to out-of-date information |This {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}} Please update this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} to reflect recent events or newly available information. {{#ifexist: Discussion modèle:Update |Relevant discussion may be found on {{#if: | [[Discussion modèle:Update#{{{discuss}}}|the talk page]] | the talk page }}.}} {{#if:|({{{date}}})}} {{#if: |}} |
}}
{{#ifeq:update |doc
|
{{#ifeq:show |show
|This is a documentation subpage for Modèle:Update. It contains usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Modèle |Utilisateur |modèle template page |{{#if:Modèle |modèle page|article}}}}}}}}. |
}}{{#if: | | {{#ifexist:Modèle:Update | [[Category:{{#switch:Modèle |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | }} }} | }}
This {{#switch:Modèle|Module=Lua module|#default=template}} is used on [https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace=10&name=%7B%7B%0A%23switch%3A+Update%0A%7C+doc+%7C+sandbox+%3D+Update%0A%7C+%23default++++++%3D+Update%0A%7D%7D {{#iferror:{{#expr:0+{{#ifeq:yes|yes|15.000+| 15.000+ }}*1}}|many|approximately {{#ifeq:{{#ifeq:yes|yes|15.000+| 15.000+ }}|0
|0 |{{significant figures/{{#if:2 |rnd |sum }} |1={{#ifeq:yes|yes|15.000+| 15.000+ }} |2=2 |3={{safesubst:#ifexpr:{{#ifeq:yes|yes|15.000+| 15.000+ }}=0 |{{safesubst:#ifexpr:abs{{#ifeq:yes|yes|15.000+| 15.000+ }}1=1 |0 |{{safesubst:#expr:floor((ln(abs{{#ifeq:yes|yes|15.000+| 15.000+ }}1)/ln10)+1)}} }} |{{#expr:floor((ln(abs({{#ifeq:yes|yes|15.000+| 15.000+ }}) )/ln 10)+1E((abs{{#ifeq:yes|yes|15.000+| 15.000+ }}>1E100 or abs{{#ifeq:yes|yes|15.000+| 15.000+ }}<1E-100)-14))}} }} }} }}}} pages], so changes to it will be widely noticed. Please test any changes in the {{#switch:Modèle|Module=module's|#default=template's}} [[{{#switch: Update | doc | sandbox = Modèle:Update | #default = Modèle:Update }}/sandbox|/sandbox]] or [[{{#switch: Update | doc | sandbox = Modèle:Update | #default = Modèle:Update }}/testcases|/testcases]] subpages{{#switch:Modèle|Module=.|#default=, or in your own user subpage.}} Please consider discussing changes {{#if:|at [[{{{2}}}]]|on the [[{{#switch: Update | doc | sandbox = Discussion modèle:Update | #default = Discussion modèle:Update}}|talk page]]}} before implementing them. |
If you plan to make breaking changes to this template, move it, or nominate it for deletion, please notify Twinkle's users and maintainers at Wikipedia talk:Twinkle as a courtesy, as this template is used in the standard installation of Twinkle. Thank you! {{#if:| {{{1}}}}} |
Uses Lua: |
Sommaire
Usage
This template can be used to mark articles or sections with old or out-of-date information.
- To specify what parts of the page need updating, use the first unnamed parameter (or name it
|{{#if:part|part=}}
or number it|{{#if:1|1=}}
): -
{{{{#if:Update|Update| tnull|...}}{{#if:part=the later-life and death material and the [[#Legacy|Legacy]] section||part=the later-life and death material and the [[#Legacy|Legacy]] section|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- To use the template in one specific section, and change its wording to refer to the section instead of the page, use
|{{#if:|=}}section
(this is a special case of|{{#if:1|1=}}
a.k.a.|{{#if:part|part=}}
, above). Insert the template at the top of the page: -
{{{{#if:Update|Update| tnull|...}}{{#if:section||section|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- To display the date (in whatever format) of the last significant update to the page, use the second unnamed parameter (or name it
|{{#if:updated|updated=}}
or number it|{{#if:2|2=}}
): -
{{{{#if:Update|Update| tnull|...}}{{#if:updated={{#time:j F Y|-1 month}}||updated={{#time:j F Y|-1 month}}|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- Note: The parameter name or number must be used if the first numbered/unnamed parameter is not used.
- To add the date when the tag was added (this is used for cleanup categorization), use:
-
{{{{#if:Update|Update| tnull|...}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{3}}}|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- You can also do:
{{Update|{{subst:DATE}}}}
- To explain that the article now has inaccuracies (not just missing information) due to being outdated, use
|{{#if:inaccurate|inaccurate=}}yes
: -
{{{{#if:Update|Update| tnull|...}}{{#if:inaccurate=yes||inaccurate=yes|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- To link to a particular section of the talk page where the update is being discussed, use
|{{#if:talk|talk=}}Section title
(|{{#if:talksection|talksection=}}
and|{{#if:discuss|discuss=}}
are equivalent to|{{#if:talk|talk=}}
): -
{{{{#if:Update|Update| tnull|...}}{{#if:talk=Shall we update this for 2024?||talk=Shall we update this for 2024?|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- To display a reason (after the added phrase "In particular:"), use
|{{#if:reason|reason=}}a short comment here
, e.g.: -
{{{{#if:Update|Update| tnull|...}}{{#if:reason=Is missing the mai 2024 election results||reason=Is missing the mai 2024 election results|}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{4}}}|}}{{#if:||{{{5}}}|}}{{#if:||{{{6}}}|}}{{#if:||{{{7}}}|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
- These parameters can be combined, of course:
-
{{{{#if:Update |Update | tnull|...}}{{#if:part=The [[#Production|Production]] section and follow-on material ||part=The [[#Production|Production]] section and follow-on material |}}{{#if:reason=the film is released, so this needs a "Critical reception" section, too ||reason=the film is released, so this needs a "Critical reception" section, too |}}{{#if:inaccurate=yes ||inaccurate=yes |}}{{#if:talk=Post-release updating ||talk=Post-release updating |}}{{#if:updated={{#time:F Y|-3 month}} ||updated={{#time:F Y|-3 month}} |}}{{#if:date=mai 2024||date=mai 2024|}}{{#if:||{{{8}}}|}}{{#if:||{{{9}}}|}}}}
Example
{{{{#if: |subst:}}Update{{#if:documentation ||documentation}}{{#if:date=mai 2024 ||date=mai 2024}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
{{#switch:
{{#if: | | {{#ifeq:Modèle| | main | other }} }}| main =
{{#if:documentation
|{{#ifeq:documentation|section |{{#if: |This section's factual accuracy may be compromised due to out-of-date information |This section needs to be updated}} |{{#if: |The factual accuracy of parts of this article (those related to documentation) may be compromised due to out-of-date information |Parts of this article (those related to documentation) need to be updated}} }} |{{#if: |This article's factual accuracy may be compromised due to out-of-date information |This article needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}} | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} to reflect recent events or newly available information. {{#if: |}} (mai 2024) |
| other
| #default ={{#if:documentation
|{{#if: |The factual accuracy of parts of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} (those related to documentation) may be compromised due to out-of-date information |Parts of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} (those related to documentation) need to be updated}} |{{#if: |The factual accuracy of this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} may be compromised due to out-of-date information |This {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}} Please update this {{#switch: Modèle | = article | Wikisisar = Wikipedia page | Utilisateur | Aide = modèle page | #default = modèle }} to reflect recent events or newly available information. {{#ifexist: Discussion modèle:Update |Relevant discussion may be found on {{#if: | [[Discussion modèle:Update#{{{discuss}}}|the talk page]] | the talk page }}.}} {{#if:|({{{date}}})}} {{#if: |}} |
}}
The template detects which namespace it is used in and changes accordingly:
Article | {{#switch:
{{#if:main |
main | main | other
}} }} |
main =
|
other | #default =
}} | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Category | {{#switch:
{{#if:category |
category | main | other
}} }} |
main =
|
other | #default =
}} | ||||||||||||||||||||||||
Template | {{#switch:
{{#if:template |
template | main | other
}} }} |
main =
|
other | #default =
}} |
{{{{#if: |subst:}}Update{{#if:section ||section}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
produces:
Article | {{#switch:
{{#if:main |
main | main | other
}} }} |
main =
|
other | #default =
}} | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Category | {{#switch:
{{#if:category |
category | main | other
}} }} |
main =
|
other | #default =
}} | ||||||||||||||||||||||||
Template | {{#switch:
{{#if:template |
template | main | other
}} }} |
main =
|
other | #default =
}} |
This template will add mainspace articles to Category:Wikipedia articles in need of updating (this category is not populated by pages in other namespaces).
For factual inaccuracies, stronger wording is used and mainspace articles will be added to Category:Articles with obsolete information.
{{{{#if: |subst:}}Update{{#if:inaccurate=yes ||inaccurate=yes}}{{#if: ||{{{3}}}}}{{#if: ||{{{4}}}}}{{#if: ||{{{5}}}}}{{#if: ||{{{6}}}}}{{#if: ||{{{7}}}}}{{#if: ||{{{8}}}}}{{#if: ||{{{9}}}}}{{#if: ||{{{10}}}}}{{#if: ||{{{11}}}}}{{#if: ||…}}}}
{{#switch:
{{#if:main | main | {{#ifeq:Modèle| | main | other }} }}| main =
{{#if:
|{{#ifeq:|section |{{#if:yes |This section's factual accuracy may be compromised due to out-of-date information |This section needs to be updated}} |{{#if:yes |The factual accuracy of parts of this article (those related to ) may be compromised due to out-of-date information |Parts of this article (those related to ) need to be updated}} }} |{{#if:yes |This article's factual accuracy may be compromised due to out-of-date information |This article needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}}}} (mai 2024) |
| other
| #default ={{#if:
|{{#if:yes |The factual accuracy of parts of this article (those related to ) may be compromised due to out-of-date information |Parts of this article (those related to ) need to be updated}} |{{#if:yes |The factual accuracy of this article may be compromised due to out-of-date information |This article needs to be updated}} }}. {{#if:|In particular: {{{reason}}}.}} Please update this article to reflect recent events or newly available information. {{#ifexist: Discussion modèle:Update |Relevant discussion may be found on {{#if: | [[Discussion modèle:Update#{{{discuss}}}|the talk page]] | the talk page }}.}} {{#if:|({{{date}}})}} {{#if: |}} |
}}
Alternatives
- {{Update after}} is an alternative for individual statements that will be out-of-date at a specifiable future date. It is a more recent and preferred alternative to Wikipedia:As of. It also adds articles to Category:Wikipedia articles in need of updating.
- See Wikipedia:Template messages/Cleanup#Time-sensitive for alternatives unrelated to out-of-date information.
See also
- {{As of}}
- {{Current}}
- {{Recentism}}
- {{Show by date}}/{{subst:Show by}}
- {{Time-context}}
- {{Update inline}}
- {{Updated}}
- {{When}}
- {{Incomplete}}
{{#ifeq:Update|sandbox | | }}
The above documentation is transcluded from Modèle:Update/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |