Template:LC zh: Difference between revisions

From Test Wiki
Jump to navigation Jump to search
Content deleted Content added
Created page with "<noinclude> <languages/> </noinclude><includeonly>{{#invoke:LC zh|main}}{{#invoke:Check for unknown parameters|check|checkpositional = 1|unknown = _VALUE_|preview = unknown or deprecated parameter "_VALUE_"|lang|hide_ns|type|ns|ns_2|zh-hans|zh-hant|zh-hk}}</includeonly><noinclude> {{Documentation|content= {{Lua|Module:LC zh}} <translate> == Description == <!--T:23--> <!--T:24--> This template handles t..."
 
m 1 revision imported
 
(One intermediate revision by one other user not shown)
Line 54: Line 54:


* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = N{{!}}ns = <$1>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = N{{!}}ns = <$1>{{))}}
|1=<translate><!--T:58--> namespace name in en</translate>
|1=<translate nowrap><!--T:58--> namespace name in en</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 63: Line 63:


* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = N{{!}}ns = <$1>{{!}}ns_2 = <$2>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = N{{!}}ns = <$1>{{!}}ns_2 = <$2>{{))}}
|1=<translate><!--T:32--> namespace name in en</translate>
|1=<translate nowrap><!--T:32--> namespace name in en</translate>
|2=<translate><!--T:33--> pseudo namespace name in en</translate>
|2=<translate nowrap><!--T:33--> pseudo namespace name in en</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 80: Line 80:


* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = {{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = {{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}}
|1=<translate><!--T:16--> zh-Hans page name</translate>
|1=<translate nowrap><!--T:16--> zh-Hans page name</translate>
|2=<translate><!--T:17--> zh-Hant page name</translate>
|2=<translate nowrap><!--T:17--> zh-Hant page name</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 90: Line 90:


* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}zh-hans = <$2>{{!}}zh-hant = <$3>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}zh-hans = <$2>{{!}}zh-hant = <$3>{{))}}
|1=<translate><!--T:9--> namespace name in en</translate>
|1=<translate nowrap><!--T:9--> namespace name in en</translate>
|2=<translate><!--T:10--> zh-Hans page name</translate>
|2=<translate nowrap><!--T:10--> zh-Hans page name</translate>
|3=<translate><!--T:11--> zh-Hant page name</translate>
|3=<translate nowrap><!--T:11--> zh-Hant page name</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}zh-hans = <$2>{{!}}zh-hant = <$3>{{!}}zh-hk = <$4>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}zh-hans = <$2>{{!}}zh-hant = <$3>{{!}}zh-hk = <$4>{{))}}
|1=<translate><!--T:12--> namespace name in en</translate>
|1=<translate nowrap><!--T:12--> namespace name in en</translate>
|2=<translate><!--T:13--> zh-Hans page name</translate>
|2=<translate nowrap><!--T:13--> zh-Hans page name</translate>
|3=<translate><!--T:14--> zh-Hant (zh-Hant-TW) page name</translate>
|3=<translate nowrap><!--T:14--> zh-Hant (zh-Hant-TW) page name</translate>
|4=<translate><!--T:15--> zh-Hant-HK page name</translate>
|4=<translate nowrap><!--T:15--> zh-Hant-HK page name</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 107: Line 107:


* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}ns_2 = <$2>{{!}}zh-hans = <$3>{{!}}zh-hant = <$4>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}ns_2 = <$2>{{!}}zh-hans = <$3>{{!}}zh-hant = <$4>{{))}}
|1=<translate><!--T:36--> namespace name in en</translate>
|1=<translate nowrap><!--T:36--> namespace name in en</translate>
|2=<translate><!--T:37--> pseudo namespace name in en</translate>
|2=<translate nowrap><!--T:37--> pseudo namespace name in en</translate>
|3=<translate><!--T:38--> zh-Hans page name</translate>
|3=<translate nowrap><!--T:38--> zh-Hans page name</translate>
|4=<translate><!--T:39--> zh-Hant page name</translate>
|4=<translate nowrap><!--T:39--> zh-Hant page name</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}ns_2 = <$2>{{!}}zh-hans = <$3>{{!}}zh-hant = <$4>{{!}}zh-hk = <$5>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}hide_ns = {{(((}}nsp{{!}}{{)))}}{{!}}type = T{{!}}ns = <$1>{{!}}ns_2 = <$2>{{!}}zh-hans = <$3>{{!}}zh-hant = <$4>{{!}}zh-hk = <$5>{{))}}
|1=<translate><!--T:40--> namespace name in en</translate>
|1=<translate nowrap><!--T:40--> namespace name in en</translate>
|2=<translate><!--T:41--> pseudo namespace name in en</translate>
|2=<translate nowrap><!--T:41--> pseudo namespace name in en</translate>
|3=<translate><!--T:42--> zh-Hans page name</translate>
|3=<translate nowrap><!--T:42--> zh-Hans page name</translate>
|4=<translate><!--T:43--> zh-Hant (zh-Hant-TW) page name</translate>
|4=<translate nowrap><!--T:43--> zh-Hant (zh-Hant-TW) page name</translate>
|5=<translate><!--T:44--> zh-Hant-HK page name</translate>
|5=<translate nowrap><!--T:44--> zh-Hant-HK page name</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 132: Line 132:


