Šablona:Localized link: Porovnání verzí
Z Wiki JU
translace>Clump (many grammatical fixes; see talk) |
m (naimportována 1 revize) |
||
(Nejsou zobrazeny 4 mezilehlé verze od 3 dalších uživatelů.) | |||
Řádek 4: | Řádek 4: | ||
-->{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | -->{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | ||
|<b> | |<b> | ||
}}[[Special:MyLanguage/{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{2|{{#ifexist:Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page display title/{{PAGELANGUAGE}}<!--if the source page, PAGELANGUAGE returns en--> | }}<!---->[[Special:MyLanguage/{{{1}}}|{{#if:{{{2|}}} | ||
|{{#if:{{{nsp|}}} | |{{{2}}} | ||
|{{#if:{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} | | |{{{2|{{#ifexist:Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page display title/{{PAGELANGUAGE}}<!--if the source page, PAGELANGUAGE returns en--> | ||
|{{#ifexpr:{{#if:{{{nsp|}}}|1|0}} and {{NAMESPACENUMBER:{{{1}}}}}!=0 | |||
|{{#ifeq:{{PAGELANGUAGE}}|en | |||
|{{PAGENAME:{{{1}}}}} | |||
|<!-- check whether the string is not empty --><!-- | |||
-->{{#if:{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }} | |||
|{{#ifeq:{{#invoke:string|find|{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }}|:}}|0 | |||
|{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }} | |||
| {{#invoke:string|match|{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }}|:(.*)}} | |||
}} | |||
|<!-- pass parameter to, e.g., "Template:LC zh"; check whether the string is not empty --><!-- | |||
-->{{#if:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} | nsp = 0 }} | |||
|{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} | nsp = 0 }} | |||
|{{{1}}} | |||
}} | |||
}} | |||
}} | }} | ||
|{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} | |{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} | ||
Řádek 20: | Řádek 33: | ||
|{{{1}}} | |{{{1}}} | ||
}} | }} | ||
}}}}}}}]]{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | }}<!--#ifexist--><!-- | ||
-->}}}<!--{{{2|--><!-- | |||
-->}}<!--#if:{{{2|}}}--><!-- | |||
-->]]<!-- | |||
-->{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | |||
|</b> | |</b> | ||
}}<span style="display:none">[[:{{{1}}}| ]]</span><!-- T63547 --><noinclude> | }}<span style="display:none">[[:{{{1}}}| ]]</span><!-- T63547 --><noinclude> | ||
Řádek 81: | Řádek 98: | ||
# <translate><!--T:16--> If link text is the same as the name of the target page, all of the code could also be embedded into <tvar name=1>{{tag|tvar|open}}</tvar>.</translate> | # <translate><!--T:16--> If link text is the same as the name of the target page, all of the code could also be embedded into <tvar name=1>{{tag|tvar|open}}</tvar>.</translate> | ||
#: <translate><!--T:24--> For example, instead of <tvar name=1>{{Tlx|ll|Communication}}</tvar>, the wikicode in the translatable page will be <tvar name=2>{{#tag:syntaxhighlight|{{^(}}tvar name=1{{)^}}{{((}}ll{{!}}Communication{{))}}{{^(}}/tvar{{)^}}|lang=html|inline=1}}</tvar>.</translate> | #: <translate><!--T:24--> For example, instead of <tvar name=1>{{Tlx|ll|Communication}}</tvar>, the wikicode in the translatable page will be <tvar name=2>{{#tag:syntaxhighlight|{{^(}}tvar name=1{{)^}}{{((}}ll{{!}}Communication{{))}}{{^(}}/tvar{{)^}}|lang=html|inline=1}}</tvar>.</translate> | ||
== Test cases == | |||
{{Localized link/testcases}} | |||
<translate> | <translate> |
Aktuální verze z 23. 9. 2024, 14:03
<languages/> [[Special:MyLanguage/{{{1}}}|{{{1}}}]]Chyba Lua: Modul:TNT:172: '''Missing JsonConfig extension, or not properly configured; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab. See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates'''.[[Category:Template documentation pages{{#translation:}}]]