มอดูล:category tree/poscatboiler/data/มอดูล

จาก วิกิพจนานุกรม พจนานุกรมเสรี
local labels = {}
local raw_categories = {}
local raw_handlers = {}



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


labels["มอดูล"] = {
	description = "{{{langname}}} [[Wiktionary:Modules|modules]], which contain Lua code to create and manage entries.",
	umbrella = {
		parents = {{name = "มอดูล", sort = " "}},
		breadcrumb = "แบ่งตามภาษา",
	},
	parents = {{name = "{{{langcat}}}", raw = true}},
}
labels["modules"] = labels["มอดูล"]

labels["มอดูลข้อมูล"] = {
	description = "{{{langname}}} [[Wiktionary:Modules|modules]] containing data used by other modules.",
	umbrella = {
		parents = {{name = "มอดูลข้อมูล", sort = " "}},
		breadcrumb = "แบ่งตามภาษา",
	},
	parents = {"มอดูล"},
}
labels["data modules"] = labels["มอดูลข้อมูล"]

labels["มอดูลการผันรูป"] = { --ตามด้วยภาษา...
	description = "{{{langname}}} [[inflection]] [[Wiktionary:Modules|modules]], which contain Lua code for generating conjugation and declension tables.",
	umbrella = {
		parents = {{name = "มอดูลการผันรูป", sort = " "}},
		breadcrumb = "แบ่งตามภาษา",
	},
	parents = {"มอดูล"},
}



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


raw_categories["มอดูล"] = {
	description = "This is a general holder category for modules.",
	additional = "For more information on what modules are and how they work, see [[Wiktionary:Scribunto]]. For a complete list of all modules, see [[Special:PrefixIndex/Module:|here]].",
	parents = {"หมวดหมู่:วิกิพจนานุกรม"},
}

raw_categories["มอดูลที่ไม่จัดหมวดหมู่"] = {
	description = "Uncategorized modules.",
	additional = "Modules are placed here by [[MediaWiki:Scribunto-doc-page-does-not-exist]]. The default documentation page, [[Template:documentation/preloadModule]], also adds this category.",
	parents = { {name = "มอดูล", sort = " "} },
}

raw_categories["Module unit tests"] = {
	description = "Unit tests for modules.",
	parents = { {name = "มอดูล", sort = "1 test modules"} },
}

raw_categories["มอดูลภาคผนวก"] = {
	description = "Modules with functions that generate content for or extract information from pages in the Appendix namespace.",
	parents = { "มอดูล" },
}

raw_categories["Bot support modules"] = {
	description = "Modules for supporting individual bot accounts.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลหมวดหมู่"] = {
	intro = "{{also|:Category:Category templates}}",
	description = "Modules for adding categories to pages or generating the description and subcategories of category pages.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลข้อมูล"] = {
	description = "Modules that do not contain functions, but only export a table of data that is used by other modules. Modules that are in this category should be imported using <code>mw.loadData</code> rather than <code>require</code>.",
	parents = { "มอดูล" },
}

raw_categories["Character insertion data modules"] = {
	description = "Modules containing data for use by {{temp|chars}}.",
	parents = { "มอดูลข้อมูล" },
	breadcrumb = "character insertion",
}

raw_categories["Debugging modules"] = {
	description = "Modules used for debugging.",
	additional = "Some should only be used in sandbox modules or when using the [[mw:Extension:TemplateSandbox|{{MediaWiki:Templatesandbox-editform-legend}}]] button in the edit page of modules and templates.",
	parents = { "เมทามอดูลลูอา", "มอดูล" },
}

raw_categories["Definition modules"] = {
	description = "Modules that fuel templates that are used in [[Wiktionary:Glossary#definition line|definition lines]] of entries.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลล้าสมัย"] = {
	description = "Modules that should not be used, as their functions are performed by newer modules.",
	parents = { "มอดูล", "Category:Wiktionary maintenance" },
}

raw_categories["Discussion modules"] = {
	description = "Modules concerning discussion pages.",
	parents = { "มอดูล" },
}

raw_categories["Display text-generating modules"] = {
	description = "Modules that are used to generate display text.",
	additional = "Display text determines what is shown to the reader. In some languages it must be normalized, due to common errors caused by confusable characters, or so as to ensure a consistent display format.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลเอกสารการใช้งาน"] = {
	description = "Modules for generating documentation pages.",
	parents = { "มอดูล" },
}

raw_categories["Entry-generating modules"] = {
	description = "Modules with functions that are used to generate new entries.",
	parents = { "มอดูล" },
}

raw_categories["Entry name-generating modules"] = {
	description = "Modules that are used to generate entry names.",
	additional = "Entry names determine the page at which an entry is created, accounting for the removal of language-specified diacritics.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลรากศัพท์"] = {
	description = "Modules that fuel templates that define the etymology of entries.",
	parents = { "มอดูล" },
}

raw_categories["Form-of modules"] = {
	description = "Modules that generate the definition line of non-lemma forms, e.g. verb forms and noun forms.",
	parents = { "Definition modules", "มอดูล" },
}

raw_categories["มอดูลอรรถประโยชน์ทั่วไป"] = {
	description = "Modules that serve some sort of utility purpose in various entries but are used by multiple languages. Modules only used by one language should be at [[:Category:Utility modules]].",
	parents = { "มอดูล" },
}

