Template:Dynamite/doc: Difference between revisions

From Test Wiki
Content deleted Content added
m 3 revisions imported from meta:Template:Dynamite/doc
 
mediawiki>Jianhui67
m Reverted changes by 117.18.230.56 (talk) to last version by Tacsipacsi
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
<noinclude>{{Documentation subpage}}</noinclude>
<templatedata>
{
"description": "This template will return a translatable page in the user's interface language if such a page exists; else, it'll return the \"/en\" page. If \"/en\" page also doesn't exist, this will return the source page of the target template.",
"params": {
"title": {
"label": "title",
"description": "Title of the page to transclude, as in a template transclusion (prefixed with namespace except for the template namespace, \":\" prefix for mainspace pages)",
"example": ":VisualEditor/Newsletter/header",
"type": "wiki-template-name",
"required": true
},
"t": {
"label": "template",
"description": "Whether the title belongs to a template (needed for existence check)",
"type": "line",
"suggestedvalues": [
"yes",
"no"
],
"default": "no"
}
}
}
</templatedata>


It is the same as using <code><nowiki>{{TNT|Foo|uselang={{int:lang}}}}</nowiki></code> and this template was created to avoid the template looping issue when {{tl|TNT}} is used on TNT again.
This template is return a translatable page in the user's interface language if such a page exists; else, it'll return the "/en" page.


It is the same as using <code><nowiki>{{ :{{TNTN|Foo |uselang={{int:lang}} }} }}</nowiki></code> which does not loop too.
If "/en" page also is not exist, template will return main page of target template.


== Usage ==
It is the same as using <code><nowiki>{{TNT|Foo|uselang={{int:lang}}}}</nowiki></code> and this template was created to avoid the template looping issue when TNT is used on TNT again. See [//meta.wikimedia.org/w/index.php?title=Steward_requests/Permissions&uselang=pl] for an example.
* <code><nowiki>{{dynamite|title=template name|t=yes}}</nowiki></code>
* <code><nowiki>{{dynamite|title=:page name}}</nowiki></code>


== Examples ==
* <code><nowiki>{{dynamite|title=Steward requests|t=yes}}</nowiki></code> will include:
** [[Template:Steward requests/Permissions/en]] if user interface is in English,
** [[Template:Steward requests/Permissions/fr]] if user interface is in French,
** [[Template:Steward requests/Permissions/de]] if user interface is in German;
* <code><nowiki>{{dynamite|title=:VisualEditor/Newsletter/header}}</nowiki></code> will include:
** [[VisualEditor/Newsletter/header/en]] if user interface is in English,
** [[VisualEditor/Newsletter/header/fr]] if user interface is in French,
** [[VisualEditor/Newsletter/header/en|VisualEditor/Newsletter/header/'''en''']] if user interface is in German since [[VisualEditor/Newsletter/header/de|VisualEditor/Newsletter/header/'''de''']] does not exist.

See [//meta.wikimedia.org/w/index.php?title=Steward_requests/Permissions&uselang=pl] for an example usage.
<includeonly>
<includeonly>
[[Category:Internationalization templates]]
[[Category:Internationalization templates]]