分类:Lang和lang-xx模板错误
此分类主要是为构建和维护列表本身而设,并非百科全书分类项目的一部分。除非用户设置“显示隐藏分类”,否则该分类不会显示在页面的分类栏中。
|
致管理员:即使本分类不含任何页面,也请不要将其删除! 本分类有时甚至大部分时间可能是空的。 |
致管理员:即使本分类不含任何页面,也请不要将其删除! 本分类有时甚至大部分时间可能是空的。 |
本分类用于追踪{{lang}}
和{{lang-??}}
模板错误,仅供Module:Lang使用。
错误消息
在撰写本文时(2018年8月8日),Module:Lang正在开发以整合{{lang}}
和许多{{lang-xx}}
模板。作为其中一部分,当模板参数使用不当或指定给参数的数据格式错误时,模块现在会发出错误消息。错误消息的格式如下:
- [<文本>] <错误消息>(帮助链接)
其中<文本>是提供给模板并在没有适当的HTML标记的情况下呈现的文本。错误消息在此处定义:
错误消息 | 模板 | 描述 |
---|---|---|
缺少语言标签 | {{lang}} |
{{{1}}} is empty; this parameter is required
|
{{lang-xx}} |
|code= in the template's module {{#invoke:}} is empty
| |
无法识别的语言标签:<tag> | {{lang}} |
where <tag> is the specified IETF language tag; this error message indicates that the tag is malformed or not listed in the module's data set. You must use a valid IETF language tag.
|
{{lang-xx}}
| ||
无法识别的语言代码:<code> | {{lang}} |
where <code> is the first subtag (the base language code) in the specified IETF language tag; this error message indicates that the <code> subtag is malformed or not listed in the module's data set. You must use a valid IETF language tag.
|
{{lang-xx}}
| ||
无法识别的文本:<script>用于代码:<code> | {{lang}} |
where <script> is the second subtag and <code> is the first subtag in the specified IETF language tag; this error message indicates that the script subtag is malformed or not listed in the module's data set.
|
{{lang-xx}}
| ||
无法识别的地区:<region>用于代码:<code> | {{lang}} |
where <region> is the third (or second if script omitted) subtag and <code> is the first subtag in the specified IETF language tag; this error message indicates that the region subtag is malformed or not listed in the module's data set.
|
{{lang-xx}}
| ||
未识别的变体:<variant> | {{lang}} |
where <variant> is the last subtag in the specified IETF language tag; this error message indicates that the variant subtag has proper form (4 digits or 5–8 alphanumeric characters) but is not listed in the module's data set.
|
{{lang-xx}}
| ||
未识别的变体:<variant>用于代码:<code> | {{lang}} |
where <variant> is the last subtag and <code> is the first subtag in the specified IETF language tag; this error message indicates that the variant subtag is a valid variant subtag but is not valid when used with the <code> subtag.
|
{{lang-xx}}
| ||
未识别的变体:<variant>用于代码-文本对<code>-<script> | {{lang}} |
where <variant> is the last subtag and <code>-<script> is the first and second subtags in the specified IETF language tag; this error message indicates that the variant subtag is a valid variant subtag but is not valid when used with the <code>-<script> subtags.
|
{{lang-xx}}
| ||
无文本 | {{lang}} |
{{{2}}} is empty; this parameter is required
|
{{lang-xx}} |
{{{1}}} is empty; this parameter is required – this error message often occurs when a {{lang-xx}} template used when an {{xx icon}} template is intended. This error can also occur if there is an equals sign (=) in the foreign-language text; use {{eq}} if an equals sign is needed.
| |
文本有斜体标记 | {{lang}} |
this error message currently disabled for {{lang}} – text has italic markup; use |italic= to control italics in the rendering; accepted parameter values are yes , no , unset , and default ; see §italic markup errors.
|
{{lang-xx}}
| ||
文本有格式不正确的标记 | {{lang}} |
text has invalid wiki markup ('''' or '''''' or more apostrophes). This message also appears when there are five apostrophes (a previous editor wanted bold and italic); remove two apostrophes on each side, since the template italicizes automatically. If the text within the template ends with an apostrophe, use ' .
|
{{lang-xx}}
| ||
冗余文本标签 | {{lang-xx}} |
both the script subtag in |code= in the template's module {{#invoke:}} and |script= have assigned values; this error message indicates that (at present) only one of these is allowed.
|
冗余区域标签 | {{lang-xx}} |
both the region subtag in |code= in the template's module {{#invoke:}} and |region= have assigned values; this error message indicates that (at present) only one of these is allowed.
|
冗余变体标签 | {{lang-xx}} |
both the variant subtag in |code= in the template's module {{#invoke:}} and |variant= have assigned values; this error message indicates that (at present) only one of these is allowed.
|
代码/文本失配: <code> / <script> | {{lang-xx}} |
where <code> is the IETF language tag specified in parameter |code= in the template's module {{#invoke:}} and <script> is the content of the template's |script= parameter. If an IETF script subtag is part of <code> , |script= is superfluous; however, templates should not 'hard code' a script in its language code; this is especially important for languages that use more than one script.
|
冲突:{{{1}}} 和 |text= | {{lang-xx}} |
this error occurs when positional and named parameters are used together |
冲突:{{{2}}} 和 |translit= | ||
冲突:|lit= 和 |translation= | {{lang-xx}} |
only one of these aliases is permitted |
冲突:|links= 和 |link= | ||
文本:<script>不支持代码:<code> | {{lang}} |
where <script> is the second subtag or |script=, and <code> is the first subtag in the specified IETF language tag; this error message indicates that the script subtag is not allowed (suppressed) when used with code; script may be safely omitted.
|
{{lang-xx}}
|
斜体标记错误
文本有斜体标记错误通常出于以下原因:
text
中的文字包含多个字母系统- 在此例中,古希腊语有拉丁文字转译
{{lang-grc|Ἀθῆναι, ''Athênai''}}
- 上述应重写为
{{lang-grc|Ἀθῆναι|translit=Athênai}}
→ 古希腊语:Ἀθῆναι,罗马化:Athênai
- A similar condition may exist for languages that have multiple writing systems, where the second is not a transliteration of the first but the actual text as written in the 'other' writing system. For such templates, consider writing:
{{lang-xx|<first text>|italic=<yes|no>|rtl=<yes|no>}} {{lang|xx|<second text>}}
- 在此例中,古希腊语有拉丁文字转译
text
包含斜体标记以重写{{lang-xx}}
模板设置的默认斜体标记(请参阅模板文档 §用法 部分中的设置框 ){{lang-sco|''Dumbairton''}}
– 'Dumbairton' 是一个适当的名称,所以不应该用斜体- 上述应重写为
{{lang-sco|Dumbairton|italic=no}}
→ 低地苏格兰语:Dumbairton
- for languages like Kurdish that use more than one script and where the template default is to italicize
{{lang-ku|ههڵپهركێ}}
–text
holds a script that should not be italicized- the above should be rewritten:
{{lang-ku|ههڵپهركێ|italic=no|rtl=yes}}
→ 库尔德语:ههڵپهركێ- (it is prudent to set
|rtl=
toyes
orno
so that the template includes the correct html markup in the rendering)
- (it is prudent to set
- when
text
holds Latin transliterations of right-to-left languages like Arabic (no Arabic script), consider setting|script=Latn
so that the template removes the default right-to-left html markup from the rendering and automatically renders in italics:{{lang-ar|''min sallaf es-sabt lāqā el-ḥadd qiddāmūh''}}
- the above could be rewritten:
{{lang-ar|min sallaf es-sabt lāqā el-ḥadd qiddāmūh|script=Latn}}
→ 阿拉伯语:min sallaf es-sabt lāqā el-ḥadd qiddāmūh
- but, consider using the perhaps more semantically correct
{{transl}}
instead:[[Romanization of Arabic|Arabic]]: ''{{transl|ar|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}}''
→ Arabic: min sallaf es-sabt lāqā el-ḥadd qiddāmūh
text
includes italic wiki markup to 'turn off' italics for an inserted English-language conjunction between two non-English words or phrases:- in this example, an English-language conjunction, 'or', is inserted between two Lithuanian phrases; English is not Lithuanian so does not belong inside of the
{{lang-lt}}
template:{{lang-lt|Rusijos lietuvių seimas Petrograde'' or ''Visos Rusijos lietuvių seimas}}
- the above should be rewritten:
{{lang-lt|Rusijos lietuvių seimas Petrograde}} or {{lang|lt|Visos Rusijos lietuvių seimas}}
→ 立陶宛语:Rusijos lietuvių seimas Petrograde or Visos Rusijos lietuvių seimas
- in this example, an English-language conjunction, 'or', is inserted between two Lithuanian phrases; English is not Lithuanian so does not belong inside of the
- When the template is
{{lang-en}}
or{{lang|en|...}}
, consider removing the template; this is the English Wikipedia, it is not usually necessary to identify English text in the English Wikipedia as being English.So why don't we just delete the template?[可疑] - Sometimes the inclusion of italic markup is just wrong.
- For example, Cyrillic text is generally not to be rendered in italic font; see MOS:FOREIGNITALIC.
{{lang-uk|''Українська Народна Міліція''}}
- the above should be rewritten:
{{lang-uk|Українська Народна Міліція}}
→ 乌克兰语:Українська Народна Міліція
- For example, Cyrillic text is generally not to be rendered in italic font; see MOS:FOREIGNITALIC.