* {{#tag:syntaxhighlight|{{tmpl|0=== {{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = H{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}} ==
* {{#tag:syntaxhighlight|{{tmpl|0=== {{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = H{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}} ==
|1=<translate><!--T:47--> zh-Hans section heading</translate>
|1=<translate nowrap><!--T:47--> zh-Hans section heading</translate>
|2=<translate><!--T:48--> zh-Hant section heading</translate>
|2=<translate nowrap><!--T:48--> zh-Hant section heading</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}
* {{#tag:syntaxhighlight|{{tmpl|0=== {{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = H{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{!}}zh-hk = <$3>{{))}} ==
* {{#tag:syntaxhighlight|{{tmpl|0=== {{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = H{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{!}}zh-hk = <$3>{{))}} ==
|1=<translate><!--T:49--> zh-Hans section heading</translate>
|1=<translate nowrap><!--T:49--> zh-Hans section heading</translate>
|2=<translate><!--T:50--> zh-Hant (zh-Hant-TW) section heading</translate>
|2=<translate nowrap><!--T:50--> zh-Hant (zh-Hant-TW) section heading</translate>
|3=<translate><!--T:51--> zh-Hant-HK section heading</translate>
|3=<translate nowrap><!--T:51--> zh-Hant-HK section heading</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}


Line 149: Line 149:
</translate>
</translate>
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = C{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}type = C{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{))}}
|1=<translate><!--T:18--> zh-Hans content</translate>
|1=<translate nowrap><!--T:18--> zh-Hans content</translate>
|2=<translate><!--T:19--> zh-Hant content</translate>
|2=<translate nowrap><!--T:19--> zh-Hant content</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}C{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{!}}zh-hk =<$3>{{))}}
* {{#tag:syntaxhighlight|{{tmpl|0={{((}}LC zh{{!}}lang = {{((}}{lang{{!}}}{{))}}{{!}}C{{!}}zh-hans = <$1>{{!}}zh-hant = <$2>{{!}}zh-hk =<$3>{{))}}
|1=<translate><!--T:20--> zh-Hans content</translate>
|1=<translate nowrap><!--T:20--> zh-Hans content</translate>
|2=<translate><!--T:21--> zh-Hant (zh-Hant-TW) content</translate>
|2=<translate nowrap><!--T:21--> zh-Hant (zh-Hant-TW) content</translate>
|3=<translate><!--T:22--> zh-Hant-HK content</translate>
|3=<translate nowrap><!--T:22--> zh-Hant-HK content</translate>
}}|lang = wikitext|inline = }}
}}|lang = wikitext|inline = }}



Latest revision as of 12:12, 20 December 2025

Template documentation

Description

This template handles the language conversion ("LC") for Mandarin ("zh") page titles and content, especially for page titles with/without namespace names (the "nsp" parameter), content across language converter and non-language-converter pages.

Usage

The usage is different in each content types.

Do not fragmentize the content unless it's specific Wikitext syntax (section headings, lists).

Green tickY {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 按需求配置。|zh-hant = 按需求設定組態。}}

N 按需求{{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 配置|zh-hant = 設定組態}}

Green tickY {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = '''按需求配置。'''|zh-hant = '''按需求設定組態。'''}}

N '''{{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 按需求配置。|zh-hant = 按需求設定組態。}}'''

Green tickY == {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 按需求配置。|zh-hant = 按需求設定組態。}} ==

N {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = == 按需求配置。 ==|zh-hant = == 按需求設定組態。 ==}}

N == 按需求{{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 配置|zh-hant = 設定組態}}。 ==

Green tickY * {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 按需求配置。|zh-hant = 按需求設定組態。}}

N {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = * 按需求配置。|zh-hant = * 按需求設定組態。}}

N * 按需求{{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 配置|zh-hant = 設定組態}}

N - Namespace names

Do not use this type in page display title.

Namespace name-only:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = N|ns = <namespace name in en>}}

Containing pseudo namespace name:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = N|ns = <namespace name in en>|ns_2 = <pseudo namespace name in en>}}