raw_categories["มอดูลบรรทัดคำหลัก"] = {
	description = "Modules that support [[:Category:Headword-line templates by language|headword-line templates]] for a specific language.",
	additional = "See also [[:Category:Headword-line templates]].",
	parents = { "มอดูล" },
}

raw_categories["มอดูลการผันรูป"] = {
	description = "Modules used to support [[:Category:Inflection-table templates by language|inflection templates]] for a specific language.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลลิงก์ภายใน"] = {
	description = "Modules that are used in [[:Category:Internal link templates|internal link templates]].",
	parents = { "มอดูลอรรถประโยชน์ทั่วไป", "มอดูล" },
}

raw_categories["JSON-generating modules"] = {
	description = "Modules with functions that generate data in JSON format.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลภาษาและอักษร"] = {
	description = "Modules that process language and script codes and return data on them.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลรายชื่อ"] = {
	description = "Modules that generate lists and tables of entries.",
	parents = { "มอดูล" },
}

raw_categories["เมทามอดูลลูอา"] = {
	description = "Modules that have exported functions that are only used by other modules: that is, cannot be called using {{temp|#invoke:}}.",
	parents = { "มอดูล" },
}

raw_categories["Maintenance modules"] = {
	description = "Modules that fuel templates used for maintaining entries, such as cleanup templates (e.g. {{temp|attention}}), deletion templates (e.g. {{temp|rfd}}) and verification templates (e.g. {{temp|rfv}}).",
	parents = { "มอดูล" },
}

raw_categories["มอดูลการออกเสียง"] = {
	description = "Modules that fuel templates that are used to create the language-specific pronunciation of entries.",
	parents = { "มอดูล" },
}

raw_categories["Quotation and usage example modules"] = {
	description = "Modules that fuel templates that are used to format quotations and usage examples.",
	parents = { "Definition modules", "มอดูล" },
	breadcrumb = "quotation and usage example",
}

raw_categories["มอดูลการอ้างอิง"] = {
	description = "Modules that are used for [[:Category:Reference templates|reference templates]].",
	parents = { "มอดูล" },
}

raw_categories["มอดูลกระบะทราย"] = {
	description = "Test versions of modules intended for production use.",
	parents = { "มอดูล" },
}

raw_categories["Sortkey-generating modules"] = {
	description = "Modules that are used to generate sortkeys.",
	additional = "Sortkeys determine the order of entry names in categories.",
	parents = { "มอดูล" },
}

raw_categories["Swadesh modules"] = {
	description = "Modules containing [[Swadesh list]]s.",
	parents = { "มอดูล" },
}

raw_categories["Template interface modules"] = {
	description = "Modules whose purpose is to provide an interface between templates and the functions of a module.",
	additional = "They are usually named <code>.../templates</code>, and the functions present within them usually all have only a \"frame\" parameter.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลติดตาม"] = {
	description = "Modules that add tracking templates.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลการถอดอักษร"] = {
	description = "Modules that automatically convert text in one script to another.",
	additional = "Most of them convert non-Latin scripts to Latin (romanisation/romanization), and are used by templates or modules to generate transliteration of text that is tagged with a particular language. Each language's transliteration module is specified in its data table (for which, see the category {{catlink|Language data modules}}).",
	parents = { "มอดูล" },
}

raw_categories["มอดูลไม่ได้ใช้"] = {
	description = "Unused modules.",
	parents = { "มอดูล" },
}

raw_categories["มอดูลกระบะทรายของผู้ใช้"] = {
	description = "Modules that are for personal use and testing by individual editors.",
	additional = "These should all begin with <code>User:</code> followed by the user's name. If several sandbox modules are needed by a single user, subpages can be created. These modules should not be used in real Wiktionary content pages, as all content on those pages should be editable by anyone and, if necessary, edit protected.",
	parents = { "มอดูลกระบะทราย", "มอดูล" },
}

raw_categories["มอดูลอรรถประโยชน์"] = {
	description = "Modules that deal with several utilities needed by a certain language.",
	additional = "Usually their names end with -utilities or -common (preceded by the language code), although more specific utility modules that one language uses may reside here as well. If a utility is used by many languages, it should be in [[:Category:General utility modules]].",
	parents = { "มอดูล" },
}

raw_categories["Vote modules"] = {
	description = "Modules used to manage Wiktionary votes.",
	parents = { "มอดูล" },
}

raw_categories["Wikitext parsing modules"] = {
	description = "Modules that contain functions that grab the wikitext of a page and get information from it by performing string operations on it.",
	parents = { "มอดูล" },
}



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


for _, mod_type in ipairs { "Entry name-generating", "Sortkey-generating", "การถอดอักษร" } do --เปลี่ยนชื่อตามข้างบน
	table.insert(raw_handlers, function(data)
		local count, languages = data.category:match(("^%s modules used by ([0-9]+) (languages?)$"):format(
			-- need to escape the hyphen in 'Entry name-generating' and 'Sortkey-generating'
			require("Module:pattern utilities").pattern_escape(mod_type)))
		if count then
			return {
				description = data.category .. ".",
				breadcrumb = "used by " .. count .. " " .. languages,
				parents = {
					{ name = "มอดูล" .. mod_type, sort = count },
				},
			}
		end
	end)
end


return {LABELS = labels, RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}