11.314
suntingan
(←Membuat halaman berisi 'local p = {} -- _fetch looks at the "demo" argument. local _fetch = require('Module:Transclusion_count').fetch local yesno = require('Module:Yesno') function p.num(frame, count) if count == nil then if yesno(frame.args['fetch']) == false then if (frame.args[1] or '') ~= '' then count = tonumber(frame.args[1]) end else count = _fetch(frame) end end -- Build output string local return_value = "" if count == nil then if frame.args[1] == "risk"...') |
Tidak ada ringkasan suntingan |
||
| (9 revisi perantara oleh pengguna yang sama tidak ditampilkan) | |||
| Baris 20: | Baris 20: | ||
return_value = "a very large number of" | return_value = "a very large number of" | ||
else | else | ||
return_value = " | return_value = "banyak" | ||
end | end | ||
else | else | ||
| Baris 88: | Baris 88: | ||
-- This retrieves the project URL automatically to simplify localiation. | -- This retrieves the project URL automatically to simplify localiation. | ||
local templateCount = (' | local templateCount = ('pada [https://linkcount.toolforge.org/index.php?project=%s&page=%s %s halaman]'):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)) | ||
local used_on_text = "''' | local used_on_text = "'''" .. (mw.title.getCurrentTitle().namespace == 828 and "Lua module" or "template") .. ' ini digunakan '; | ||
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 ("''', | ((count and count > 2000) and ("''', dan " .. templateCount) or ("'''")) | ||
else | else | ||
used_on_text = used_on_text .. templateCount .. "'''" | used_on_text = used_on_text .. templateCount .. "'''" | ||
| Baris 100: | Baris 100: | ||
local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] | local sandbox_text = ("%s's [[%s/sandbox|/sandbox]] pada pada sub halaman [[%s/testcases|/testcases]], atau pada [[%s]] milikmu. "):format( | ||
(mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), | (mw.title.getCurrentTitle().namespace == 828 and "module" or "template"), | ||
title.fullText, title.fullText, | title.fullText, title.fullText, | ||
| Baris 112: | Baris 112: | ||
info = info .. "<br />" .. infoArg | info = info .. "<br />" .. infoArg | ||
end | end | ||
sandbox_text = info .. '<br /> | sandbox_text = info .. '<br /> Untuk menghindari kesalahan fatal' .. | ||
(count and count >= 100000 and ' and server load' or '') .. | (count and count >= 100000 and ' and server load' or '') .. | ||
', any changes should be tested in the ' .. sandbox_text .. | ', any changes should be tested in the ' .. sandbox_text .. | ||
'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 = (infoArg and ('.<br />' .. infoArg .. ' C') or ' | sandbox_text = (infoArg and ('.<br />' .. infoArg .. ' C') or ' dan p') .. | ||
' | 'erubahan akan diumumkan secara meluas. Uji setiap perubahan dengan menggunakan ' .. sandbox_text | ||
end | end | ||
local discussion_text = systemMessages and 'Please discuss changes ' or ' | local discussion_text = systemMessages and 'Please discuss changes ' or 'Pertimbangkan untuk membahas perubahan ' | ||
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("%sat [[%s]]", discussion_text, frame.args["2"]) | discussion_text = string.format("%sat [[%s]]", discussion_text, frame.args["2"]) | ||
else | else | ||
discussion_text = string.format("% | discussion_text = string.format("%spada [[%s|halaman diskusi]]", discussion_text, title.talkPageTitle.fullText ) | ||
end | end | ||
return used_on_text .. sandbox_text .. discussion_text .. " | return used_on_text .. sandbox_text .. discussion_text .. " sebelum menerapkannya." .. bot_text | ||
end | end | ||
| Baris 139: | Baris 139: | ||
count = _fetch(frame) | count = _fetch(frame) | ||
end | end | ||
local image = "[[ | local image = "[[Berkas:Warning-banyak-digunakan.png|40px|alt=Warning|link=]]" | ||
local type_param = "style" | local type_param = "style" | ||
local epilogue = '' | local epilogue = '' | ||