Diferencia entre revisiones de «Módulo:High-use»

Ir a la navegación Ir a la búsqueda
63 bytes añadidos ,  28 may 2021
m
Tidy full stops
m (1 revision imported)
template:Pp>GKFX
m (Tidy full stops)
Línea 60: Línea 60:
-- Only show the information about how this template gets updated if someone
-- Only show the information about how this template gets updated if someone
-- is actually editing the page and maybe trying to update the count.
-- is actually editing the page and maybe trying to update the count.
local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]]</small>)." or ''
local bot_text = (frame:preprocess("{{REVISIONID}}") == "") and "\n\n----\n'''Preview message''': Transclusion count updated automatically ([[Template:High-use/doc#Technical details|see documentation]])." or ''
if count == nil then count = _fetch(frame) end
if count == nil then count = _fetch(frame) end
Línea 73: Línea 73:
end
end
local templateCount = ('on [https://templatecount.toolforge.org/index.php?lang=en&namespace=%s&name=%s %s pages].'):format(
local templateCount = ('on [https://templatecount.toolforge.org/index.php?lang=en&namespace=%s&name=%s %s pages]'):format(
mw.title.getCurrentTitle().namespace, mw.uri.encode(title.text), p.num(frame, count))
mw.title.getCurrentTitle().namespace, mw.uri.encode(title.text), p.num(frame, count))
local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used ';
local used_on_text = "'''This " .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' is used ';
if systemMessages then
if systemMessages then
used_on_text = used_on_text .. systemMessages ..
used_on_text = used_on_text .. systemMessages ..
((count and count > 2000) and (",''' and " .. templateCount) or (".'''"))
((count and count > 2000) and (",''' and " .. templateCount) or ("'''"))
else
else
used_on_text = used_on_text .. templateCount .. "'''"
used_on_text = used_on_text .. templateCount .. "'''"
Línea 90: Línea 90:
)
)
local infoArg = frame.args["info"] ~= "" and frame.args["info"]
if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then
if (systemMessages or frame.args[1] == "risk" or (count and count >= 100000) ) then
local info = systemMessages and '<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or ''
local info = systemMessages and '.<br/>Changes to it can cause immediate changes to the Wikipedia user interface.' or '.'
if frame.args["info"] and frame.args["info"] ~= "" then
if infoArg then
info = info .. "<br />" .. frame.args["info"]
info = info .. "<br />" .. infoArg
end
end
sandbox_text = info .. '<br /> To avoid major disruption' ..
sandbox_text = info .. '<br /> To avoid major disruption' ..
Línea 100: Línea 101:
'The tested changes can be added to this page in a single edit. '
'The tested changes can be added to this page in a single edit. '
else
else
sandbox_text = ' and changes may be widely noticed. Test changes in the ' .. sandbox_text
sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' and c') ..
'hanges may be widely noticed. Test changes in the ' .. sandbox_text
end
end


Usuario anónimo
Las cookies nos ayudan a ofrecer nuestros servicios. Al utilizar nuestros servicios, aceptas nuestro uso de cookies.

Menú de navegación