Nothing Special   »   [go: up one dir, main page]

跳转到内容

Template:Table cell templates/doc:修订间差异

维基百科,自由的百科全书
删除的内容 添加的内容
无编辑摘要
无编辑摘要
第1行: 第1行:
<noinclude>{{Documentation subpage}}</noinclude>
<noinclude>{{Documentation subpage}}</noinclude>
{{#ifeq:{{FULLPAGENAME}}|Template:BLACK|{{For|the text color template|Template:Black}}}}
{{#ifeq:{{FULLPAGENAME}}|Template:BLACK|{{For|the text color template|Template:Black}}|{{#ifeq:{{FULLPAGENAME}}|Template:Ya|{{For|the template with a smaller tick and no green background|Template:Aye}}|{{#ifeq:{{FULLPAGENAME}}|Template:Maybe|{{For|the yellow tick template|Template:Mby}}}}}}}}
The templates in this series are designed to be used in a [[Help:Table|table]] to make a cell with text in that cell, with an appropriately colored background. They are commonly used in [[:Category:Comparisons|comparison tables]].


For example, {{Tlc|yes}} makes a cell with a green background. The text in the cell is taken from the [[Help:Template#Parameters|first parameter]]; <code><nowiki>{{</nowiki>yes|Sure}}</code> would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: <code><nowiki>{{</nowiki>''table cell template''}} ''text''</code> or <code><nowiki>{{</nowiki>''table cell template''}} | ''text''</code>. This information, the colors and default texts are found in the table below.
本系列的模板是專門為在條目內容中使用[[Help:表格|表格]]而設計,使儲存格內可加入文字,並配以合適的顏色背景。這些模板通常在[[:Category:比較學|比較表格]]中使用。

例如:<code>{{Tl|yes}}</code>這個模版可令一個儲存格變成綠色背景,並寫上“是”這個字。格中的文字来自[[Help:模板#设定参数|第一个参数]];如果改成<code><nowiki>{{</nowiki>yes|當然}}</code>的話,儲存格內原來預設的“是”就會變成“當然”。Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: <code><nowiki>{{</nowiki>''table cell template''}} ''text''</code> or <code><nowiki>{{</nowiki>''table cell template''}} | ''text''</code>. This information, the colors and default texts are found in the table below.


If you want to use other attributes for the table cells, ''e.g.'' <code>colspan</code> or <code>rowspan</code>, they need to be put before the template call and there must be no vertical bar <code>|</code> in between them:
If you want to use other attributes for the table cells, ''e.g.'' <code>colspan</code> or <code>rowspan</code>, they need to be put before the template call and there must be no vertical bar <code>|</code> in between them:
第20行: 第19行:
</pre>
</pre>


== 模板列表 ==
== 模板 ==
<div style="overflow:auto;">
<div style="overflow:auto;">
{| class="wikitable" style="text-align: left; width: auto;"
{| class="wikitable" style="text-align: left; width: auto;"
|+ Table cell templates
|+ Table cell templates
! 類型<ref name="table-cell-templates-table-css">The HTML class of table cell templates may be referenced in a [[m:help:User style|user stylesheet]] to change appearance.</ref> !! 默认表达式 !! 预览(默认) !! 自定义表达式 !! 预览(自定义)
! Class<ref name="table-cell-templates-table-css">The HTML class of table cell templates may be referenced in a [[m:help:User style|user stylesheet]] to change appearance.</ref> !! Default syntax !! Preview (default) !! Customized syntax !! Preview (customized)
|-
|-
|rowspan=2| <code>table-rh</code> || {{tl|rh}} {{!}} 栏标题<ref name="table-cell-templates-table-after+pipe" /> || {{rh}} | 栏标题 || {{tlp|rh|2=align=right}} {{!}} 栏标题 || {{rh|align=right}} | 栏标题
|rowspan=2| <code>table-rh</code> || {{tl|rh}} {{!}} Row header<ref name="table-cell-templates-table-after+pipe" /> || {{rh}} | Row header || {{tlp|rh|2=align=right}} {{!}} Row header || {{rh|align=right}} | Row header
|-
|-
| {{tl|rh2}} {{!}} 栏标题<ref name="table-cell-templates-table-after+pipe">Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.</ref> || {{rh2}} {{!}} 栏标题 || {{tlp|rh2|2=align=right}} | 栏标题 || {{rh2|align=right}} | 栏标题
| {{tl|rh2}} {{!}} Row header<ref name="table-cell-templates-table-after+pipe">Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.</ref> || {{rh2}} {{!}} Row header || {{tlp|rh2|2=align=right}} | Row header || {{rh2|align=right}} | Row header
|-
|-
| <code>table-yes</code> || {{tl|yes}} || {{yes}} || {{tlp|yes|<nowiki>自定义[[纯文本|文字]]</nowiki>}} ||{{yes|自定义[[纯文本|文字]]}}
| <code>table-yes</code> || {{tl|yes}} || {{yes}} || {{tlp|yes|<nowiki>Customized [[Plain text|text]]</nowiki>}} ||{{yes|Customized [[Plain text|text]]}}
|-
|-
| <code>table-maybe</code> || {{tl|maybe}} || {{maybe}} || {{tlp|maybe|<nowiki>自定义[[纯文本|文字]]</nowiki>}} ||{{maybe|自定义[[纯文本|文字]]}}
| <code>table-maybe</code> || {{tl|maybe}} || {{maybe}} || {{tlp|maybe|<nowiki>Customized [[Plain text|text]]</nowiki>}} ||{{maybe|Customized [[Plain text|text]]}}
|-
|-
|rowspan=5| <code>table-no</code> || {{tl|no}} || {{no}} || {{tlp|no|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{no|自定义[[纯文本|文字]]}}
|rowspan=5| <code>table-no</code> || {{tl|no}} || {{no}} || {{tlp|no|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{no|Customized [[Plain text|text]]}}
|-
|-
| {{tl|eliminated}} || {{eliminated}} || {{tlp|eliminated|退出}} || {{eliminated|退出}}
| {{tl|eliminated}} || {{eliminated}} || {{tlp|eliminated|Dropped out}} || {{eliminated|Dropped out}}
|-
|-
| {{tlp|active fire|12%}} || {{active fire|12%}} || ||
| {{tlp|active fire|12%}} || {{active fire|12%}} || ||
第46行: 第45行:
| <code>table-active</code> || {{tl|active}} || {{active}} || {{tlp|active|Lively}} || {{active|Lively}}
| <code>table-active</code> || {{tl|active}} || {{active}} || {{tlp|active|Lively}} || {{active|Lively}}
|-
|-
|rowspan=2| <code>table-siteactive</code> || {{tl|site active}} || {{site active}} || {{tlp|site active|已上线}} || {{site active|已上线}}
|rowspan=2| <code>table-siteactive</code> || {{tl|site active}} || {{site active}} || {{tlp|site active|Up}} || {{site active|Up}}
|-
|-
| {{tl|coming soon}} || {{coming soon}} || {{tlp|coming soon|后半年}} || {{coming soon|后半年}}
| {{tl|coming soon}} || {{coming soon}} || {{tlp|coming soon|Second half of the year}} || {{coming soon|Second half of the year}}
|-
|-
| <code>table-siteinactive</code> || {{tl|site inactive}} || {{site inactive}} || {{tlp|site inactive|已下线}} || {{site inactive|已下线}}
| <code>table-siteinactive</code> || {{tl|site inactive}} || {{site inactive}} || {{tlp|site inactive|Down}} || {{site inactive|Down}}
|-
|-
|rowspan=8| <code>table-yes2</code> || {{tl|good}} || <s><nowiki>{{good}}</nowiki></s> || {{tlp|good|A}} || <s><nowiki>{{good|A}}</nowiki></s>
|rowspan=8| <code>table-yes2</code> || <s>{{tl|good}}</s> || <s>{{tlc|good}}</s> || <s>{{tlp|good|A}}</s> || <s>{{tlc|good|A}}</s>
|-
|-
| {{tl|yes2}} || {{yes2}} || {{tlp|yes2|文字}} || {{yes2|文字}}
| {{tl|yes2}} || {{yes2}} || {{tlp|yes2|Text}} || {{yes2|Text}}
|-
|-
| {{tl|ya}} || {{ya}} || {{tlp|ya|text{{=}}Ya}} || {{ya|text=Ya}}
| {{tl|ya}} || {{ya}} || {{tlp|ya|text{{=}}Ya}} || {{ya|text=Ya}}
|-
|-
| {{tlp|ya|Ya}} || {{ya|Ya}} || {{tlp|ya|文字|link{{=}}WP:ALT}} || {{ya|文字|link=WP:ALT}}
| {{tlp|ya|Ya}} || {{ya|Ya}} || {{tlp|ya|text|link{{=}}WP:ALT}} || {{ya|text|link=WP:ALT}}
|-
|-
| {{tl|won}} || {{won}} || {{tlp|won|text{{=}}white|color{{=}}darkblue}} || {{won|text=white|color=darkblue}}
| {{tl|won}} || {{won}} || {{tlp|won|text{{=}}white|color{{=}}darkblue}} || {{won|text=white|color=darkblue}}
|-
|-
| {{tlp|won|place{{=}}1}} || {{won|place=1}} || {{tlp|won|place{{=}}金牌}} || {{won|place=金牌}}
| {{tlp|won|place{{=}}1}} || {{won|place=1}} || {{tlp|won|place{{=}}Gold}} || {{won|place=Gold}}
|-
|-
| {{tlp|won|place{{=}}2}} || {{won|place=2}} || {{tlp|won|place{{=}}银牌}} || {{won|place=银牌}}
| {{tlp|won|place{{=}}2}} || {{won|place=2}} || {{tlp|won|place{{=}}Silver}} || {{won|place=Silver}}
|-
|-
| {{tlp|won|place{{=}}3}} || {{won|place=3}} || {{tlp|won|place{{=}}铜牌}} || {{won|place=铜牌}}
| {{tlp|won|place{{=}}3}} || {{won|place=3}} || {{tlp|won|place{{=}}Bronze}} || {{won|place=Bronze}}
|-
|-
|rowspan=7| <code>table-no2</code> || {{tl|no2}} || {{no2}} || {{tlp|no2|文字}} || {{no2|文字}}
|rowspan=7| <code>table-no2</code> || {{tl|no2}} || {{no2}} || {{tlp|no2|Text}} || {{no2|Text}}
|-
|-
| {{tl|na}} || {{na}} || {{tlp|na|text{{=}}Na}} || {{na|text=Na}}
| {{tl|na}} || {{na}} || {{tlp|na|text{{=}}Na}} || {{na|text=Na}}
|-
|-
| {{tlp|na|Na}} || {{na|Na}} || {{tlp|na|文字|link{{=}}WP:ALT}} || {{na|文字|link=WP:ALT}}
| {{tlp|na|Na}} || {{na|Na}} || {{tlp|na|text|link{{=}}WP:ALT}} || {{na|text|link=WP:ALT}}
|-
|-
| {{tl|nom}} || {{nom}} || {{tlp|nom|5}} || {{nom|5}}
| {{tl|nom}} || {{nom}} || {{tlp|nom|5}} || {{nom|5}}
第78行: 第77行:
| {{tl|sho}} || {{sho}} || {{tlp|sho|Proposed}} || {{sho|Proposed}}
| {{tl|sho}} || {{sho}} || {{tlp|sho|Proposed}} || {{sho|Proposed}}
|-
|-
| {{tl|longlisted}} || {{longlisted}} || {{tlp|longlisted|已拒绝}} || {{longlisted|已拒绝}}
| {{tl|longlisted}} || {{longlisted}} || {{tlp|longlisted|Rejected}} || {{longlisted|Rejected}}
|-
|-
| {{tl|TBA}} || {{TBA}} || {{tlp|TBA|即将公布}} || {{TBA|即将公布}}
| {{tl|TBA}} || {{TBA}} || {{tlp|TBA|To be announced}} || {{TBA|To be announced}}
|-
|-
| rowspan=2 |<code>table-success</code> || {{tl|success}} || {{success}} || {{tlp|success|任务完成}} || {{success|任务完成}}
| rowspan=2 |<code>table-success</code> || {{tl|success}} || {{success}} || {{tlp|success|Mission complete}} || {{success|Mission complete}}
|-
|-
| {{tl|operational}} || {{operational}} || {{tlp|operational|正传回数据}} || {{operational|正传回数据}}
| {{tl|operational}} || {{operational}} || {{tlp|operational|Returning data}} || {{operational|Returning data}}
|-
|-
| <code>table-failure</code> || {{tl|failure}} || {{failure}} || {{tlp|failure|入轨失败}} || {{failure|入轨失败}}
| <code>table-failure</code> || {{tl|failure}} || {{failure}} || {{tlp|failure|Wrong orbit}} || {{failure|Wrong orbit}}
|-
|-
| rowspan=16| <code>table-partial</code> || {{tl|partial}} || {{partial}} || {{tlp|partial|几乎完成}} ||{{partial|几乎完成}}
| rowspan=16| <code>table-partial</code> || {{tl|partial}} || {{partial}} || {{tlp|partial|Almost done}} ||{{partial|Almost done}}
|-
|-
| {{tl|Regional}} || {{Regional}} || {{tlp|Regional|维吾尔}} || {{Regional|维吾尔}}
| {{tl|Regional}} || {{Regional}} || {{tlp|Regional|Uyghur}} || {{Regional|Uyghur}}
|-
|-
| {{tl|MaybeCheck}} || {{MaybeCheck}} || {{tlp|MaybeCheck|text{{=}}有可能}} || {{MaybeCheck|text=有可能}}
| {{tl|MaybeCheck}} || {{MaybeCheck}} || {{tlp|MaybeCheck|text{{=}}Possibly}} || {{MaybeCheck|text=Possibly}}
|-
|-
| {{tlp|MaybeCheck|有可能}} || {{MaybeCheck|有可能}} || {{tlp|MaybeCheck|文字|link{{=}}WP:ALT}} || {{MaybeCheck|文字|link=WP:ALT}}
| {{tlp|MaybeCheck|Possibly}} || {{MaybeCheck|Possibly}} || {{tlp|MaybeCheck|text|link{{=}}WP:ALT}} || {{MaybeCheck|text|link=WP:ALT}}
|-
|-
| {{tl|partial success}} || {{partial success}} || {{tlp|partial success|<nowiki>入轨成功并传回照片</nowiki>}} || {{partial success|入轨成功并传回照片}}
| {{tl|partial success}} || {{partial success}} || {{tlp|partial success|<nowiki>Reached orbit and returned pictures</nowiki>}} || {{partial success|Reached orbit and returned pictures}}
|-
|-
| {{tl|partial failure}} || {{partial failure}} || {{tlp|partial failure|<nowiki>[[Cubesat]] not deployed</nowiki>}} || {{partial failure|[[Cubesat]] not deployed}}
| {{tl|partial failure}} || {{partial failure}} || {{tlp|partial failure|<nowiki>[[Cubesat]] not deployed</nowiki>}} || {{partial failure|[[Cubesat]] not deployed}}
第110行: 第109行:
| {{tl|pending}} || {{pending}} || {{tlp|pending|Awaiting}} || {{pending|Awaiting}}
| {{tl|pending}} || {{pending}} || {{tlp|pending|Awaiting}} || {{pending|Awaiting}}
|-
|-
| {{tl|unofficial}} || {{unofficial}} || {{tlp|unofficial|<nowiki>''事实上的''</nowiki>}} || {{unofficial|''事实上的''}}
| {{tl|unofficial}} || {{unofficial}} || {{tlp|unofficial|<nowiki>''De facto''</nowiki>}} || {{unofficial|''De facto''}}
|-
|-
| {{tl|unofficial2}} || {{unofficial2}} || {{tlp|unofficial2|<nowiki>''事实上的''</nowiki>}} || {{unofficial2|''事实上的''}}
| {{tl|unofficial2}} || {{unofficial2}} || {{tlp|unofficial2|<nowiki>''De facto''</nowiki>}} || {{unofficial2|''De facto''}}
|-
|-
| {{tl|usually}} || {{usually}} || {{tlp|usually|普遍}} || {{usually|普遍}}
| {{tl|usually}} || {{usually}} || {{tlp|usually|Commonly}} || {{usually|Commonly}}
|-
|-
| {{tl|rarely}} || {{rarely}} || {{tlp|rarely|罕见}}|| {{rarely|罕见}}
| {{tl|rarely}} || {{rarely}} || {{tlp|rarely|Seldom}}|| {{rarely|Seldom}}
|-
|-
| {{tl|sometimes}} || {{sometimes}} || {{tlp|sometimes|偶尔}} || {{sometimes|偶尔}}
| {{tl|sometimes}} || {{sometimes}} || {{tlp|sometimes|Occasionally}} || {{sometimes|Occasionally}}
|-
|-
| <code>table-any</code> || {{tl|any}} || {{any}} || {{tlp|any|有人}}|| {{any|有人}}
| <code>table-any</code> || {{tl|any}} || {{any}} || {{tlp|any|Anyone}}|| {{any|Anyone}}
|-
|-
|rowspan=6| <code>table-na</code> || {{tl|n/a}} || {{n/a}} || {{tlp|n/a|不可用}}|| {{n/a|不可用}}
|rowspan=6| <code>table-na</code> || {{tl|n/a}} || {{n/a}} || {{tlp|n/a|Unavailable}}|| {{n/a|Unavailable}}
|-
|-
| {{tl|varies}} || {{varies}} || {{tlp|varies|Differs}}|| {{varies|Differs}}
| {{tl|varies}} || {{varies}} || {{tlp|varies|Differs}}|| {{varies|Differs}}
第128行: 第127行:
| {{tl|sdash}} || {{sdash}} || {{tlp|sdash|<nowiki>[[File:Dash.svg|13px|link=|dash icon]]</nowiki>}}|| {{sdash|[[File:Dash.svg|13px|link=|dash]]}}
| {{tl|sdash}} || {{sdash}} || {{tlp|sdash|<nowiki>[[File:Dash.svg|13px|link=|dash icon]]</nowiki>}}|| {{sdash|[[File:Dash.svg|13px|link=|dash]]}}
|-
|-
| {{tl|BLACK}} || {{BLACK}} || {{tlp|BLACK|禁止}} || {{BLACK|禁止}}
| {{tl|BLACK}} || {{BLACK}} || {{tlp|BLACK|Banned}} || {{BLACK|Banned}}
|-
|-
| {{tl|non-album single}} || {{non-album single}} || {{tlp|non-album single|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{non-album single|自定义[[纯文本|文字]]}}
| {{tl|non-album single}} || {{non-album single}} || {{tlp|non-album single|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{non-album single|Customized [[Plain text|text]]}}
|-
|-
| {{tl|unreleased}} || {{unreleased}} || {{tlp|unreleased|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{unreleased|自定义[[纯文本|文字]]}}
| {{tl|unreleased}} || {{unreleased}} || {{tlp|unreleased|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{unreleased|Customized [[Plain text|text]]}}
|-
|-
|rowspan=2| <code>table-unknown</code> || {{tl|unknown}} || {{Unknown}} || {{tlp|unknown|?}} || {{unknown|?}}
|rowspan=2| <code>table-unknown</code> || {{tl|unknown}} || {{Unknown}} || {{tlp|unknown|?}} || {{unknown|?}}
|-
|-
| {{tl|dunno}} || {{Dunno}} || {{tlp|dunno|不确定}} || {{dunno|不确定}}
| {{tl|dunno}} || {{Dunno}} || {{tlp|dunno|Not sure}} || {{dunno|Not sure}}
|-
|-
| <code>table-automatic</code> || {{tl|perhaps}} || {{perhaps}} || {{tlp|perhaps|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{perhaps|自定义[[纯文本|文字]]}}
| <code>table-automatic</code> || {{tl|perhaps}} || {{perhaps}} || {{tlp|perhaps|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{perhaps|Customized [[Plain text|text]]}}
|-
|-
| <code>table-depends</code> || {{tl|depends}} || {{depends}} || {{tlp|depends|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{depends|自定义[[纯文本|文字]]}}
| <code>table-depends</code> || {{tl|depends}} || {{depends}} || {{tlp|depends|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{depends|Customized [[Plain text|text]]}}
|-
|-
| <code>table-included</code> || {{tl|included}} || {{included}} || {{tlp|included|Incorporated}} || {{included|Incorporated}}
| <code>table-included</code> || {{tl|included}} || {{included}} || {{tlp|included|Incorporated}} || {{included|Incorporated}}
|-
|-
|rowspan=2| <code>table-dropped</code> || {{tl|dropped}} || {{dropped}} || {{tlp|dropped|已中止}} || {{dropped|已中止}}
|rowspan=2| <code>table-dropped</code> || {{tl|dropped}} || {{dropped}} || {{tlp|dropped|Discontinued}} || {{dropped|Discontinued}}
|-
|-
| {{tl|terminated}} || {{terminated}} || {{tlp|terminated|被解雇}} || {{terminated|被解雇}}
| {{tl|terminated}} || {{terminated}} || {{tlp|terminated|Fired}} || {{terminated|Fired}}
|-
|-
| <code>table-beta</code> || {{tl|beta}} || {{beta}} || {{tlp|beta|预览}} || {{beta|预览}}
| <code>table-beta</code> || {{tl|beta}} || {{beta}} || {{tlp|beta|Preview}} || {{beta|Preview}}
|-
|-
| <code>table-experimental</code> || {{tl|table-experimental}} || {{table-experimental}} || {{tlp|table-experimental|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{table-experimental|自定义[[纯文本|文字]]}}
| <code>table-experimental</code> || {{tl|table-experimental}} || {{table-experimental}} || {{tlp|table-experimental|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{table-experimental|Customized [[Plain text|text]]}}
|-
|-
| <code>table-free</code> || {{tl|free}} || {{free}} || {{tlp|free|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{free|自定义[[纯文本|文字]]}}
| <code>table-free</code> || {{tl|free}} || {{free}} || {{tlp|free|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{free|Customized [[Plain text|text]]}}
|-
|-
| <code>table-proprietary</code> || {{tl|proprietary}} || {{proprietary}} || {{tlp|proprietary|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{proprietary|自定义[[纯文本|文字]]}}
| <code>table-proprietary</code> || {{tl|proprietary}} || {{proprietary}} || {{tlp|proprietary|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{proprietary|Customized [[Plain text|text]]}}
|-
|-
| <code>table-nonfree</code> || {{tl|nonfree}} || {{nonfree}} || {{tlp|nonfree|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{nonfree|自定义[[纯文本|文字]]}}
| <code>table-nonfree</code> || {{tl|nonfree}} || {{nonfree}} || {{tlp|nonfree|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nonfree|Customized [[Plain text|text]]}}
|-
|-
| <code>table-needs</code> || {{tl|needs}} || {{needs}} || {{tlp|needs|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{needs|自定义[[纯文本|文字]]}}
| <code>table-needs</code> || {{tl|needs}} || {{needs}} || {{tlp|needs|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{needs|Customized [[Plain text|text]]}}
|-
|-
| <code>table-nightly</code> || {{tl|nightly}} || {{nightly}} || {{tlp|nightly|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{nightly|自定义[[纯文本|文字]]}}
| <code>table-nightly</code> || {{tl|nightly}} || {{nightly}} || {{tlp|nightly|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nightly|Customized [[Plain text|text]]}}
|-
|-
| <code>table-release-candidate</code> || {{tl|release-candidate}} || {{release-candidate}} || {{tlp|release-candidate|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{release-candidate|自定义[[纯文本|文字]]}}
| <code>table-release-candidate</code> || {{tl|release-candidate}} || {{release-candidate}} || {{tlp|release-candidate|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{release-candidate|Customized [[Plain text|text]]}}
|-
|-
| <code>table-draw</code> || {{tl|draw}} || {{draw}} || {{tlp|draw|文字}} || {{draw|文字}}
| <code>table-draw</code> || {{tl|draw}} || {{draw}} || {{tlp|draw|Text}} || {{draw|Text}}
|-
|-
| <code>table-planned</code> || {{tl|planned}} || {{planned}} || {{tlp|planned|2018年7月}} || {{planned|2018年7月}}
| <code>table-planned</code> || {{tl|planned}} || {{planned}} || {{tlp|planned|July 2018}} || {{planned|July 2018}}
|-
|-
| <code>table-scheduled</code> || {{tl|scheduled}} || {{scheduled}} || {{tlp|scheduled|2017年3月3日}} || {{scheduled|2017年3月3日}}
| <code>table-scheduled</code> || {{tl|scheduled}} || {{scheduled}} || {{tlp|scheduled|3 March 2017}} || {{scheduled|3 March 2017}}
|-
|-
| <code>incorrect</code> || {{tl|incorrect}} || {{incorrect}} || {{tlp|incorrect|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{incorrect|自定义[[纯文本|文字]]}}
| <code>incorrect</code> || {{tl|incorrect}} || {{incorrect}} || {{tlp|incorrect|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{incorrect|Customized [[Plain text|text]]}}
|-
|-
| <code>noresult</code> || {{tl|no result}} || {{no result}} || {{tlp|no result|N.R.}} || {{no result|N.R.}}
| <code>noresult</code> || {{tl|no result}} || {{no result}} || {{tlp|no result|N.R.}} || {{no result|N.R.}}
|-
|-
|rowspan=8| ''no class'' || {{tl|CMain}} || {{CMain}} || {{tlp|CMain|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{CMain|自定义[[纯文本|文字]]}}
|rowspan=8| ''no class'' || {{tl|CMain}} || {{CMain}} || {{tlp|CMain|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CMain|Customized [[Plain text|text]]}}
|-
|-
| {{tl|CAlso starring}} || {{CAlso starring}} || {{tlp|CAlso starring|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{CAlso starring|自定义[[纯文本|文字]]}}
| {{tl|CAlso starring}} || {{CAlso starring}} || {{tlp|CAlso starring|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CAlso starring|Customized [[Plain text|text]]}}
|-
|-
| {{tl|CRecurring}} || {{CRecurring}} || {{tlp|CRecurring|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{CRecurring|自定义[[纯文本|文字]]}}
| {{tl|CRecurring}} || {{CRecurring}} || {{tlp|CRecurring|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CRecurring|Customized [[Plain text|text]]}}
|-
|-
| {{tl|CGuest}} || {{CGuest}} || {{tlp|CGuest|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{CGuest|自定义[[纯文本|文字]]}}
| {{tl|CGuest}} || {{CGuest}} || {{tlp|CGuest|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CGuest|Customized [[Plain text|text]]}}
|-
|-
| {{tl|CNone}} || {{CNone}} || {{tlp|CNone|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{CNone|自定义[[纯文本|文字]]}}
| {{tl|CNone}} || {{CNone}} || {{tlp|CNone|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CNone|Customized [[Plain text|text]]}}
|-
|-
| {{tl|nocontest}} || {{nocontest}} || {{tlp|nocontest|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{nocontest}}自定义[[纯文本|文字]]
| {{tl|nocontest}} || {{nocontest}} || {{tlp|nocontest|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nocontest}}Customized [[Plain text|text]]
|-
|-
| {{tl|not yet}} || <s><nowiki>{{not yet}}</nowiki></s> || {{tlp|not yet|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || <s><nowiki>{{not yet|自定义[[纯文本|文字]]}}</nowiki></s>
| {{tl|not yet}} || {{not yet}} || {{tlp|not yet|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{not yet|Customized [[Plain text|text]]}}
|-
|-
| {{tl|optional}} || {{optional}} || {{tlp|optional|<nowiki>自定义[[纯文本|文字]]</nowiki>}} || {{optional|自定义[[纯文本|文字]]}}
| {{tl|optional}} || {{optional}} || {{tlp|optional|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{optional|Customized [[Plain text|text]]}}
|}</div>
|}</div>


第212行: 第211行:
{{TemplateDataHeader}}
{{TemplateDataHeader}}
<templatedata>{
<templatedata>{
"description": "One of several templates for styling individual table cells with standard contents and colors.",
"description": "使用统一的内容和颜色,各种表格单元格模板之一。",
"params": {
"params": {
"1": {
"1": {
"label": "text",
"label": "text",
"description": "text to be displayed instead of the default, if this doesn't work put the text after the template, 有可能 with a vertical bar | in between",
"description": "text to be displayed instead of the default, if this doesn't work put the text after the template, possibly with a vertical bar | in between",
"type": "string/line",
"type": "string/line",
"default": "(取决于模板)",
"default": "(template dependent)",
"required": false
"required": false
},
},
第225行: 第224行:
"description": "text alignment inside the cell, either 'left', 'right', 'center' or 'justified'",
"description": "text alignment inside the cell, either 'left', 'right', 'center' or 'justified'",
"default": "center",
"default": "center",
"inherits": "1"
"inherits": "1"
},
},
"style": {
"style": {
第231行: 第230行:
"description": "a semicolon separated list of additional CSS rules to be applied to the table cell",
"description": "a semicolon separated list of additional CSS rules to be applied to the table cell",
"default": "",
"default": "",
"inherits": "1"
"inherits": "1"
},
},
"color": {
"color": {
"label": "background color",
"label": "background color",
"description": "a valid CSS color value or name to override the standard the cell background, only available with some templates",
"description": "a valid CSS color value or name to override the standard the cell background, only available with some templates",
"inherits": "1"
"inherits": "1"
}
}
}}</templatedata>
}}</templatedata>


== 参见 ==
== See also ==
* {{tl|change}}: Calculates, displays and color-codes changes between two values
* {{tl|Change}} – calculates, displays and color-codes changes between two values
* {{tl|BSD-lic}}: Specialized redirect for {{tlf|free}}
* {{tl|BSD-lic}} – specialized redirect for {{tlf|free}}
* {{tl|GPL-lic}}: Specialized redirect for {{tlf|free}}
* {{tl|GPL-lic}} – specialized redirect for {{tlf|free}}
* {{tl|LGPL-lic}}: Specialized redirect for {{tlf|free}}
* {{tl|LGPL-lic}} – specialized redirect for {{tlf|free}}


== 注释 ==
== Notes ==
{{reflist}}
{{reflist}}



2018年7月14日 (六) 08:10的版本

The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background. They are commonly used in comparison tables.

For example, {{yes}} makes a cell with a green background. The text in the cell is taken from the first parameter; {{yes|Sure}} would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: {{table cell template}} text or {{table cell template}} | text. This information, the colors and default texts are found in the table below.

If you want to use other attributes for the table cells, e.g. colspan or rowspan, they need to be put before the template call and there must be no vertical bar | in between them:

不適用
是/否
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Yes-No}}
...

模板

Table cell templates
Class[1] Default syntax Preview (default) Customized syntax Preview (customized)
table-rh {{rh}} | Row header[2] Row header {{rh|align=right}} | Row header Row header
{{rh2}} | Row header[2] Row header {{rh2|align=right}} | Row header Row header
table-yes {{yes}} {{yes|Customized [[Plain text|text]]}} Customized text
table-maybe {{maybe}} 可能 {{maybe|Customized [[Plain text|text]]}} Customized text
table-no {{no}} {{no|Customized [[Plain text|text]]}} Customized text
{{eliminated}} 淘汰 {{eliminated|Dropped out}} Dropped out
{{active fire|12%}} 活跃(12%)
{{lost}} 失败 {{lost|Missing}} Missing
{{safe}} 安全 {{safe|Protected}} Protected
table-active {{active}} 活跃 {{active|Lively}} Lively
table-siteactive {{site active}} 活跃 {{site active|Up}} Up
{{coming soon}} 即将到来 {{coming soon|Second half of the year}} Second half of the year
table-siteinactive {{site inactive}} 不活跃 {{site inactive|Down}} Down
table-yes2 {{good}} {{good}} {{good|A}} {{good|A}}
{{yes2}} {{yes2|Text}} Text
{{ya}} 是 {{ya|text=Ya}} Ya
{{ya|Ya}} Ya {{ya|text|link=WP:ALT}} text
{{won}} 獲獎 {{won|text=white|color=darkblue}} 獲獎
{{won|place=1}} 1 {{won|place=Gold}} Gold
{{won|place=2}} 2 {{won|place=Silver}} Silver
{{won|place=3}} 3 {{won|place=Bronze}} Bronze
table-no2 {{no2}} {{no2|Text}} Text
{{na}} 否 {{na|text=Na}} Na
{{na|Na}} Na {{na|text|link=WP:ALT}} text
{{nom}} 提名 {{nom|5}} 5
{{sho}} 入圍短名單 {{sho|Proposed}} Proposed
{{longlisted}} 入圍初选名单 {{longlisted|Rejected}} Rejected
{{TBA}} 待公布 {{TBA|To be announced}} To be announced
table-success {{success}} 成功 {{success|Mission complete}} Mission complete
{{operational}} 运作中 {{operational|Returning data}} Returning data
table-failure {{failure}} 失败 {{failure|Wrong orbit}} Wrong orbit
table-partial {{partial}} 部份 {{partial|Almost done}} Almost done
{{Regional}} 区域 {{Regional|Uyghur}} Uyghur
{{MaybeCheck}} 也许 {{MaybeCheck|text=Possibly}} Possibly
{{MaybeCheck|Possibly}} Possibly {{MaybeCheck|text|link=WP:ALT}} text
{{partial success}} 部分成功 {{partial success|Reached orbit and returned pictures}} Reached orbit and returned pictures
{{partial failure}} 部分失败 {{partial failure|[[Cubesat]] not deployed}} Cubesat not deployed
{{okay}} 中立 {{okay|C}} C
{{Yes-No}} 是/否 {{Yes-No|Yes with an if; no with a but}} Yes with an if; no with a but
{{some}} 某些 {{some|Many}} Many
{{nonpartisan}} Nonpartisan {{nonpartisan|Impartial}} Impartial
{{pending}} 待定 {{pending|Awaiting}} Awaiting
{{unofficial}} 非官方 {{unofficial|''De facto''}} De facto
{{unofficial2}} 非官方 {{unofficial2|''De facto''}} De facto
{{usually}} 普遍 {{usually|Commonly}} Commonly
{{rarely}} 罕见 {{rarely|Seldom}} Seldom
{{sometimes}} 偶尔 {{sometimes|Occasionally}} Occasionally
table-any {{any}} 任意 {{any|Anyone}} Anyone
table-na {{n/a}} 不適用 {{n/a|Unavailable}} Unavailable
{{varies}} 不定 {{varies|Differs}} Differs
{{sdash}} {{sdash|[[File:Dash.svg|13px|link=|dash icon]]}} dash
{{BLACK}} 不适用 {{BLACK|Banned}} Banned
{{non-album single}} 非专辑单曲 {{non-album single|Customized [[Plain text|text]]}} 非专辑单曲
{{unreleased}} 未发布 {{unreleased|Customized [[Plain text|text]]}} Customized text
table-unknown {{unknown}} 未知 {{unknown|?}} ?
{{dunno}} ? {{dunno|Not sure}} Not sure
table-automatic {{perhaps}} 也许 {{perhaps|Customized [[Plain text|text]]}} Customized text
table-depends {{depends}} 依情況 {{depends|Customized [[Plain text|text]]}} Customized text
table-included {{included}} 入选 {{included|Incorporated}} Incorporated
table-dropped {{dropped}} 抛弃 {{dropped|Discontinued}} Discontinued
{{terminated}} 终止 {{terminated|Fired}} Fired
table-beta {{beta}} Beta {{beta|Preview}} Preview
table-experimental {{table-experimental}} 實驗性質 {{table-experimental|Customized [[Plain text|text]]}} Customized text
table-free {{free}} 免费 {{free|Customized [[Plain text|text]]}} Customized text
table-proprietary {{proprietary}} 专有 {{proprietary|Customized [[Plain text|text]]}} Customized text
table-nonfree {{nonfree}} 付费 {{nonfree|Customized [[Plain text|text]]}} Customized text
table-needs {{needs}} 需要 {{needs|Customized [[Plain text|text]]}} Customized text
table-nightly {{nightly}} 每日构建 {{nightly|Customized [[Plain text|text]]}} Customized text
table-release-candidate {{release-candidate}} 候选版本 {{release-candidate|Customized [[Plain text|text]]}} Customized text
table-draw {{draw}} {{draw|Text}} Text
table-planned {{planned}} 计划 {{planned|July 2018}} July 2018
table-scheduled {{scheduled}} 排定日程 {{scheduled|3 March 2017}} 3 March 2017
incorrect {{incorrect}} 不正確 {{incorrect|Customized [[Plain text|text]]}} Customized text
noresult {{no result}} 无结果 {{no result|N.R.}} N.R.
no class {{CMain}} 主演 {{CMain|Customized [[Plain text|text]]}} Customized text
{{CAlso starring}} 群演 {{CAlso starring|Customized [[Plain text|text]]}} Customized text
{{CRecurring}} 常設 {{CRecurring|Customized [[Plain text|text]]}} Customized text
{{CGuest}} 客串 {{CGuest|Customized [[Plain text|text]]}} Customized text
{{CNone}} Does not appear {{CNone|Customized [[Plain text|text]]}} Customized text
{{nocontest}} {{nocontest|Customized [[Plain text|text]]}} Customized text
{{not yet}} 尚不可用 {{not yet|Customized [[Plain text|text]]}} Customized text
{{optional}} 可选 {{optional|Customized [[Plain text|text]]}} Customized text

Code

Common code to most if not all the templates in this series:

style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="automatic table-automatic skin-invert"| {{{1|text}}}

Code specific to this template:

style="background: white; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="Table cell templates table-Table cell templates skin-invert"| {{{1|{{{text}}}}}}

To make a new table cell template you can use:

{{subst:Table cell templates|text= default text |bg= background color |class= a class name without prefix |align= standard horizontal alignment}}

You should leave out the align parameter and often the class parameter is unnecessary, too.

Add the new template to the table in the common documentation afterwards. Please consider reusing one of the other templates and please choose the color sensibly.

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template! Instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

style="background: #abcdef; color: black; vertical-align: middle; text-align: center; " class="automatic table-automatic"| text

TemplateData

以下是该模板的模板数据,适用于可视化编辑器等工具。

Table cell templates模板数据

One of several templates for styling individual table cells with standard contents and colors.

模板参数

参数描述类型状态
text1

text to be displayed instead of the default, if this doesn't work put the text after the template, possibly with a vertical bar | in between

默认值
(template dependent)
单行文本可选
horizontal alignalign

text alignment inside the cell, either 'left', 'right', 'center' or 'justified'

默认值
center
单行文本可选
stylestyle

a semicolon separated list of additional CSS rules to be applied to the table cell

默认值
单行文本可选
background colorcolor

a valid CSS color value or name to override the standard the cell background, only available with some templates

默认值
(template dependent)
单行文本可选

See also

  • {{Change}} – calculates, displays and color-codes changes between two values
  • {{BSD-lic}} – specialized redirect for {{free}}
  • {{GPL-lic}} – specialized redirect for {{free}}
  • {{LGPL-lic}} – specialized redirect for {{free}}

Notes

  1. ^ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. ^ 2.0 2.1 Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.