Module:High-use:修订间差异
小 导入1个版本 |
无编辑摘要 |
||
| 第2行: | 第2行: | ||
local _fetch = require('Module:Transclusion_count').fetch | local _fetch = require('Module:Transclusion_count').fetch | ||
local yesno = require('Module:Yesno') | |||
local nspn = mw.getCurrentFrame():preprocess('{{Namespace pagename}}') | local nspn = mw.getCurrentFrame():preprocess('{{Namespace pagename}}') | ||
local _separated_entries = require('Module:Separated entries').main | local _separated_entries = require('Module:Separated entries').main | ||
local approx_num_total_pages = 8431774 --截至2026-07-14 | |||
function p.num(frame, count) | function p.num(frame, count) | ||
| 第36行: | 第40行: | ||
-- Insert percent of pages | -- Insert percent of pages | ||
if | if count and count >= approx_num_total_pages/100 or yesno(frame.args['all-pages']) then | ||
local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) | local percent = math.floor( ( (count/frame:callParserFunction('NUMBEROFPAGES', 'R') ) * 100) + 0.5) | ||
return_value = string.format("%s,佔全部頁面的%s%%", return_value, percent) | return_value = string.format("%s,佔全部頁面的%s%%", return_value, percent) | ||
| 第75行: | 第79行: | ||
end | end | ||
local templatecount = string.format(" | local templatecount = string.format("//linkcount.toolforge.org/?project=zh.wikipedia.org&page=%s#transclusions", mw.uri.encode(title.fullText)) | ||
local used_on_text = string.format("'''%s被引用於[%s %s]'''", | local used_on_text = string.format("'''%s被引用於[%s %s]'''", | ||
| 第95行: | 第99行: | ||
info = "<br />" .. frame.args["info"] | info = "<br />" .. frame.args["info"] | ||
end | end | ||
sandbox_text = string.format("。%s<br /><small>為了避免造成大規模的影響,所有對此%s的編輯應先於%s上測試。 | sandbox_text = string.format("。%s<br /><small>為了避免造成大規模的影響,所有對此%s的編輯應先於%s上測試。", | ||
info, nspn, sandbox_text | info, nspn, sandbox_text | ||
) | ) | ||
local discussion_text = | local discussion_text = "实施修改前,建议先在" | ||
if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then | if frame.args["2"] and frame.args["2"] ~= "" and frame.args["2"] ~= "yes" then | ||
discussion_text = string.format("%s'''[[%s]]'''", discussion_text, frame.args["2"]) | discussion_text = string.format("%s'''[[%s]]'''", discussion_text, frame.args["2"]) | ||