မော်ဂျူး:category tree/poscatboiler/data/modules
ပုံပန်းသွင်ပြင်
Documentation for this module may be created at မော်ဂျူး:category tree/poscatboiler/data/modules/doc
local labels = {}
local raw_categories = {}
local raw_handlers = {}
-----------------------------------------------------------------------------
-- --
-- LABELS --
-- --
-----------------------------------------------------------------------------
labels["modules"] = {
description = "{{{langname}}} [[Wiktionary:Modules|modules]], which contain Lua code to create and manage entries.",
umbrella = {
parents = {{name = "Modules", sort = " "}},
breadcrumb = "by language",
},
parents = {{name = "{{{langcat}}}", raw = true}},
}
labels["data modules"] = {
description = "{{{langname}}} [[Wiktionary:Modules|modules]] containing data used by other modules.",
umbrella = {
parents = {{name = "Data modules", sort = " "}},
breadcrumb = "by language",
},
parents = {"modules"},
}
labels["inflection modules"] = {
description = "{{{langname}}} [[inflection]] [[Wiktionary:Modules|modules]], which contain Lua code for generating conjugation and declension tables.",
umbrella = {
parents = {{name = "Inflection modules", sort = " "}},
breadcrumb = "by language",
},
parents = {"modules"},
}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Modules"] = {
description = "This is a general holder category for modules.",
additional = "For more information on what modules are and how they work, see [[Wiktionary:Scribunto]]. For a complete list of all modules, see [[Special:PrefixIndex/Module:|here]].",
parents = {"Category:Wiktionary"},
}
raw_categories["Uncategorized modules"] = {
description = "Uncategorized modules.",
additional = "Modules are placed here by [[MediaWiki:Scribunto-doc-page-does-not-exist]]. The default documentation page, [[Template:documentation/preloadModule]], also adds this category.",
parents = { {name = "Modules", sort = " "} },
}
raw_categories["Module unit tests"] = {
description = "Unit tests for modules.",
parents = { {name = "Modules", sort = "1 test modules"} },
}
raw_categories["Appendix modules"] = {
description = "Modules with functions that generate content for or extract information from pages in the Appendix namespace.",
parents = { "Modules" },
}
raw_categories["Bot support modules"] = {
description = "Modules for supporting individual bot accounts.",
parents = { "Modules" },
}
raw_categories["Category modules"] = {
intro = "{{also|:Category:Category templates}}",
description = "Modules for adding categories to pages or generating the description and subcategories of category pages.",
parents = { "Modules" },
}
raw_categories["Data modules"] = {
description = "Modules that do not contain functions, but only export a table of data that is used by other modules. Modules that are in this category should be imported using <code>mw.loadData</code> rather than <code>require</code>.",
parents = { "Modules" },
}
raw_categories["Character insertion data modules"] = {
description = "Modules containing data for use by {{temp|chars}}.",
parents = { "Data modules" },
breadcrumb = "character insertion",
}
raw_categories["Debugging modules"] = {
description = "Modules used for debugging.",
additional = "Some should only be used in sandbox modules or when using the [[mw:Extension:TemplateSandbox|{{MediaWiki:Templatesandbox-editform-legend}}]] button in the edit page of modules and templates.",
parents = { "Lua metamodules", "Modules" },
}
raw_categories["Definition modules"] = {
description = "Modules that fuel templates that are used in [[Wiktionary:Glossary#definition line|definition lines]] of entries.",
parents = { "Modules" },
}
raw_categories["Deprecated modules"] = {
description = "Modules that should not be used, as their functions are performed by newer modules.",
parents = { "Modules", "Category:Wiktionary maintenance" },
}
raw_categories["Discussion modules"] = {
description = "Modules concerning discussion pages.",
parents = { "Modules" },
}
raw_categories["Display text-generating modules"] = {
description = "Modules that are used to generate display text.",
additional = "Display text determines what is shown to the reader. In some languages it must be normalized, due to common errors caused by confusable characters, or so as to ensure a consistent display format.",
parents = { "Modules" },
}
raw_categories["Documentation modules"] = {
description = "Modules for generating documentation pages.",
parents = { "Modules" },
}
raw_categories["Entry-generating modules"] = {
description = "Modules with functions that are used to generate new entries.",
parents = { "Modules" },
}
raw_categories["Entry name-generating modules"] = {
description = "Modules that are used to generate entry names.",
additional = "Entry names determine the page at which an entry is created, accounting for the removal of language-specified diacritics.",
parents = { "Modules" },
}
raw_categories["Etymology modules"] = {
description = "Modules that fuel templates that define the etymology of entries.",
parents = { "Modules" },
}
raw_categories["Form-of modules"] = {
description = "Modules that generate the definition line of non-lemma forms, e.g. verb forms and noun forms.",
parents = { "Definition modules", "Modules" },
}
raw_categories["General utility modules"] = {
description = "Modules that serve some sort of utility purpose in various entries but are used by multiple languages. Modules only used by one language should be at [[:Category:Utility modules]].",
parents = { "Modules" },
}
raw_categories["Headword-line modules"] = {
description = "Modules that support [[:Category:Headword-line templates by language|headword-line templates]] for a specific language.",
additional = "See also [[:Category:Headword-line templates]].",
parents = { "Modules" },
}
raw_categories["Inflection modules"] = {
description = "Modules used to support [[:Category:Inflection-table templates by language|inflection templates]] for a specific language.",
parents = { "Modules" },
}
raw_categories["Internal link modules"] = {
description = "Modules that are used in [[:Category:Internal link templates|internal link templates]].",
parents = { "General utility modules", "Modules" },
}
raw_categories["JSON-generating modules"] = {
description = "Modules with functions that generate data in JSON format.",
parents = { "Modules" },
}
raw_categories["Language and script modules"] = {
description = "Modules that process language and script codes and return data on them.",
parents = { "Modules" },
}
raw_categories["List modules"] = {
description = "Modules that generate lists and tables of entries.",
parents = { "Modules" },
}
raw_categories["Lua metamodules"] = {
description = "Modules that have exported functions that are only used by other modules: that is, cannot be called using {{temp|#invoke:}}.",
parents = { "Modules" },
}
raw_categories["Maintenance modules"] = {
description = "Modules that fuel templates used for maintaining entries, such as cleanup templates (e.g. {{temp|attention}}), deletion templates (e.g. {{temp|rfd}}) and verification templates (e.g. {{temp|rfv}}).",
parents = { "Modules" },
}
raw_categories["Pronunciation modules"] = {
description = "Modules that fuel templates that are used to create the language-specific pronunciation of entries.",
parents = { "Modules" },
}
raw_categories["Quotation and usage example modules"] = {
description = "Modules that fuel templates that are used to format quotations and usage examples.",
parents = { "Definition modules", "Modules" },
breadcrumb = "quotation and usage example",
}
raw_categories["Reference modules"] = {
description = "Modules that are used for [[:Category:Reference templates|reference templates]].",
parents = { "Modules" },
}
raw_categories["Sandbox modules"] = {
description = "Test versions of modules intended for production use.",
parents = { "Modules" },
}
raw_categories["Sortkey-generating modules"] = {
description = "Modules that are used to generate sortkeys.",
additional = "Sortkeys determine the order of entry names in categories.",
parents = { "Modules" },
}
raw_categories["Swadesh modules"] = {
description = "Modules containing [[Swadesh list]]s.",
parents = { "Modules" },
}
raw_categories["Template interface modules"] = {
description = "Modules whose purpose is to provide an interface between templates and the functions of a module.",
additional = "They are usually named <code>.../templates</code>, and the functions present within them usually all have only a \"frame\" parameter.",
parents = { "Modules" },
}
raw_categories["Tracking modules"] = {
description = "Modules that add tracking templates.",
parents = { "Modules" },
}
raw_categories["Transliteration modules"] = {
description = "Modules that automatically convert text in one script to another.",
additional = "Most of them convert non-Latin scripts to Latin (romanisation/romanization), and are used by templates or modules to generate transliteration of text that is tagged with a particular language. Each language's transliteration module is specified in its data table (for which, see the category {{catlink|Language data modules}}).",
parents = { "Modules" },
}
raw_categories["Unused modules"] = {
description = "Unused modules.",
parents = { "Modules" },
}
raw_categories["User sandbox modules"] = {
description = "Modules that are for personal use and testing by individual editors.",
additional = "These should all begin with <code>User:</code> followed by the user's name. If several sandbox modules are needed by a single user, subpages can be created. These modules should not be used in real Wiktionary content pages, as all content on those pages should be editable by anyone and, if necessary, edit protected.",
parents = { "Sandbox modules", "Modules" },
}
raw_categories["Utility modules"] = {
description = "Modules that deal with several utilities needed by a certain language.",
additional = "Usually their names end with -utilities or -common (preceded by the language code), although more specific utility modules that one language uses may reside here as well. If a utility is used by many languages, it should be in [[:Category:General utility modules]].",
parents = { "Modules" },
}
raw_categories["Vote modules"] = {
description = "Modules used to manage Wiktionary votes.",
parents = { "Modules" },
}
raw_categories["Wikitext parsing modules"] = {
description = "Modules that contain functions that grab the wikitext of a page and get information from it by performing string operations on it.",
parents = { "Modules" },
}
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
for _, mod_type in ipairs { "Entry name-generating", "Sortkey-generating", "Transliteration" } do
table.insert(raw_handlers, function(data)
local count, languages = data.category:match(("^%s modules used by ([0-9]+) (languages?)$"):format(
-- need to escape the hyphen in 'Entry name-generating' and 'Sortkey-generating'
require("Module:pattern utilities").pattern_escape(mod_type)))
if count then
return {
description = data.category .. ".",
breadcrumb = "used by " .. count .. " " .. languages,
parents = {
{ name = mod_type .. " modules", sort = count },
},
}
end
end)
end
return {LABELS = labels, RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}