Template:Merge: Difference between revisions

From PZwiki
m (fix issue that doesn't show merge reason)
(add error template)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
  {{Languages}}
{{Documentation/sandbox|doc =
  {{Documentation}}
This template should be added to articles that are not lengthy enough to be deemed their own page, and therefore should be incorporated into the linked article.
  [[Category:Maintenance templates]]
 
  [[Category:Mbox templates]]
This will add the page to the "{{ll|:Category:Articles to be merged|Articles to be merged}}" category.
</noinclude><!--
 
--><includeonly><!--
==Usage==
  -->{{NoticeBox
===Parameters===
    | type = move
;<code>1</code> {{sup|required}}
    | text = {{#switch: {{Subpage|slash=false}}
:The name of the article to be merged with. Although not required, adding a reason is highly recommended, so others can better understand the reasoning.
      <!-- Example: |es={{Template:merge/es|{{{1}}}|reason={{{reason|}}}}} -->
;<code>2</code>
      | nl = {{Template:merge/nl|{{{1}}}|reason={{{reason|}}}}}
:The reason for the merge.
      | zh-hans = {{Template:merge/zh-hans|{{{1}}}|reason={{{reason|}}}}}
;<code>section</code>
      | en | #default = <span style="font-size:120%">It has been suggested that this article be '''merged''' with '''[[{{{1}}}]]'''.</span>{{#if:{{{reason|}}}|<br>Reason: {{{reason|}}} }} ([[talk:{{PAGENAME}}|Discuss]])
:If set to <code>true</code>, will display "section" instead of "article" in the title.
    }}
;<code>hidecat</code>
    <!-- checks if pagename = subpagename in language code registry then returns null, else add subpagename -->
:If set to <code>true</code>, it will not add the page to the "{{ll|:Category:Articles to be merged|Articles to be merged}}" category.
    | cat = [[Category:Articles to be merged{{#ifeq:{{Language code|{{Subpage|slash=false}}}}|true|{{Subpage}}|}}]]
 
    | hidecat = {{{hidecat|}}}
==Examples==
  }}<!--
*{{tll|Merge|PZwiki:Mboxes}}
--></includeonly>
{{Merge|PZwiki:Mboxes|hidecat=true}}
*{{tll|Merge|PZwiki:Mboxes|This article doesn't contain sufficient notable information to deserve its own page}} - Provide reason.
{{Merge|PZwiki:Mboxes|This article doesn't contain sufficient notable information to deserve its own page.|hidecat=true}}
 
{{Translation guide|<syntaxhighlight lang="html">
{{#switch: {{{1|}}}
| title = It has been suggested that this {{{3}}} be merged with {{{2}}}.
| reason = Reason
| #default = {{Error|translation}}
}}
</syntaxhighlight>}}
 
==See also==
*{{ll|PZwiki:Mboxes}}
}}
{{ll|Category:Mbox}}
</noinclude><includeonly>{{Mbox
| color = #9932cc
| sign = [[File:Furniture Pickup.png|link=Template:Merge{{lcs}}]]
| title = {{tt|name=Merge
  | default = It has been suggested that this {{Page ns|{{{section|}}}}} be merged with {{#if:{{{1|}}}|{{ll|{{{1}}}}}|{{Error|param_empty|hidecat={{{hidecat|}}}}}}}.
  | arg1 = title
  | arg2 = {{#if:{{{1|}}}|{{ll|{{{1}}}}}|{{Error|param_empty|hidecat={{{hidecat|}}}}}}}
  | arg3 = {{Page ns|{{{section|}}}}}
  }}
| content = {{#if:{{{2|}}}|{{tt|name=Merge
  | default = Reason
  | arg1 = reason
  }}: {{{2}}}}}
| cat = {{yesno|{{{hidecat|}}}|yes=|no=Articles to be merged{{lcs}}}}
| id = merge
| collapsed = {{#if:{{{2|}}}||true}}
}}</includeonly>

Latest revision as of 13:00, 7 March 2024

Notebook.pngTemplate Documentation

This template should be added to articles that are not lengthy enough to be deemed their own page, and therefore should be incorporated into the linked article.

This will add the page to the "Articles to be merged" category.

Usage

Parameters

1 Required
The name of the article to be merged with. Although not required, adding a reason is highly recommended, so others can better understand the reasoning.
2
The reason for the merge.
section
If set to true, will display "section" instead of "article" in the title.
hidecat
If set to true, it will not add the page to the "Articles to be merged" category.

Examples

Furniture Pickup.png
It has been suggested that this template be merged with PZwiki:Mboxes.
  • {{Merge|PZwiki:Mboxes|This article doesn't contain sufficient notable information to deserve its own page}} - Provide reason.
Furniture Pickup.png
It has been suggested that this template be merged with PZwiki:Mboxes.
Reason: This article doesn't contain sufficient notable information to deserve its own page.

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|}}}
| title = It has been suggested that this {{{3}}} be merged with {{{2}}}.
| reason = Reason
| #default = {{Error|translation}}
}}

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.

See also

Editors can experiment in this template's sandbox.