Module:names: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 60: Line 60:
local param_mods = {"t", "alt", "tr", "ts", "pos", "lit", "id", "sc", "g", "q", "eq"}
local param_mods = {"t", "alt", "tr", "ts", "pos", "lit", "id", "sc", "g", "q", "eq"}
local param_mod_set = m_table.listToSet(param_mods)
local param_mod_set = m_table.listToSet(param_mods)
local function track(page)
require("Module:debug").track("names/" .. page)
end




Line 324: Line 319:
suffix = from
suffix = from
end
end
end
if unrecognized then
track("unrecognized from")
track("unrecognized from/" .. from)
end
end
return prefix, suffix
return prefix, suffix
Line 548: Line 539:
end
end
local function insert_cats_gender(g)
local function insert_cats_gender(g)
if g == "unknown-gender" then
track("unknown gender")
return
end
if g ~= "male" and g ~= "female" and g ~= "unisex" then
if g ~= "male" and g ~= "female" and g ~= "unisex" then
error("Unrecognized gender: " .. g)
error("Unrecognized gender: " .. g)