模板:NoteTA/doc

来自About High Performance
Sxzhang讨论 | 贡献2023年11月7日 (二) 17:24的版本 (导入1个版本)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files

文件:Chinese conversion.svg 字词转换
主页 讨论
轉換請求
错误修复请求
地区词候选
轉換介紹
字詞轉換處理 讨论
  繁简处理 讨论
  地区词处理 讨论
  公共轉換組 讨论
-{zh-tw:說明;zh-hk:幫助;zh-cn:帮助;}--{zh-tw:文件;zh-cn:文档;}-
繁简与地区词处理 讨论
  转换原理 讨论
  手工轉換 讨论
  -{zh-cn:高级; zh-tw:進階;}-语法 讨论
  显示模式选择说明
相關模板
NoteTA 全文字詞轉換
CGroup 公共轉換組列表
Lan -{zh-tw:介面;zh-cn:界面;}-文字轉換
地区用词 地區詞模板
地区用词2 進階地區詞模板
各地中文名 地區用詞-{zh-tw:資訊;zh-cn:信息;}-框
-{zh-cn:查看; zh-tw:檢視}- - 讨论 - 编辑 - 变动

本模板用於定義頁面的地區詞(簡繁)轉換規則,一般置於頁面頂端

本模板每調用一次,條目閱讀介面頂部就會出現一個NoteTA标志(本页使用了标题或全文手工转换)。用戶可以點擊該圖示,檢視具體的轉換資訊。

使用說明

用法: -{zh-hans:<syntaxhighlight lang="wikitext"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>;zh-hant:<syntaxhighlight lang="wikitext"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>}-

  • |T=(標題轉換) — 控制頁面標題的轉換。如|T=zh-cn:雷霆 (最终幻想);zh-tw:雷光;。通常情況下,正確使用下述的「公共轉換組」和「個別用詞轉換」參數即可正確轉換標題,因此一般不需要填寫本參數。
  • |G1=|G30=(公共转换组) — 导入已定义好的公共转换组,批量載入轉換規則。如|G1=Physics表示載入物理学轉換組定義的一系列規則。
  • |1=|30=(個別用詞轉換) — 單獨定義用詞轉換。如|1=zh-cn:信息;zh-tw:資訊;表示爲頁面加入「-{信息}-/-{資訊}-」的轉換。

示例

全文转换

下例爲頁面加入兩條規則「-{量子计算机}-/-{量子電腦}-」和「-{信息}-/-{資訊}-」兩條轉換規則。 <syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight> 爲方便書寫及調整順序,一般也可以省略|1=|2=,直接以匿名參數寫成: <syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>

使用單向轉換規則

維持無歧義的用詞雙向轉換,再將有歧義的用詞單向轉換,而條目內則採無歧義用詞,也就無需都要單向轉換還得一一對應。雖「字詞轉換」方框仍顯示紅字「在手动语言转换规则中检测到错误」,但不影響運作。 <syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight> 注意,單向轉換規則中含有「=」字元。如果試圖對單向轉換規則使用匿名參數,就會導致模板解讀參數錯誤。如果希望使用匿名參數,請爲單向轉換規則編一個較大的序號,如; -{zh-hans:<syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>;zh-hant:<syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>}-

指定不转换

<syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight> 當無設定標的時,則指定用詞不轉換。勿加「;」,否則會視為不完整的單向轉換規則而無作用。

轉換組轉換

在《變形金剛》電影導演麥可·貝的條目中,可透過|G1=變形金剛直接引入Template:CGroup/變形金剛中定義的規則。 <syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight> 需注意,組轉換調用的是對應子頁面Template:CGroup/變形金剛,所以結尾勿加入「;」,否則會視為調用不存在的Template:CGroup/變形金剛;而無效。

直接引用公共转换组有很多好处,方便在同一领域和主题的条目中共用,方便维护,没有个数限制,可单向转换。您可在Template:CGroup/list頁面搜尋可用的公共轉換組,或檢視Category:公共轉換組模板分類。關於公共轉換組的詳細說明和創建過程可查閱Wikipedia:字詞轉換處理/公共組轉換

當頁面載入多個轉換組時,由於后匯入的轉換組優先,因此請先載入較寬泛的轉換組,後載入較專精的轉換組。例如對於遊戲硬體條目,請使用{{NoteTA|G1=IT|G2=Games}}而非{{NoteTA|G1=Games|G2=IT}}。只有將更專門的Games轉換組放在後方,才能覆蓋IT轉換組的過度轉換規則。

