Module:category tree/poscatboiler/data/unicode

Hello, you have come here looking for the meaning of the word Module:category tree/poscatboiler/data/unicode. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:category tree/poscatboiler/data/unicode, but we will also tell you about its etymology, its characteristics and you will know how to say Module:category tree/poscatboiler/data/unicode in singular and plural. Everything you need to know about the word Module:category tree/poscatboiler/data/unicode you have here. The definition of the word Module:category tree/poscatboiler/data/unicode will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:category tree/poscatboiler/data/unicode, 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 poscatboiler system and a description of how to add or modify categories, see Module:category tree/poscatboiler/data/documentation.


local raw_categories = {}
local raw_handlers = {}



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


raw_categories = {
	topright = "{{shortcut|CAT:UC}}",
	description = "Categories with blocks of particular Unicode characters.",
	parents = {
		"Fundamental",
		"Category:Appendices",
	},
}

raw_categories = {
	description = "Categories that group blocks of Unicode characters by the number of characters in those blocks.",
	parents = {
		{name = "Unicode blocks", sort = " "},
	},
}

for _, block in ipairs({
	{num = "0", desc = "no other", sort = "*000"},
	{num = "1–10", desc = "1 to 10", sort = "*001"},
	{num = "11–50", desc = "11 to 50", sort = "*011"},
	{num = "51–100", desc = "51 to 100", sort = "*051"},
	{num = "101+", desc = "at least 101", sort = "*101"},
}) do
raw_categories = {
	description = "Unicode block categories containing 1 appendix + " .. block.desc .. " entries.",
	parents = {{name = "Unicode blocks by number of entries", sort = block.sort}},
	breadcrumb = block.num,
}
end



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


table.insert(raw_handlers, function(data)
	local block = data.category:match("^(.*) block$")
	if block then
		local pages_in_category = mw.site.stats.pagesInCategory(mw.title.getCurrentTitle().text, "pages")
		local entry_bucket
		-- At least 1 page is the appendix for the current Unicode block.
		if pages_in_category == 1 then
			entry_bucket = "0"
		elseif pages_in_category <= 11 then
			entry_bucket = "1–10"
		elseif pages_in_category <= 51 then
			entry_bucket = "11–50"
		elseif pages_in_category <= 101 then
			entry_bucket = "51–100"
		else
			entry_bucket = "101+"
		end
		return {
			description = "Entries for characters in the ''']''' block, " ..
			"as categorized by the character boxes.",
			additional = "Some entries may define characters from multiple Unicode codepoints at once, so the page title " ..
			"could be an entry that is not from this block.",
			breadcrumb = block,
			parents = {
				"Unicode blocks",
				"Unicode blocks with " .. entry_bucket .. " entries",
			},
		}
	end
end)


return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}