Difference between revisions of "Template:Extension"
Jump to navigation
Jump to search
Extracting "license", "hooks" and "parameters" from Module:ExtensionJson if not given
>Pppery (Replace Module:String/enwiki) |
>Pppery (Extracting "license", "hooks" and "parameters" from Module:ExtensionJson if not given) |
||
Line 22: | Line 22: | ||
|magic=<translate><!--T:10--> magic</translate> | |magic=<translate><!--T:10--> magic</translate> | ||
|#default=<translate><!--T:11--> unknown</translate> | |#default=<translate><!--T:11--> unknown</translate> | ||
}}<!-- | |||
-->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->[[Category:{{#switch: {{lc:{{{status|}}} }} | -->{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->[[Category:{{#switch: {{lc:{{{status|}}} }} | ||
|unstable|experimental|stable = {{{status}}} extensions | |unstable|experimental|stable = {{{status}}} extensions | ||
Line 190: | Line 190: | ||
<tr> | <tr> | ||
<td>{{ll|Template:Extension#license|'''<translate><!--T:21--> License</translate>'''}}</td> | <td>{{ll|Template:Extension#license|'''<translate><!--T:21--> License</translate>'''}}</td> | ||
<td> | <td>{{#invoke:Extension|getFormattedLicense|{{{license|}}} | ||
|GPL-2.0 = <translate><!--T:122--> GNU General Public License 2.0</translate> | |GPL-2.0 = <translate><!--T:122--> GNU General Public License 2.0</translate> | ||
|GPL-2.0-only = <translate><!--T:123--> GNU General Public License 2.0 only</translate> | |GPL-2.0-only = <translate><!--T:123--> GNU General Public License 2.0 only</translate> | ||
Line 228: | Line 228: | ||
|PD = <translate><!--T:156--> [[w:Public domain|Public domain]]</translate> | |PD = <translate><!--T:156--> [[w:Public domain|Public domain]]</translate> | ||
|+ = <translate><!--T:157-->  or later</translate> | |+ = <translate><!--T:157-->  or later</translate> | ||
|unspecified = <translate><!--T:22--> No license specified</translate> | |||
}}</td> | |||
</tr><tr> | </tr><tr> | ||
{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- no category -->|{{#invoke:Extension|getLicenseCategory|{{{license|}}}}}}} | |||
<td>'''<translate><!--T:23--> Download</translate>'''</td> | <td>'''<translate><!--T:23--> Download</translate>'''</td> | ||
<td><!-- | <td><!-- | ||
Line 250: | Line 252: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{parameters|}}}| | {{#if:{{#if:{{{parameters|}}}|y|{{#invoke:Extension|getParameters}}}}| | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
<div class="mw-collapsible-header">{{ll|Template:Extension#parameters|<translate><!--T:27--> Parameters</translate>}}</div> | <div class="mw-collapsible-header">{{ll|Template:Extension#parameters|<translate><!--T:27--> Parameters</translate>}}</div> | ||
<div class="mw-collapsible-content"><!-- the parameter "parameters" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | <div class="mw-collapsible-content"><!-- the parameter "parameters" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | ||
{{{parameters}}}</div></td> | {{#if:{{{parameters|}}}|{{{parameters}}}|{{#invoke:Extension|getParameters}}}}</div></td> | ||
</tr> | </tr> | ||
}} | }} | ||
Line 265: | Line 267: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if:{{{rights|}}}| | {{#if:{{#if:{{{rights|}}}|y|{{#invoke:Extension|getRights}}}}| | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
<div class="mw-collapsible-header">{{ll|Template:Extension#rights|<translate><!--T:29--> Added rights</translate>}}</div> | <div class="mw-collapsible-header">{{ll|Template:Extension#rights|<translate><!--T:29--> Added rights</translate>}}</div> | ||
<div class="mw-collapsible-content"><!-- the parameter "rights" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | <div class="mw-collapsible-content"><!-- the parameter "rights" should begin on its own line so that bullet lists are correctly recognised by MediaWiki --> | ||
{{{rights}}} | {{#if:{{{rights|}}}|{{{rights}}}|{{#invoke:Extension|getRights}}}} | ||
{{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{{rights|}}}|[[Category:Extensions which add rights{{#translation:}}]]|}} }}</div></td> | {{#ifeq:{{{templatemode|<noinclude>nocats</noinclude>}}}|nocats|<!-- do nothing -->|<!--else-->{{#if:{{{rights|}}}|[[Category:Extensions which add rights{{#translation:}}]]|}} }}</div></td> | ||
</tr> | </tr> | ||
Line 284: | Line 286: | ||
</tr> | </tr> | ||
}} | }} | ||
{{# | {{#invoke:Extension|getHooks|header= | ||
<tr> | <tr> | ||
<td class="mw-collapsible mw-collapsed" colspan="2"> | <td class="mw-collapsible mw-collapsed" colspan="2"> | ||
<div class="mw-collapsible-header">{{ll|Template:Extension#hook|<translate><!--T:30--> Hooks used</translate>}}</div> | <div class="mw-collapsible-header">{{ll|Template:Extension#hook|<translate><!--T:30--> Hooks used</translate>}}</div> | ||
<div class="mw-collapsible-content plainlist"><ul><li> | <div class="mw-collapsible-content plainlist"><ul><li>|delim=</li><li>|footer=</li></ul></div> | ||
</td> | </td> | ||
</tr> | </tr> |