模板討論:Documentation

頁面內容不支援其他語言。
維基百科,自由的百科全書

模版部份未翻譯

模版中的

for editors to experiment.

未翻譯為中文。—Chunchun2345 (留言) 2009年6月28日 (日) 06:37 (UTC)[回覆]

完成,已翻譯。—街燈電箱150號 開箱維修 抄錶 檢驗證明 2009年6月28日 (日) 06:47 (UTC)[回覆]

未翻譯

{{editprotected}}

Template documentation
The above documentation is transcluded from Template:Documentation/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and testcases (create) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.
均需翻译。

--UAL55 (留言) 2010年7月14日 (三) 01:26 (UTC)[回覆]

麻煩你把上面的內容翻譯好後貼在這裏,然後再由管理員複製到模板中。--用心閣(對話頁) 2010年7月14日 (三) 04:27 (UTC)[回覆]
我錯誤地從英文維基百科複製並覆蓋了相同模板。已回退。Liangent (留言) 2010年7月14日 (三) 15:44 (UTC)[回覆]

英文

{{editprotected}}同上。

reverted 不知道shizhao在幹什麼 Liangent (留言) 2010年7月27日 (二) 07:50 (UTC)[回覆]

追加「清除緩存」按鈕

{{editprotected}} <!--** /doc 存在** -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 編輯]]

加上:

<!--** /doc 存在** -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=purge}} 清除緩存]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 編輯]]

因為有時候就算是在Firefox按ctrl/shift+F5都依然未能刷新出doc頁的新版本,必須手動進行purge。-- 同舟留言2012年3月27日 (二) 02:53 (UTC)[回覆]

完成 Liangent (留言) 2012年3月27日 (二) 09:16 (UTC)[回覆]
貌似應該讓用戶purge後看模板頁較好。Liangent (留言) 2012年3月27日 (二) 09:19 (UTC)[回覆]

::增加purge按鈕就是為了在模板本頁看到doc更新後的效果。還有有一點不懂的是,追加purge按鈕後其生成的地址居然額外多了版本的代碼,是mediawiki更新v1.19後修訂的?-- 同舟留言2012年3月27日 (二) 09:44 (UTC)[回覆]

Documentation

English: I would like to add these updated codes please

<!--
  Automatically add {{template sandbox notice}} when on a /sandbox page.
-->{{#ifeq: {{SUBPAGENAME}} | sandbox
| <div style="clear: both;"></div>{{template sandbox notice|{{{livepage|}}}}}
}}<!--
  Automatically add {{pp-template}} to protected templates.
-->{{template other
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
  | {{pp-template|docusage=yes}}
  | {{#if: {{PROTECTIONLEVEL:edit}}
    | {{pp-template|docusage=yes}}
    | <!--Not protected, or only semi-move-protected-->
    }}
  }}
}}<!--
  Start of green doc box.
-->{{documentation/start box2
| preload = {{{preload|}}}   <!--Allow custom preloads-->
| heading = {{{heading|¬}}}   <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}

<!--Some namespaces must have the /doc, /sandbox and /testcases 
    in talk space-->
| docspace = {{documentation/docspace}}

| 1 = {{{1|}}}   <!--Other docname, if fed-->

<!--The namespace is added in /start box2-->
| template page = {{documentation/template page}}

}}<!-- Start content --><!--
  Start load the /doc content:
  Note: The line breaks between this comment and the next line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->
{{#switch: {{#if:{{{content|}}}|1|0}}{{#if:{{{1|}}}|1|0}}{{#ifexist:{{{1|}}}|1|0}}{{#ifexist:{{documentation/docspace}}:{{documentation/template page}}/doc|1|0}}
| 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110 
| 1111 = {{{content|}}}
| 0110 | 0111 = {{ {{{1}}} }}
| 0001 | 0011 = {{ {{documentation/docspace}}:{{documentation/template page}}/doc }}
| 0000 | 0100 | 0010 | 0101 = 
}}
<!--
  End load the /doc content:
  Note: The line breaks between this comment and the previous line are necessary
  so  "=== Headings ===" at the start and end of docs are interpreted.
-->{{documentation/end box2
| preload = {{{preload|}}}   <!--Allow custom preloads-->
| content = {{{content|}}}
| link box = {{{link box|}}}   <!--So "link box=off" works-->

<!--Some namespaces must have the /doc, /sandbox and /testcases 
    in talk space-->
| docspace = {{documentation/docspace}}

| 1 = {{{1|}}}   <!--Other docname, if fed-->

<!--The namespace is added in /end box2-->
| template page = {{documentation/template page}}

}}<!--
  End of green doc box
