Modul:category tree/topic cat/data/Names

Dokumentacija za tutón modul hodźi so na Modul:category tree/topic cat/data/Names/dokumentacija wutworić

local labels = {}
local handlers = {}

labels["names"] = {
	type = "related-to",
	description = "{{{langname}}} names for a variety of things.",
	additional = "Given names and surnames can be found in [[:Category:Names by language]].",
	parents = {"all topics"},
}

labels["letter names"] = {
	type = "name",
	description = "{{{langname}}} terms that are the names of letters.",
	additional = "Ideally entries should be in a subcategory for the names of letters in a particular script.",
	parents = {"names", "letters, symbols, and punctuation"},
}

-- Handler for "SCRIPT letter names".
table.insert(handlers, function(label)
	local script = label:match("^(.*) letter names$")
	if script then
		local sc = require("Module:scripts").getByCanonicalName(script)
		if sc then
			local script_page
			local appendix = ("Appendix: %s script"):format(script)
			local appendix_title = mw.title.new(appendix)
			if appendix_title and appendix_title.exists then
				script_page = appendix
			else
				script_page = "w:" .. sc:getWikipediaArticle()
			end
			local link = ("[[%s|%s script]]"):format(script_page, script)
			return {
				type = "name",
				description = ("{{{langname}}} terms that serve as names for letters and symbols directly based on letters, " ..
					"such as [[ligature]]s and letters with [[diacritic]]s, of the %s."):format(link),
				parents = {"letter names"},
			}
		end
	end
end)


labels["couple nicknames"] = {
	type = "name",
	description = "{{{langname}}} informal names for pairs of people, especially [[celebrity]] [[couple]]s.",
	additional = "For fictional relationships, see [[:Category:Ships (fandom)]].",
	parents = {"nicknames", "people"},
}

labels["country nicknames"] = {
	type = "name",
	description = "{{{langname}}} informal names for [[country|countries]].",
	parents = {"nicknames", "countries"},
}

labels["foreign personal names"] = {
	type = "name",
	description = "Transliterations, respellings or other renderings of personal names into {{{langname}}}.",
	umbrella = {
		description = "Transliterations, respellings or other renderings of personal names.",
	},
	parents = {"names"},
}

labels["named prayers"] = {
	type = "name",
	description = "=[[specific]] [[prayer]]s",
	parents = {"names", "prayer"},
}

labels["named roads"] = {
	type = "name",
	description = "=[[individually]]-[[named]] [[roads]]",
	parents = {"names", "roads"},
}

labels["nicknames"] = {
	type = "name",
	description = "{{{langname}}} terms that are informal names or diminutives of specific entities (people, places, etc.)",
	parents = {"names"},
}

labels["nicknames of individuals"] = {
	type = "name",
	description = "{{{langname}}} terms that are informal names for specific individuals (e.g. [[J-Lo]] for singer {{w|Jennifer Lopez}}).",
	parents = {"individuals", "nicknames"},
}

labels["derogatory names for countries"] = {
	type = "name",
	description = "{{{langname}}} derogatory names for [[country|countries]].",
	parents = {"country nicknames", "derogatory names for places"},
}

labels["derogatory names for places"] = {
	type = "name",
	description = "{{{langname}}} derogatory names for places.",
	parents = {"nicknames"},
}

labels["sports nicknames"] = {
	type = "name",
	description = "{{{langname}}} informal names for people or teams involved in sports.",
	parents = {"nicknames", "sports"},
}

labels["taxonomic names"] = {
	type = "name",
	description = "default",
	parents = {"names", "taxonomy"},
}

return {LABELS = labels, HANDLERS = handlers}