FANDOM


m (relink both categories)
m (whoops)
 
Line 7: Line 7:
 
local args = getArgs(frame)
 
local args = getArgs(frame)
 
local reason = "for one or more reasons"
 
local reason = "for one or more reasons"
local categories = "[[Category:Incomplete table]]"
+
local categories = "[[Category:Table incomplete]]"
   
 
for _, arg in ipairs(args) do
 
for _, arg in ipairs(args) do
 
if data[arg] then
 
if data[arg] then
categories = categories .. "[[Category:Incomplete table (" .. data[arg].name .. ")]]"
+
categories = categories .. "[[Category:Table incomplete (" .. data[arg].name .. ")]]"
 
else
 
else
 
reason = "and require the " .. arg .. " entries to be filled"
 
reason = "and require the " .. arg .. " entries to be filled"

Latest revision as of 18:16, January 13, 2020

-- <nowiki>
local p = {}
local data = require("Module:Codename").tables.rel
local getArgs = require("Dev:Arguments").getArgs
 
function p.main(frame)
    local args = getArgs(frame)
    local reason = "for one or more reasons"
    local categories = "[[Category:Table incomplete]]"
 
    for _, arg in ipairs(args) do
        if data[arg] then
            categories = categories .. "[[Category:Table incomplete (" .. data[arg].name .. ")]]"
        else
            reason = "and require the " .. arg .. " entries to be filled"
        end
    end
 
    return "The following tables are incomplete " .. reason .. ". If you wish, please examine the table and add anything missing. Remove this notice upon completion." .. categories
end
 
return p
-- <nowiki>
Community content is available under CC-BY-SA unless otherwise noted.