אונטערשייד צווישן ווערסיעס פון "יחידה:High-use"

10 בייטן אראפגענומען ,  פֿאַר 1 יאָר
ק
1 רעוויזיע אימפארטירט פון wikipedia:en:Module:High-use
ק (1 רעוויזיע אימפארטירט: אימפארטירט פון די ענגלישע וויקיפעדיע, זע ביישטייערער ליסטע)
ק (1 רעוויזיע אימפארטירט פון wikipedia:en:Module:High-use)
 
(3 מיטלסטע ווערסיעס פון 3 באַניצער נישט געוויזן.)
שורה 18: שורה 18:
if count == nil then
if count == nil then
if frame.args[1] == "risk" then
if frame.args[1] == "risk" then
return_value = "a very large number of"
return "a very large number of"
else
else
return_value = "many"
return "many"
end
end
else
else
שורה 52: שורה 52:
return return_value
return return_value
end
end
-- Actions if there is a large (greater than or equal to 100,000) transclusion count
-- Actions if there is a large (greater than or equal to 100,000) transclusion count
function p.risk(frame)
function p.risk(frame)
local return_value = ""
if frame.args[1] == "risk" then
if frame.args[1] == "risk" then
return_value = "risk"
return "risk"
else
else
local count = _fetch(frame)
local count = _fetch(frame)
if count and count >= 100000 then return_value = "risk" end
if count and count >= 100000 then
return "risk"
end
end
end
return return_value
return ""
end
end


שורה 87: שורה 89:
-- This retrieves the project URL automatically to simplify localiation.
-- This retrieves the project URL automatically to simplify localiation.
local templateCount = ('on [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s pages]'):format(
local templateCount = ('on [https://linkcount.toolforge.org/?project=%s&page=%s#transclusions %s pages]'):format(
mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'),
mw.title.getCurrentTitle():fullUrl():gsub('//(.-)/.*', '%1'),
mw.uri.encode(title.fullText), p.num(frame, count))
mw.uri.encode(title.fullText), p.num(frame, count))
שורה 146: שורה 148:
local nocat = frame:getParent().args['nocat'] or frame.args['nocat']
local nocat = frame:getParent().args['nocat'] or frame.args['nocat']
local categorise = (nocat == '' or not yesno(nocat))
local categorise = (nocat == '' or not yesno(nocat))
if categorise then
if categorise and not mw.title.getCurrentTitle().isRedirect then
epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}')
epilogue = frame:preprocess('{{Sandbox other||{{#switch:{{#invoke:Effective protection level|{{#switch:{{NAMESPACE}}|File=upload|#default=edit}}|{{FULLPAGENAME}}}}|sysop|templateeditor|interfaceadmin=|#default=[[Category:Pages used in system messages needing protection]]}}}}')
end
end