Module:snon-headword: Difference between revisions

No edit summary
No edit summary
Line 156: Line 156:
if mode == "?" then
if mode == "?" then
-- Plural is unknown
-- Plural is unknown
insert(data.categories, langname .. " " .. category_plpos .. " with unknown or uncertain plurals")
insert(data.categories, langname .. " " .. poscat .. " with unknown or uncertain plurals")
elseif mode == "!" then
elseif mode == "!" then
-- Plural is not attested
-- Plural is not attested
insert(data.inflections, {label = "plural not attested"})
insert(data.inflections, {label = "plural not attested"})
insert(data.categories, langname .. " " .. category_plpos .. " with unattested plurals")
insert(data.categories, langname .. " " .. poscat .. " with unattested plurals")
if plurals[1] then
if plurals[1] then
error("Can't specify any plurals along with unattested plural code '!'")
error("Can't specify any plurals along with unattested plural code '!'")
Line 166: Line 166:
elseif mode == "-" then
elseif mode == "-" then
-- Uncountable noun; may occasionally have a plural
-- Uncountable noun; may occasionally have a plural
insert(data.categories, langname .. " uncountable " .. category_plpos)
insert(data.categories, langname .. " uncountable " .. poscat)


-- If plural forms were given explicitly, then show "usually"
-- If plural forms were given explicitly, then show "usually"
if plurals[1] then
if plurals[1] then
insert(data.inflections, {label = "usually " .. m_hw_util.glossary_link("uncountable")})
insert(data.inflections, {label = "usually " .. m_hw_util.glossary_link("uncountable")})
insert(data.categories, langname .. " countable " .. category_plpos)
insert(data.categories, langname .. " countable " .. poscat)
else
else
insert(data.inflections, {label = m_hw_util.glossary_link("uncountable")})
insert(data.inflections, {label = m_hw_util.glossary_link("uncountable")})
Line 183: Line 183:
-- Mixed countable/uncountable noun, always has a plural
-- Mixed countable/uncountable noun, always has a plural
insert(data.inflections, {label = m_hw_util.glossary_link("countable") .. " and " .. m_hw_util.glossary_link("uncountable")})
insert(data.inflections, {label = m_hw_util.glossary_link("countable") .. " and " .. m_hw_util.glossary_link("uncountable")})
insert(data.categories, langname .. " uncountable " .. category_plpos)
insert(data.categories, langname .. " uncountable " .. poscat)
insert(data.categories, langname .. " countable " .. category_plpos)
insert(data.categories, langname .. " countable " .. poscat)
elseif plurals[1] then
elseif plurals[1] then
-- Countable nouns
-- Countable nouns
insert(data.categories, langname .. " countable " .. category_plpos)
insert(data.categories, langname .. " countable " .. poscat)
else
else
-- Uncountable nouns
-- Uncountable nouns
insert(data.categories, langname .. " uncountable " .. category_plpos)
insert(data.categories, langname .. " uncountable " .. poscat)
end
end
end
end
Line 215: Line 215:


if plurals[2] then
if plurals[2] then
insert(data.categories, langname .. " " .. category_plpos .. " with multiple plurals")
insert(data.categories, langname .. " " .. poscat .. " with multiple plurals")
end
end
end
end