Example:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = N|ns = Help}} → Help
  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = N|ns = Help|ns_2 = Extension}} → Help:Extension

T - Page display title

For page titles in main namespace:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = |zh-hans = <zh-Hans page name>|zh-hant = <zh-Hant page name>}}

For page titles containing namespace name:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = <namespace name in en>|zh-hans = <zh-Hans page name>|zh-hant = <zh-Hant page name>}}
  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = <namespace name in en>|zh-hans = <zh-Hans page name>|zh-hant = <zh-Hant (zh-Hant-TW) page name>|zh-hk = <zh-Hant-HK page name>}}

For page titles containing pseudo namespace name:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = <namespace name in en>|ns_2 = <pseudo namespace name in en>|zh-hans = <zh-Hans page name>|zh-hant = <zh-Hant page name>}}
  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = <namespace name in en>|ns_2 = <pseudo namespace name in en>|zh-hans = <zh-Hans page name>|zh-hant = <zh-Hant (zh-Hant-TW) page name>|zh-hk = <zh-Hant-HK page name>}}

Example:

  • {{LC zh|lang = {{{lang|}}}|hide_ns = {{{nsp|}}}|type = T|ns = Project|zh-hans = 关于|zh-hant = 關於}} → Project:关于

H - Section headings

Headings can automatically generate multiple anchors for different language variants.

  • == {{LC zh|lang = {{{lang|}}}|type = H|zh-hans = <zh-Hans section heading>|zh-hant = <zh-Hant section heading>}} ==
  • == {{LC zh|lang = {{{lang|}}}|type = H|zh-hans = <zh-Hans section heading>|zh-hant = <zh-Hant (zh-Hant-TW) section heading>|zh-hk = <zh-Hant-HK section heading>}} ==

Example:

  • == {{LC zh|lang = {{{lang|}}}|type = H|zh-hans = 关于|zh-hant = 關於}} == → == 关于 ==

C - Content

  • {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = <zh-Hans content>|zh-hant = <zh-Hant content>}}
  • {{LC zh|lang = {{{lang|}}}|C|zh-hans = <zh-Hans content>|zh-hant = <zh-Hant (zh-Hant-TW) content>|zh-hk =<zh-Hant-HK content>}}

Example:

  • {{LC zh|lang = {{{lang|}}}|type = C|zh-hans = 关于|zh-hant = 關於}} → 关于

Integration with other templates and modules

Notes

If the template is a user page template, global announcement, etc., which cannot be converted using Language Converter, you should consider using Template:Conversion-zh instead of this template.

Template data

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:LC zh in articles based on its TemplateData.

TemplateData for LC zh

<templatedata>{"paramOrder":["lang","hide_ns","type","ns","ns_2","zh-hans","zh-hant","zh-hk"],"description":"Language conversion template for Mandarin namespace names, page display titles, section headings and content. Only support zh-hans, zh-hant, zh-hk","params":{"ns_2":{"suggested":false,"type":"string","required":false,"label":"2nd English canonical namespace name","example":"Extension","description":"(type = N, T) The canonical name of the secondary pseudo-namespace in English. For example, \"Extension\" in \"Help:Extension:Example\"."},"type":{"suggested":false,"type":"string","required":true,"label":"Content type","example":"T","description":"The content type, values: \"N\" - Namespace names, \"T\" - Page display title, \"H\" - Section heading, \"C\" - Text content. Aliases: \"1\".","autovalue":"C"},"zh-hk":{"suggested":false,"type":"content","default":"{{{zh-hant|{{{zh-hans|}}}}}}","label":"Mandarin - Traditional Han script, Hong Kong","description":"The text content in Mandarin - Traditional Han script, Hong Kong.","example":"Example_zh-Hant-HK","required":false},"hide_ns":{"suggested":false,"type":"boolean","required":false,"label":"Hide namespace prefixes?","example":"1","description":"(type = N, T) Whether to hide the namespace prefix (only apply to parameter \"ns\", does not affect parameter \"ns_2\"). Value is passed from the \"nsp\" parameter of Template:Localized link. Aliases: \"2\", \"nsp\".","autovalue":"{{{nsp|}}}"},"zh-hant":{"suggested":true,"type":"content","default":"{{{zh-hk|{{{zh-hans|}}}}}}","label":"Mandarin - Traditional Han script","description":"The text content in Mandarin - Traditional Han script.","example":"Example_zh-Hant","required":false},"zh-hans":{"suggested":true,"type":"content","default":"{{{zh-hant|{{{zh-hk|}}}}}}","label":"Mandarin - Simplified Han script","description":"The text content in Mandarin - Simplified Han script.","example":"Example_zh-Hans","required":false},"lang":{"suggested":false,"type":"string","required":false,"label":"Output language/language variant","example":"zh-hant","description":"The language/language variant to output. (\"zh-hans\", \"zh-hans\", \"zh-hk\")","autovalue":"{{{lang|}}}"},"ns":{"suggested":false,"type":"string","required":false,"label":"English canonical namespace name","example":"Help","description":"(type = N, T) The canonical name of the namespace in English. Aliases: \"3\", \"namespace\"."}}}</templatedata>Edit parameter translations

