Module:headword: Difference between revisions

No edit summary
No edit summary
Line 947: Line 947:
-- add an appropriate category.
-- add an appropriate category.
local postype = export.pos_lemma_or_nonlemma(data.pos_category)
local postype = export.pos_lemma_or_nonlemma(data.pos_category)
if not postype then
    local main_cat = data.lang:getMainCategoryName()
-- We don't know what this category is, so tag it with a tracking category.
    if not postype then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos]]
    elseif not data.noposcat then
-- [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/LANGCODE]]
        if postype:match("^lemma") and main_cat ~= "lemma" then
track("unrecognized pos", data.lang)
            postype = main_cat
-- [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/POS]]
        end
-- [[Special:WhatLinksHere/Wiktionary:Tracking/headword/unrecognized pos/POS/LANGCODE]]
        insert(data.categories, 1, full_langname .. " " .. postype .. "s")
track("unrecognized pos/pos/" .. data.pos_category, data.lang)
    end
elseif not data.noposcat then
insert(data.categories, 1, full_langname .. " " .. postype .. "s")
end


-- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]]
-- EXPERIMENTAL: see [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]]