Template:Plugin: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
m (Reverted edits by Wishmaster (talk) to last revision by Goraf)
(use feature of 'Ext:Translate' to always lead to some translation)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[Plugin:{{
<includeonly>[[Special:MyLanguage/Plugin:{{{1}}}|{{{2|{{{1}}}}}}]]<nowiki/></includeonly><noinclude>
  #if: {{{3|}}}
  | {{{2}}}/{{{1}}} {{!}}{{{3}}}
  |{{
    #ifeq: {{BASEPAGENAME}} | {{SUBPAGENAME}}
    |{{ <!-- "p1" - language parameter for Template:While -->
        #if: {{{p1|}}}
        | {{{1}}}/{{{p1}}} {{!}}{{{1}}}
        |{{
          #ifeq: {{NAMESPACE}} | Plugin <!-- for {{Resolve Language}} -->
          |{{
              #if: {{{2|}}}
              | {{{1}}}/{{#var: PluginLang}} {{!}}{{{2}}}
              | {{{1}}}/{{#var: PluginLang}} {{!}}{{{1}}}
            }}
          | {{{2}}}/{{{1}}} {{!}}{{{2}}}
        }}
      }}
    |{{
        #ifeq: {{#len:{{SUBPAGENAME}} }} | 2
        | {{{1}}}/{{SUBPAGENAME}} {{!}}{{
          #if: {{{2|}}}
          |{{{2}}}
          |{{{1}}}
        }}
        |{{ <!-- "p1" - language parameter for Template:While -->
          #if: {{{p1|}}}
          | {{{1}}}/{{{p1}}} {{!}}{{{1}}}
          | {{{2}}}/{{{1}}} {{!}}{{{2}}}
        }}
      }}
  }}
}}]]<nowiki/></includeonly><noinclude>
{{Documentation}}
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
<!-- Add categories and interwikis to the /doc subpage, not here. Thanks. -->
</noinclude>
</noinclude>

Latest revision as of 01:55, 3 February 2018

Template documentation[view] [edit] [history] [purge]

Creates link to plugin's page. Link will lead to page in user's interface language; if it doesn't exist, then to page in fallback language or to English one in the end. So it should always lead to valid, existing page (in case page in base language exists – like it should).

Usage

Single link

{{Plugin | Plugin name | Link name (optional) }}
You type You get
{{Plugin|AIM}} AIM
{{Plugin|AIM|AIM Protocol}} AIM Protocol

Using Template:While

{{While | tpl=Plugin | Name of the first plugin | Name of the second plugin | etc. }}
You type You get
{{While|tpl=Plugin|AIM|Facebook|Jabber}} AIM, Facebook, Jabber