Module:snon-headword: Difference between revisions
No edit summary |
|||
| Line 126: | Line 126: | ||
error("Can't specify plurals of plurale tantum " .. category_pos) | error("Can't specify plurals of plurale tantum " .. category_pos) | ||
end | end | ||
insert(data.inflections, {label = m_hw_util.glossary_link("plural only")}) | table.insert(data.inflections, {label = m_hw_util.glossary_link("plural only")}) | ||
else | else | ||
plurals = m_hw_util.parse_term_list_with_modifiers { | plurals = m_hw_util.parse_term_list_with_modifiers { | ||
| Line 152: | Line 152: | ||
if is_plurale_tantum then | if is_plurale_tantum then | ||
-- both singular and plural | -- both singular and plural | ||
insert(data.inflections, {label = "sometimes " .. m_hw_util.glossary_link("plural only") .. ", in variation"}) | table.insert(data.inflections, {label = "sometimes " .. m_hw_util.glossary_link("plural only") .. ", in variation"}) | ||
end | end | ||
if mode == "?" then | if mode == "?" then | ||
-- Plural is unknown | -- Plural is unknown | ||
insert(data.categories, langname .. " " .. data.pos_category .. " with unknown or uncertain plurals") | table.insert(data.categories, langname .. " " .. data.pos_category .. " 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"}) | table.insert(data.inflections, {label = "plural not attested"}) | ||
insert(data.categories, langname .. " " .. data.pos_category .. " with unattested plurals") | table.insert(data.categories, langname .. " " .. data.pos_category .. " 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 170: | Line 170: | ||
-- 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")}) | table.insert(data.inflections, {label = "usually " .. m_hw_util.glossary_link("uncountable")}) | ||
insert(data.categories, langname .. " countable " .. data.pos_category) | table.insert(data.categories, langname .. " countable " .. data.pos_category) | ||
else | else | ||
insert(data.inflections, {label = m_hw_util.glossary_link("uncountable")}) | table.insert(data.inflections, {label = m_hw_util.glossary_link("uncountable")}) | ||
end | end | ||
else | else | ||
| Line 182: | Line 182: | ||
if mode == "~" then | if mode == "~" then | ||
-- 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")}) | table.insert(data.inflections, {label = m_hw_util.glossary_link("countable") .. " and " .. m_hw_util.glossary_link("uncountable")}) | ||
insert(data.categories, langname .. " uncountable " .. data.pos_category) | table.insert(data.categories, langname .. " uncountable " .. data.pos_category) | ||
insert(data.categories, langname .. " countable " .. data.pos_category) | table.insert(data.categories, langname .. " countable " .. data.pos_category) | ||
elseif plurals[1] then | elseif plurals[1] then | ||
-- Countable nouns | -- Countable nouns | ||
insert(data.categories, langname .. " countable " .. data.pos_category) | table.insert(data.categories, langname .. " countable " .. data.pos_category) | ||
else | else | ||
-- Uncountable nouns | -- Uncountable nouns | ||
insert(data.categories, langname .. " uncountable " .. data.pos_category) | table.insert(data.categories, langname .. " uncountable " .. data.pos_category) | ||
end | end | ||
end | end | ||
| Line 215: | Line 215: | ||
if plurals[2] then | if plurals[2] then | ||
insert(data.categories, langname .. " " .. data.pos_category .. " with multiple plurals") | table.insert(data.categories, langname .. " " .. data.pos_category .. " with multiple plurals") | ||
end | end | ||
end | end | ||