Module:Category tree/poscatboiler/data/terms by script: Difference between revisions

From The Languages of David J. Peterson
Jump to navigation Jump to search
(Created page with "local labels = {} local handlers = {} labels["terms by script"] = { description = "{{{langname}}} terms categorized by the script they are written in (for languages with mul...")
 
No edit summary
 
Line 1: Line 1:
local labels = {}
local labels = {}
local raw_categories = {}
local handlers = {}
local handlers = {}
-----------------------------------------------------------------------------
--                                                                        --
--                                  LABELS                                --
--                                                                        --
-----------------------------------------------------------------------------


labels["terms by script"] = {
labels["terms by script"] = {
description = "{{{langname}}} terms categorized by the script they are written in (for languages with multiple native scripts).",
description = "{{{langname}}} terms categorized by the script they are written in (for languages with multiple native scripts).",
fundamental = "Terms by lexical property subcategories by language",
umbrella_parents = "Terms by lexical property subcategories by language",
parents = {"terms by orthographic property"},
parents = {"terms by orthographic property"},
}
}


table.insert(handlers, function(label)
 
local script = label:match("^terms in (.+) script$")
 
-----------------------------------------------------------------------------
--                                                                        --
--                              RAW CATEGORIES                            --
--                                                                        --
-----------------------------------------------------------------------------
 
 
raw_categories["Terms by script subcategories by language"] = {
description = "Umbrella categories covering topics related to terms categorized by their script.",
additional = "{{{umbrella_meta_msg}}}",
parents = {
"Umbrella metacategories",
{name = "terms by script", is_label = true, sort = " "},
},
}
 
 
 
-----------------------------------------------------------------------------
--                                                                        --
--                                HANDLERS                                --
--                                                                        --
-----------------------------------------------------------------------------
 
 
table.insert(handlers, function(data)
local script = data.label:match("^terms in (.+) script$")
if script then
if script then
return {
return {
description = "{{{langname}}} terms written in " .. script .. " script.",
description = "{{{langname}}} terms written in " .. script .. " script.",
fundamental = "Terms by script subcategories by language",
umbrella_parents = "Terms by script subcategories by language",
parents = {{
parents = {{
name = "terms by script",
name = "terms by script",
Line 22: Line 58:
end)
end)


return {LABELS = labels, HANDLERS = handlers}
 
return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers}

Latest revision as of 14:05, 3 September 2023

Documentation for this module may be created at Module:Category tree/poscatboiler/data/terms by script/documentation

local labels = {}
local raw_categories = {}
local handlers = {}



-----------------------------------------------------------------------------
--                                                                         --
--                                  LABELS                                 --
--                                                                         --
-----------------------------------------------------------------------------

labels["terms by script"] = {
	description = "{{{langname}}} terms categorized by the script they are written in (for languages with multiple native scripts).",
	umbrella_parents = "Terms by lexical property subcategories by language",
	parents = {"terms by orthographic property"},
}



-----------------------------------------------------------------------------
--                                                                         --
--                              RAW CATEGORIES                             --
--                                                                         --
-----------------------------------------------------------------------------


raw_categories["Terms by script subcategories by language"] = {
	description = "Umbrella categories covering topics related to terms categorized by their script.",
	additional = "{{{umbrella_meta_msg}}}",
	parents = {
		"Umbrella metacategories",
		{name = "terms by script", is_label = true, sort = " "},
	},
}



-----------------------------------------------------------------------------
--                                                                         --
--                                 HANDLERS                                --
--                                                                         --
-----------------------------------------------------------------------------


table.insert(handlers, function(data)
	local script = data.label:match("^terms in (.+) script$")
	if script then
		return {
			description = "{{{langname}}} terms written in " .. script .. " script.",
			umbrella_parents = "Terms by script subcategories by language",
			parents = {{
				name = "terms by script",
				sort = script,
			}},
		}
	end
end)


return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers}