Module:head: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 20: Line 20:


local function format_headword(data)
local function format_headword(data)
local head = data.term
local cats = ""
local cats = ""
if is_non_lemma(data.pos) then
if is_non_lemma(data.pos) then
cats = cats .. "[[Category:" .. data.language.name .. " non-lemma forms]]"
cats = cats .. "[[Category:" .. data.language.name .. " non-lemma forms|" .. head .. "]]"
else
else
cats = cats .. "[[Category:" .. data.language.name .. " lemmas]]"
cats = cats .. "[[Category:" .. data.language.name .. " lemmas|" .. head .. "]]"
end
end
if mw.ustring.match(data.pos, "fix$") then cats = cats .. "[[Category:" .. data.language.name .. " affixes]]" end
if mw.ustring.match(data.pos, "fix$") then cats = cats .. "[[Category:" .. data.language.name .. " affixes|" .. head .. "]]" end
if mw.ustring.match(data.pos, " root$") then cats = cats .. "[[Category:" .. data.language.name .. " roots]]" end
if mw.ustring.match(data.pos, " root$") then cats = cats .. "[[Category:" .. data.language.name .. " roots|" .. head .. "]]" end
cats = cats .. "[[Category:" .. data.language.name .. " " .. pluralize(data.pos) .. "]]"
cats = cats .. "[[Category:" .. data.language.name .. " " .. pluralize(data.pos) .. "|" .. head .. "]]"
local head = data.term
if data.head then
if data.head then
head = data.head
head = data.head

Navigation menu