Module:Block value: Difference between revisions

mNo edit summary
m test
Line 8: Line 8:
local type = args.type
local type = args.type


local blockTest = block  -- non-transformed block argument
-- Most of these transforms are unnecessary, but are kept for compatibility with original template
-- Most of these transforms are unnecessary, but are kept for compatibility with original template


Line 47: Line 49:
end
end
end
end
-- testing editcopy
local testValue = mw.loadData( 'Module:' .. type .. ' values/editcopy' )[blockTest]
if not testValue then
local title = mw.title.getCurrentTitle()
if not args.nocat and title.namespace == 0 and not title.isSubpage then
category = category .. '[[Category:Missing ' .. type:lower() .. '/editcopy]]'
end
end
-- end test
return value .. category
return value .. category
end
end
return p
return p