Module:headword: Difference between revisions

No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 845: Line 845:
local postype = export.pos_lemma_or_nonlemma(data.pos_category)
local postype = export.pos_lemma_or_nonlemma(data.pos_category)
if not data.noposcat then
if not data.noposcat then
if postype == "lemma" then
postype = data.lang:getMainCategoryName()
end
insert(data.categories, 1, full_langname .. " " .. postype .. "s")
insert(data.categories, 1, full_langname .. " " .. postype .. "s")
end
end
 
insert(data.categories, 1, "Contionary")
-- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]]
-- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]]
if data.altform then
if data.altform then
Line 1,298: Line 1,304:
end
end


if data.affix then
for _, aff in ipairs(data.affix) do
if mw.ustring.match(aff, "^%-[^-]*%-$") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words interfixed with " .. aff)
elseif mw.ustring.match(aff, "%-%s%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words circumfixed with " .. aff)
elseif mw.ustring.match(aff, "%-$") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words prefixed with " .. aff)
elseif mw.ustring.match(aff, "^%-") then
table.insert(data.categories, data.lang:getCanonicalName() .. " words suffixed with " .. aff)
end
end
end
-- Add to various maintenance categories.
-- Add to various maintenance categories.
export.maintenance_cats(page, data.lang, data.categories, data.whole_page_categories)
export.maintenance_cats(page, data.lang, data.categories, data.whole_page_categories)