This module handles generating the descriptions and categorization for Aramaic category pages of the format "Aramaic LABEL" where LABEL can be any text. Examples are Category:Bulgarian conjugation 2.1 verbs and Category:Russian velar-stem neuter-form nouns. This module is part of the category tree system, which is a general framework for generating the descriptions and categorization of category pages.
For more information, see Module:category tree/lang/documentation.
NOTE: If you add a new language-specific module, you must add the language code to the list at the top of Module:category tree/lang in order for the module to be recognized.
local export = {}
local m_table = require("Module:table")
local rmatch = mw.ustring.match
local u = mw.ustring.char
--[=[
This module handles language-specific categories for all Aramaic varieties. The individual variety-specific modules
should do nothing but invoke this module; see ] for an example. Most of the code here is
generic, but in a few places we conditionalize on the language code, which is passed into the various functions that add
labels and handlers. If you need to add a module for a new variety, DO NOT copy the code in this module (even in part),
but add appropriate conditional statements as required. It does not matter if the module adds labels and handlers for
categories that don't exist in a given variety.
]=]
-----------------------------------------------------------------------------
-- --
-- NOUNS --
-- --
-----------------------------------------------------------------------------
---------------------------------- Noun labels ---------------------------------
local function add_noun_labels(labels, lang)
local langcode = lang:getCode()
local nominal_appendix = langcode == "aii" and "Appendix:Assyrian Neo-Aramaic nominals"
local remove_appendix_links = langcode == "aii"
local function make_appendix_link(text, anchor)
anchor = anchor or mw.getContentLanguage():ucfirst(text)
local retval = ("]"):format(nominal_appendix, anchor, text)
if remove_appendix_links then
return require("Module:links").remove_links(retval)
else
return retval
end
end
labels = {
description = "{{{langname}}} nouns categorized by type of derivation.",
parents = {{name = "nouns", sort = "derivation type"}},
breadcrumb = "by derivation type",
}
labels = {
description = "{{{langname}}} " .. make_appendix_link("instance nouns") .. ", i.e. nouns having the meaning \"an instance of doing X\" for some verb.",
parents = {{name = "nouns by derivation type", sort = "instance nouns"}},
breadcrumb = "instance nouns",
}
labels = {
description = "{{{langname}}} " .. make_appendix_link("nouns of place") .. ", i.e. nouns having the approximate meaning \"the place for doing X\" for some verb.",
parents = {{name = "nouns by derivation type", sort = "nouns of place"}},
breadcrumb = "nouns of place",
}
labels = {
description = "{{{langname}}} " .. make_appendix_link("occupational nouns") .. ", i.e. nouns referring to people employed in doing something.",
parents = {{name = "nouns by derivation type", sort = "occupational nouns"}},
breadcrumb = "occupational nouns",
}
labels = {
description = "{{{langname}}} " .. make_appendix_link("tool nouns") .. ", i.e. nouns having the approximate meaning \"tool for doing X\" for some verb.",
parents = {{name = "nouns by derivation type", sort = "tool nouns"}},
breadcrumb = "tool nouns",
}
end
-----------------------------------------------------------------------------
-- --
-- WRAPPERS --
-- --
-----------------------------------------------------------------------------
function export.add_labels_and_handlers(labels, handlers, lang)
-- labels
add_noun_labels(labels, lang)
end
return export