Test cases

All tests passed.

test_main:

Text Expected Actual
Yes {{#invoke:LC zh|main}} An error Caught expected error: Lua error: Unknown content type code "nil".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}}} An error Caught expected error: Lua error: Unknown content type code "nil".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = N}} An error Caught expected error: Lua error: Missing parameter "ns".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = N|ns = }}
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = N|ns = User}} User User
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = N|ns = Help}} Help Help
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|ns = User}} An error Caught expected error: Lua error in Module:LC_zh at line 591: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|ns = User|zh-hans = Example|zh-hant = Example}} User:Example User:Example
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|ns = Help|zh-hans = 示例|zh-hant = 範例}} Help:示例 Help:示例
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|ns = Help|zh-hant = 範例}} Help:範例 Help:範例
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|hide_ns = 1|ns = Help}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = T|hide_ns = 1|ns = Help|zh-hans = 示例|zh-hant = 範例}} 示例 示例
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = H}} An error Caught expected error: Lua error in Module:LC_zh at line 620: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = H|zh-hans = 用户|zh-hant = 使用者|zh-hk = 用戶}} 用户 用户
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type = C}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{#invoke:LC zh|main|lang = {{{lang|}}}|type=C|zh-hans=示例|zh-hant=範例}} 示例 示例

test_template:

Text Expected Actual
Yes {{LC zh}} An error Caught expected error: Lua error: Unknown content type code "nil".
Yes {{LC zh|lang = {{{lang|}}}}} An error Caught expected error: Lua error: Unknown content type code "nil".
Yes {{LC zh|lang = {{{lang|}}}|type = N}} An error Caught expected error: Lua error: Missing parameter "ns".
Yes {{LC zh|lang = {{{lang|}}}|type = N|ns = }}
Yes {{LC zh|lang = {{{lang|}}}|type = N|ns = User}} User User
Yes {{LC zh|lang = {{{lang|}}}|type = N|ns = Help}} Help Help
Yes {{LC zh|lang = {{{lang|}}}|type = T}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{LC zh|lang = {{{lang|}}}|type = T|ns = User}} An error Caught expected error: Lua error in Module:LC_zh at line 591: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{LC zh|lang = {{{lang|}}}|type = T|ns = User|zh-hans = Example|zh-hant = Example}} User:Example User:Example
Yes {{LC zh|lang = {{{lang|}}}|type = T|ns = Help|zh-hans = 示例|zh-hant = 範例}} Help:示例 Help:示例
Yes {{LC zh|lang = {{{lang|}}}|type = T|ns = Help|zh-hant = 範例}} Help:範例 Help:範例
Yes {{LC zh|lang = {{{lang|}}}|type = T|hide_ns = 1|ns = Help}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{LC zh|lang = {{{lang|}}}|type = T|hide_ns = 1|ns = Help|zh-hans = 示例|zh-hant = 範例}} 示例 示例
Yes {{LC zh|lang = {{{lang|}}}|type = H}} An error Caught expected error: Lua error in Module:LC_zh at line 620: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{LC zh|lang = {{{lang|}}}|type = H|zh-hans = 用户|zh-hant = 使用者|zh-hk = 用戶}} 用户 用户
Yes {{LC zh|lang = {{{lang|}}}|type = C}} An error Caught expected error: Lua error: Require at least one of the parameter: "zh-hans", "zh-hant", "zh-hk".
Yes {{LC zh|lang = {{{lang|}}}|type=C|zh-hans=示例|zh-hant=範例}} 示例 示例

test_template_localized_link:

Text Expected Actual
Yes {{Localized link}} [[Special:MyLanguage/{{{1}}}|{{{1}}}]]<span style="display:none">[[:{{{1}}}| ]]</span> [[Special:MyLanguage/{{{1}}}|{{{1}}}]]<span style="display:none">[[:{{{1}}}| ]]</span>

test_template_localized_link_sandbox:

Text Expected Actual
Yes {{Localized link/sandbox}} [[Special:MyLanguage/{{{1}}}|{{{1}}}]]<span style="display:none">[[:{{{1}}}| ]]</span> [[Special:MyLanguage/{{{1}}}|{{{1}}}]]<span style="display:none">[[:{{{1}}}| ]]</span>

Tracking categories