Module:siwa-headword: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 6: Line 6:
local wordPunc = "-־׳״'.·*’་"
local wordPunc = "-־׳״'.·*’་"
local notWordPunc = "[^" .. wordPunc .. "]+"
local notWordPunc = "[^" .. wordPunc .. "]+"
local pos_for_gender_number_cat = {
["nouns"] = "nouns",
["proper nouns"] = "nouns",
-- We include verbs because impf and pf are valid "genders".
["verbs"] = "verbs",
}


local function format_genders(data)
if data.genders and #data.genders > 0 then
local pos_for_cat
if not data.nogendercat then
local pos_category = pos_category:gsub("^reconstructed ", "")
pos_for_cat = pos_for_gender_number_cat[pos_category]
end
local gen = require("Module:getn")
local text, cats = gen.format_genders(data.genders, data.lang, pos_for_cat)
for _, cat in ipairs(cats) do
table.insert(data.categories, cat)
end
return " " .. text
else
return ""
end
end


-- The main entry point.
-- The main entry point.

Navigation menu