Module:siwa-headword: Difference between revisions
No edit summary |
No edit summary |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 75: | Line 75: | ||
["decl"] = {}, | ["decl"] = {}, | ||
["cat2"] = {}, | ["cat2"] = {}, | ||
["cat3"] = {}, | |||
["sort"] = {}, | ["sort"] = {}, | ||
["affix"] = {list = true}, | ["affix"] = {list = true}, | ||
| Line 91: | Line 92: | ||
if args.decl then table.insert(data.categories, "Siwa " .. args.decl .. "-declension " .. data.pos_category) end | if args.decl then table.insert(data.categories, "Siwa " .. args.decl .. "-declension " .. data.pos_category) end | ||
if args.cat2 then table.insert(data.categories, "Siwa " .. args["cat2"]) end | if args.cat2 then table.insert(data.categories, "Siwa " .. args["cat2"]) end | ||
if args.cat3 then table.insert(data.categories, "Siwa " .. args["cat3"]) end | |||
data.sort_key = args["sort"] or nil | data.sort_key = args["sort"] or nil | ||
| Line 115: | Line 117: | ||
for n, kind in ipairs(mw.text.split(args[1], "/")) do | for n, kind in ipairs(mw.text.split(args[1], "/")) do | ||
data.inflections[n] = {nil} | if kind ~= "?" then | ||
data.inflections[n] = {nil} | |||
data.inflections[n].label = verb_key[kind] | |||
table.insert(data.categories, "Siwa " .. verb_key[kind] .. " verbs") | table.insert(data.categories, "Siwa " .. verb_key[kind] .. " verbs") | ||
end | end | ||
end | end | ||
args[2].label = "infinitive" | |||
table.insert(data.inflections, args[2]) | |||
args[3].label = "past" | |||
table.insert(data.inflections, args[3]) | |||
if args[4] then table.insert(data.categories, "Siwa irregular verbs") end | if args[4] then table.insert(data.categories, "Siwa irregular verbs") end | ||
if args.cat2 then table.insert(data.categories, "Siwa " .. args["cat2"]) end | if args.cat2 then table.insert(data.categories, "Siwa " .. args["cat2"]) end | ||
if args[1] == "?" or args[2] == "?" or args[3] == "?" then table.insert(data.categories, "Contionary stubs") end | |||
data.sort_key = args["sort"] or nil | data.sort_key = args["sort"] or nil | ||