Module:category tree/word of the day

Hello, you have come here looking for the meaning of the word Module:category tree/word of the day. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:category tree/word of the day, but we will also tell you about its etymology, its characteristics and you will know how to say Module:category tree/word of the day in singular and plural. Everything you need to know about the word Module:category tree/word of the day you have here. The definition of the word Module:category tree/word of the day will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:category tree/word of the day, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This data submodule defines part of Wiktionary's category structure.

For an introduction to the category tree system and a description of how to add or modify categories, see Module:category tree/documentation.


local raw_categories = {}
local raw_handlers = {}

local insert = table.insert

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


raw_categories = {
	description = "This is a grouping category to weed out ] entries from the Wiktionary: namespace, in particular, for ].",
	parents = "Category:Wiktionary tracking categories",
}

raw_categories = {
	description = "Entries previously selected as ].",
	parents = "Words of the day",
	breadcrumb = "English",
	hidden = true,
}

raw_categories = {
	description = "Entries previously selected as ].",
	parents = "Words of the day",
	breadcrumb = "foreign",
	hidden = true,
}

raw_categories = {
	description = "Categories with foreign words of day in various languages.",
	additional = "{{{umbrella_msg}}}",
	parents = "Foreign word of the day archive",
	breadcrumb = "by language",
}



-----------------------------------------------------------------------------
--																		 --
--								RAW HANDLERS							 --
--																		 --
-----------------------------------------------------------------------------

-- WOTD by year and month
insert(raw_handlers, function(data)
	local year, month = data.category:match("^Word of the day archive/(%d+)/(%w+)$")
	if not year then
		year = data.category:match("^Word of the day archive/(%d+)$")
		if not year then
			return
		end
		return {
			breadcrumb = year,
			description = "Words of the day from " .. year .. ".",
			parents = {
				{name = "Word of the day archive", sort = year},
			},
			hidden = true,
		}
	else
		return {
			breadcrumb = month,
			description = "Words of the day from " .. month .. " of " .. year .. ".",
			parents = {
				{name = "Word of the day archive/" .. year, sort = month},
			},
			hidden = true,
		}
	end
end)

-- FWOTD by year and month
insert(raw_handlers, function(data)
	local year, month = data.category:match("^Foreign word of the day archive/(%d+)/(%w+)$")
	if not year then
		year = data.category:match("^Foreign word of the day archive/(%d+)$")
		if not year then
			return
		end
		return {
			breadcrumb = year,
			description = "Foreign words of the day from " .. year .. ".",
			parents = {
				{name = "Foreign word of the day archive", sort = year},
			},
			hidden = true,
		}
	else
		return {
			breadcrumb = month,
			description = "Foreign words of the day from " .. month .. " of " .. year .. ".",
			parents = {
				{name = "Foreign word of the day archive/" .. year, sort = month},
			},
			hidden = true,
		}
	end
end)

-- FWOTD by language and year
insert(raw_handlers, function(data)
	local langname, year = data.category:match("^Foreign words of the day in (+)/(%d+)$")
	if not langname then
		langname = data.category:match("^Foreign words of the day in (+)$")
	end
	if not (langname and langname ~= "English") then
		return
	end
	
	local lang = require("Module:languages").getByCanonicalName(langname, true)
	
	local parents
	local description
	local breadcrumb
	
	if year then
		description = "Foreign words of the day in " .. lang:makeCategoryLink() .. " from " .. year .. "."
		parents = {
			{name = "Foreign words of the day in " .. langname, sort = year},
			{name = "Foreign word of the day archive/" .. year, sort = langname},
		}
		breadcrumb = year
	else
		description = "Foreign words of the day in " .. lang:makeCategoryLink() .. "."
		parents = {
			{name = "Foreign words of the day by language", sort = langname},
			lang:getCategoryName(),
		}
		breadcrumb = langname
	end
	
	return {
		lang = lang:getCode(),
		description = description,
		parents = parents,
		breadcrumb = breadcrumb,
		hidden = true,
	}
end)


return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}