Changes

2,943 bytes added ,  07:39, 16 July 2021
Pywikibot 6.4.0
{{Module rating | alpha }}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''|SISTER=''sister project name''}}</code>

Implements a version of {{tl|tlx}}, {{tl|tlxs}}, {{tl|tlxb}}, {{tl|tlxi}}, {{tl|tlxc}}, and {{tl|temt}}.

{{tl|tlx}} and {{tl|temt}} use the function name <code>tlx</code>, {{tl|tlxs}} uses <code>tlxs</code>, {{tl|tlxb}} uses <code>tlxb</code>, {{tl|tlxi}} uses <code>tlxi</code>, and {{tl|tlxs}} uses <code>tlx</code> with {{para|SISTER|commons:}}.

Generally, a call to this module can be placed at the front of a template call to display formatted code instead of the template output. For example, if this module is implemented at {{tl|tlx/sandbox}}, a function call such as <code><nowiki>{{convert|1|m|disp=flip}}</nowiki></code> can be displayed as formatted text using the code <code><nowiki>{{tlx/sandbox|convert|1|m|disp=flip}}</nowiki></code>, which outputs {{tlx/sandbox|convert|1|m|disp=flip}}.

This has the following caveats:
*{{para|LANG}}, {{para|SISTER}}, and {{para|subst}} are reserved for compatibility with the legacy {{tl|tlx}} template. In order to display <code><nowiki>{{x0|LANG=de|SISTER=wikt|subst=yes}}</nowiki></code> you would need to use workarounds from the old template such as <code><nowiki>{{tlx/sandbox|x0|&lt;nowiki&gt;LANG=en&lt;/nowiki&gt;|SISTER{{=}}wikt|4=subst=yes}}</nowiki></code> to produce {{tlx/sandbox|x0|<nowiki>LANG=en</nowiki>|SISTER{{=}}wikt|4=subst=yes}}.
*Parameters are presented in alphabetical order, starting with numbered parameters, regardless of input order. <code><nowiki>{{tlx/sandbox|x0|z=y|x=w|a|b}}</nowiki></code> displays {{tlx/sandbox|x0|z=y|x=w|a|b}}
*Since the {{para|1}} parameter is used for the template name, numbered parameters where the number is explicitly specified must be offset by one (as was true with the legacy {{tl|tlx}} template): <code><nowiki>{{tlx/sandbox|x0|2=first|3=second|4=third=***}}</nowiki></code> produces {{tlx/sandbox|x0|2=first|3=second|4=third=***}}.
:*NOTE: you must be careful not to double-define a parameter. <code><nowiki>{{tlx/sandbox|x0|first|2=second=**}}</nowiki></code> will output {{tlx/sandbox|x0|2=second=**}} (and generate a warning) since the <code>2</code> parameter was defined twice. Use <code><nowiki>{{tlx/sandbox|x0|first|3=second=**}}</nowiki></code> to display {{tlx/sandbox|x0|first|3=second=**}}.
*To display the number of a numbered parameter explicitly, the same workarounds from the legacy template still work: <code><nowiki>{{tlx/sandbox|x0|&lt;nowiki&gt;1=first&lt;/nowiki&gt;|2{{=}}second|4=3=third}}</nowiki></code> produces {{tlx/sandbox|x0|<nowiki>1=first</nowiki>|2{{=}}second|4=3=third}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->

}}</includeonly>