Module:category tree/lang/wasc: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


table.insert(handlers, function(data)
table.insert(handlers, function(data)
local suffix, pos = data.label:match("^(%*[%w-]+) (.+)$")
local suffix, pos = data.label:match("(%*[%w-]+) (.+)$")
local linksuffix = require("Module:links").full_link({ term = suffix, lang = data.lang }, "term")
local linksuffix = require("Module:links").full_link({ term = suffix, lang = data.lang }, "term")



Revision as of 11:54, 9 May 2026


This module handles generating the descriptions and categorization for Wascotl category pages of the format "Wascotl 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 labels = {}
local handlers = {}

table.insert(handlers, function(data)
	local suffix, pos = data.label:match("(%*[%w-]+) (.+)$")
	local linksuffix = require("Module:links").full_link({ term = suffix, lang = data.lang }, "term")

	return {
		description = "{{{langname}}} " .. pos .. " derived with " .. linksuffix,
		breadcrumb = require("Module:script utilities").tag_text(suffix, data.lang, data.sc, "term"),
		umbrella = false,
		parents = {{
			name = pos,
			sort = (data.lang:makeSortKey(suffix)),
		}},
		displaytitle = "{{{langname}}} " .. require("Module:script utilities").tag_text(suffix, data.lang, data.sc, "term") .. " " .. pos,
	}
end)

return {LABELS = labels, HANDLERS = handlers}