--><noinclude>

<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

90.222.250.124留言2013年1月12日 (六) 00:05 (UTC)[回覆]

[刷新]

「[刷新]」這個字符位於何處?請求加上字詞轉換。

「[-{zh-hans:刷新; zh-hant:重新整理;}-]」或者「[-{zh-hans:刷新缓存; zh-hant:清除快取;}-]」。-- By LNDDYL.(留言2014年6月14日 (六) 03:01 (UTC)[回覆]

希望能把模板/模塊文檔也Lua化

{{editprotected}} 也就是希望導入en:Module:Documentation吳語版剛剛導入了這一模塊。--Liuxinyu970226留言2014年11月4日 (二) 08:00 (UTC)[回覆]

已導入,按照英文維百,應該用這種方式調用:
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
-- 2014年11月24日 (一) 05:15 (UTC)[回覆]
這裏有一個示範。-- 2014年11月26日 (三) 10:59 (UTC)[回覆]
意義是?--Jimmy Xu 2014年11月26日 (三) 14:10 (UTC)[回覆]
剛才發現這個模板已經搞定了,感謝導入這個模塊的管理員。-- 2017年1月4日 (三) 17:11 (UTC)[回覆]

模板文檔的綠色背景能改回來嗎


近幾天書生把模板文檔頁的底色改成了藍色,說是為了配合mw的新版配色方案。但絕大多數語種的wiki模板文檔頁還是綠色背景,突然改成藍色未免有些奇怪,不知可不可以改回來。--Dabao qian留言2017年2月5日 (日) 13:38 (UTC)[回覆]

 已修復,應該是改的時候不留神改多了--百無一用是書生 () 2017年2月6日 (一) 13:08 (UTC)[回覆]

編輯請求

請求已處理

我希望把「模板文檔」中的「清除」換成「清除緩存」,因為「清除」容易被誤解為清除文檔本身。 --CRSKY留言2017年6月8日 (四) 10:45 (UTC)[回覆]

這個沒什麼問題,放幾天看沒意見我就改了。(其實模塊:Documentation/config沒有被保護,樓主可以自己改……) --碸中嘌呤的白磷萃取 打譜 2017年6月8日 (四) 11:17 (UTC)[回覆]
完成。 --碸中嘌呤的白磷萃取 打譜 2017年6月9日 (五) 04:36 (UTC)[回覆]
現在模塊:Documentation/config被保護了。--SolidBlock留言 2017年8月5日 (六) 10:39 (UTC)[回覆]

對模塊中一些內容的細節的問題

比如,模塊中定義了makeToolbar函數,為什麼還有複製到p.makeToolbar?是不是如果函數不輸出到p中則無法使用(我沒有遇到過這樣的情況)?或者是為了在調試控制台中使用?還是為了讓其他的模塊中使用(沒有發現任何模塊中出現了require("Module:Documentation")這樣的詞)。此外,為什麼要將內容文字單獨保存到/config頁面?直接調用字符串也很方便啊。此外,裏面一些參數轉來轉去,例如p.renderStartBoxLinks函數中,直接將data.docTitle和data.title代入到makeWikiLink貨makeUrlLink函數中即可,為什麼要先複製到局部變量docTitle和title再去代入函數?(我猜測是為了代碼略微簡略一些。)--SolidBlock留言 2017年8月5日 (六) 10:38 (UTC)[回覆]

應該是考慮兼容性和移植性。--SolidBlock留言 2019年10月25日 (五) 15:47 (UTC)[回覆]

編輯請求 2021-04-24

請求已處理--Xiplus#Talk 2021年5月1日 (六) 13:34 (UTC)[回覆]

742行:

text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"

請修改為:

text = text .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"

理由:中文標點符號之後不需要有空格。目前「請在/doc子頁面中添加分類。」和「本模板的子頁面。」中間有一個空格,顯然是因為該代碼從英文維基百科複製時沒有注意到這一點。--Tranve () 2021年4月24日 (六) 07:29 (UTC)[回覆]

此兩小句之間無關聯,不加空格可能會讓人引起此兩句之間有關聯的誤會,造成理解上的障礙。--LaMagiaaa 2021年4月26日 (一) 05:29 (UTC)[回覆]
我認為不會。一般人不仔細看的話甚至根本不會注意到這裏還有一個空格。另外,中文標點符號後不加空格應該是規範。英文維基百科的本模板也只是加了一個空格(因為英文標點符號後應該加一個空格),並沒有多餘的空隙,說明沒有引起理解上的障礙。--Tranve () 2021年5月1日 (六) 01:08 (UTC)[回覆]