標題轉換

對於雷霆 (最终幻想)條目,因大陸譯名「雷霆」另有條目佔據,標題需加消歧義括號,而臺港譯名「雷光」因沒有同名條目,不需要消歧義括號。此時使用標題轉換,即可解決標題消歧義括號不對等的問題。 <syntaxhighlight lang="wikitext" style="width: 80%; margin: auto;"> Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files </syntaxhighlight>

进阶使用说明

  • 本模板還有|dt=|d1=|d2=等參數。此參數用於給轉換規則加註說明,讀者點擊頁面頂部的NoteTA圖示時,將可以看到註釋內容。
  • 本模板規則的實質是模擬-{H|...}-語法,該語法只能轉換其後方的原始碼,因此{{NoteTA}}必須置於頁面開頭。User:Cewbot/log/20191129/configuration會嘗試將-{A|...}--{H|...}-合併至{{NoteTA}}。

其他注意事項

  • 如果標題有地區詞差異,請順道為各地區的標題建立重定向頁,因為填寫NoteTA並不會自動建立地區標題重定向。
  • 若某條目掛有Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files,表示需要加入人工地區詞轉換模板Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files。詳見需要NoteTA模板的頁面
  • 如果要在模板内使用本模板,请将本模板用<syntaxhighlight lang="wikitext" inline>……</syntaxhighlight>包圍,避免与包含其的页面的NoteTA模板产生冲突(特点为条目标题栏仍有一个NoteTA的标志)。另外noinclude组合与其后的模板源码之间不要有空格或換行,否则会在嵌入模板的页面插入空行。

模板数据

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template in articles based on this TemplateData.

TemplateData for NoteTA

Lua错误:无法创建进程:proc_open(): unable to create pipe Too many open files

<templatedata> { "description": "本模板用来在一个页面裡,转换不同地区的翻译用语或指定特定的标题。", "params": { "1": { "label": "1", "description": "第1条转换用词", "type": "string", "required": false, "example": "zh-cn:陆;zh-hk:港;zh-sg:马;zh-tw:臺;" }, "2": { "label": "2", "description": "第2条转换用词", "type": "string", "required": false }, "3": { "label": "3", "description": "第3条转换用词", "type": "string", "required": false }, "4": { "label": "4", "description": "第4条转换用词", "type": "string", "required": false }, "5": { "label": "5", "description": "第5条转换用词", "type": "string", "required": false }, "6": { "label": "6", "description": "第6条转换用词", "type": "string", "required": false }, "7": { "label": "7", "description": "第7条转换用词", "type": "string", "required": false }, "8": { "label": "8", "description": "第8条转换用词", "type": "string", "required": false }, "9": { "label": "9", "description": "第9条转换用词", "type": "string", "required": false }, "10": { "label": "10", "description": "第10条转换用词", "type": "string", "required": false }, "T": { "label": "T", "description": "标题的公共转换规则", "type": "string", "required": false, "example": "zh-cn:大陆标题;zh-hk:港澳標題;zh-sg:马新标题;zh-tw:臺灣標題;" }, "G1": { "label": "G1", "description": "第1项公共转换组", "type": "string", "required": false, "example": "MediaWiki" }, "G2": { "label": "G2", "description": "第2项公共转换组", "type": "string", "required": false }, "G3": { "label": "G3", "description": "第3项公共转换组", "type": "string", "required": false }, "G4": { "label": "G4", "description": "第4项公共转换组", "type": "string", "required": false }, "G5": { "label": "G5", "description": "第5项公共转换组", "type": "string", "required": false }, "G6": { "label": "G6", "description": "第6项公共转换组", "type": "string", "required": false }, "G7": { "label": "G7", "description": "第7项公共转换组", "type": "string", "required": false }, "G8": { "label": "G8", "description": "第8项公共转换组", "type": "string", "required": false }, "G9": { "label": "G9", "description": "第9项公共转换组", "type": "string", "required": false }, "G10": { "label": "G10", "description": "第10项公共转换组", "type": "string", "required": false } }, "paramOrder": [ "T", "G1", "G2", "G3", "G4", "G5", "G6", "G7", "G8", "G9", "G10", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ], "format": "block" } </templatedata>