Content deleted Content added
add summary |
clean up summary |
||
Line 7:
local keys = {}
local current = ''
local size = 0
for k,v in pairs(args) do
if string.match(v, '[GgAaFfCcUuRrTtPp]%d%d?') then
current, size = string.lower(v), 0
table.insert(keys, current)
tbl[current] = {['size'] = size}
else
local arg = mw.text.split(v, '=')
tbl[current][string.lower(arg[1])] = arg[2]
size = size + 1
tbl[current]['size'] = size
end
end
Line 31 ⟶ 34:
-- Loop through CSDs (eg G1, G2)
local n = 1
for k,v in pairs(csdList) do
n = n + 1
local csdArgs = {
['raw'] = 'yes',
Line 37 ⟶ 42:
}
summary = summary .. string.upper(k) .. (
-- add in any custom params we got, eg Rationale, URL
Line 43 ⟶ 48:
if v[arg] then
csdArgs[arg] = v[arg]
summary = summary .. arg .. ': ' .. v[arg] .. (
end
end
summary = summary .. (
table.insert(requestedReasons, frame:expandTemplate{ title = 'Db-'..k, args = csdArgs })
|