Module:category tree/poscatboiler/data/wiktionary maintenance

Wiktionary වෙතින්

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["වික්ෂනරි නඩත්තු කටයුතු"] = {
	description = "Categories containing pages that are being tracked for attention and improvement by editors.",
	breadcrumb = "නඩත්තු කටයුතු",
	parents = "වික්ෂනරිය",
}

raw_categories["Pages using lite templates"] = {
	description = "Pages which use at least one of the lite templates.",
	additional = "See [[:Category:Lua-free templates]].",
	breadcrumb = "Using lite templates",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with tab characters"] = {
	description = "Pages which contain a tab character in their wikitext.",
	additional = "These should either be removed or replaced with spaces, because they go against [[WT:NORM]].",
	breadcrumb = "Tab characters",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with unwanted L1 headings"] = {
	description = "Pages which contain an unwanted level 1 heading.",
	additional = "Level 1 headings are not used in Wiktionary content pages, and only occur due to user error or vandalism.",
	breadcrumb = "Unwanted L1 headings",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with DEFAULTSORT conflicts"] = {
	topright = "{{shortcut|CAT:DEFAULTSORT}}",
	description = "Pages on which the {{tl|DEFAULTSORT:}} magic word has been used multiple times with different values.",
	additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DEFAULTSORT:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of mainspace or the Reconstruction namespace)." ..
		"\n\nSee also [[:Category:Pages with DISPLAYTITLE conflicts]].",
	breadcrumb = "DEFAULTSORT conflicts",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with DISPLAYTITLE conflicts"] = {
	topright = "{{shortcut|CAT:DISPLAYTITLE}}",
	description = "Pages on which the {{tl|DISPLAYTITLE:}} magic word has been used multiple times with different values.",
	additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DISPLAYTITLE:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of maiespace)." ..
		"\n\nSee also [[:Category:Pages with DEFAULTSORT conflicts]].",
	breadcrumb = "DISPLAYTITLE conflicts",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with raw sortkeys"] = {
	description = "Pages on which a sortkey has been used with a raw category.",
	additional = "For example, <code><nowiki>[[Category:IPA symbols|B]]</nowiki></code>." ..
	"\n\nThese are a priority to replace with category templates, since they are hard-coded and override the {{tl|DEFAULTSORT:}} value for the page. This causes problems if there are any changes to the sorting scheme for the category, because there is no way of changing them centrally.\n\n" ..
	"By comparison, raw categories which have no sortkey are less of a problem, because they will use the {{tl|DEFAULTSORT:}} value; this can be centrally controlled and is designed to be language-neutral, so avoids the issue of different editors using multiple different sorting schemes for the same category. However, they should still be replaced with category templates, since there may be additional language-specific sorting rules which cannot otherwise be applied.",
	breadcrumb = "Raw sortkeys",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["මොඩියුල දෝෂ සහිත පිටු"] = {
	topright = "{{shortcut|CAT:E|CAT:ERR|CAT:ERROR}}",
	description = "මෙම ප්‍රවර්ගය [[වික්ෂනරි:Scribunto|ලුවා]] මොඩියුල හා සබැඳි දෝෂ සහිත පිටු ලැයිස්තුගත කරයි.",
	additional = "යම් අයිතමයක් දිනකට හෝ දෙකකට වඩා මෙහි ලැයිස්තු ගත වී ඇත්නම්, එය [[Wiktionary:GP|වින්කලය]] වෙත වාර්තා කිරීම බොහෝ දුරට උචිත වෙයි. මෙම දෝෂ සඳහා ප්‍රධාන හේතුව වන්නේ Memory errors වෙයි; මෙය පිළිබඳ ඇති සාකච්ඡාවක් [[වික්ෂනරි:Lua memory errors]] තුළ පවතියි." ..
		"\n\nඅදාළ පරිගණක මෘදුකාංගය විසින් සැකිල්ලක හෝ මොඩියුලයක වෙනසක් සිදු වූ විගස සබැඳි පිටු ක්ෂණිකව යාවත්කාලීන කිරීම සිදු නොකරන හෙයින්, මෙහි දක්වා ඇති දෝෂ මේ වන විටත් විසඳා තිබීමට ඉඩ ඇත. එම නිසා දෝෂ වාර්තා කිරීමට පෙර, එම දෝෂ තවමත් තිබේ දැයි සැක හැර දැනගන්න. \"[[meta:Help:Dummy_edit#Null_edit|අභිශූන්‍ය සංස්කරණයක්]]\" (පිටුව සංස්කරණය පිණිස ගෙන කිසිවක් වෙනස් නොකොට සේව් කිරීම) මගින් එය සිදු කළ හැක. එවිට දෝෂය නොපෙන්වන්නේ නම්, ඉන් අදහස් වන්නේ දෝෂය මේ වන විටත් විසඳා ඇති බවයි." ..
		"\n\n<u>[https://si.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=ප්‍රවර්ගය%3Aමොඩියුල%20දෝෂ%20සහිත%20පිටු&gcmlimit=20 මෙම සබැඳිය] ක්ලික් කර \"අයැදුමක් සිදු කරන්න\" මත ක්ලික් කිරීමෙන්, මෙහි දක්වා ඇති පිටු 20 දක්වා අදාළ සේවා දායකයේ කෑෂය විරේචනය එක වර කළ හැකිය.</u> මෙම සංඛ්‍යාව 5,000 දක්වා වෙනස් කළ හැකි මුත්, 30-100 ඉක්ම වූ ඕනෑම අගයක් බොහෝ දුරට time-outs සිදුවනු ඇත (පිටු වල ප්‍රමාණය අනුව)." ..
		"\n\nමෙම ප්‍රවර්ගයේ අන්තර්ගතය {{tl|maintenance category}} මගින් පාලනය වෙයි. එය දැනට සාකච්ඡා පිටු, පරිශීලක පිටු{{,}} සහ පරිශීලක වැලි පිල්ල මොඩියුල සහ සැකිලි වෙන ම ප්‍රවර්ග තුළට ඇතුළු කිරීම සිදු කරයි." ..
		"\n\n[[:ප්‍රවර්ගය:Pages with ParserFunction errors]], වෙතත් අවධානය යොමු කරන්න.",
	breadcrumb = "මොඩියුල දෝෂ",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages with ParserFunction errors"] = {
	topright = "{{shortcut|CAT:PFE}}",
	description = "Pages that have errors in a [[mw:Help:Extension:ParserFunctions|ParserFunction]] magic word.",
	additional = "Examples of these magic words are {{tl|#expr:}} and {{tl|#time:}}. යම් අයිතමයක් දිනකට හෝ දෙකකට වඩා මෙහි ලැයිස්තු ගත වී ඇත්නම්, එය [[Wiktionary:GP|වින්කලය]] වෙත වාර්තා කිරීම බොහෝ දුරට උචිත වෙයි." ..
		"\n\nඅදාළ පරිගණක මෘදුකාංගය විසින් සැකිල්ලක හෝ මොඩියුලයක වෙනසක් සිදු වූ විගස සබැඳි පිටු ක්ෂණිකව යාවත්කාලීන කිරීම සිදු නොකරන හෙයින්, මෙහි දක්වා ඇති දෝෂ මේ වන විටත් විසඳා තිබීමට ඉඩ ඇත. එම නිසා දෝෂ වාර්තා කිරීමට පෙර, එම දෝෂ තවමත් තිබේ දැයි සැක හැර දැනගන්න. \"[[meta:Help:Dummy_edit#Null_edit|අභිශූන්‍ය සංස්කරණයක්]]\" (පිටුව සංස්කරණය පිණිස ගෙන කිසිවක් වෙනස් නොකොට සේව් කිරීම) මගින් එය සිදු කළ හැක. එවිට දෝෂය නොපෙන්වන්නේ නම්, ඉන් අදහස් වන්නේ දෝෂය මේ වන විටත් විසඳා ඇති බවයි." ..
		"\n\n<u>[https://si.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=ප්‍රවර්ගය%3APages%20with%20ParserFunction%20errors&gcmlimit=20 මෙම සබැඳිය] ක්ලික් කර \"අයැදුමක් සිදු කරන්න\" මත ක්ලික් කිරීමෙන්, මෙහි දක්වා ඇති පිටු 20 දක්වා අදාළ සේවා දායකයේ කෑෂය විරේචනය එක වර කළ හැකිය.</u> මෙම සංඛ්‍යාව 5,000 දක්වා වෙනස් කළ හැකි මුත්, 30-100 ඉක්ම වූ ඕනෑම අගයක් බොහෝ දුරට time-outs සිදුවනු ඇත (පිටු වල ප්‍රමාණය අනුව)." ..
		"\n\nමෙම ප්‍රවර්ගයේ අන්තර්ගතය {{tl|maintenance category}} මගින් පාලනය වෙයි. එය දැනට සාකච්ඡා පිටු, පරිශීලක පිටු{{,}} සහ පරිශීලක වැලි පිල්ල මොඩියුල සහ සැකිලි වෙන ම ප්‍රවර්ග තුළට ඇතුළු කිරීම සිදු කරයි." ..
		"\n\n[[:ප්‍රවර්ගය:මොඩියුල දෝෂ සහිත පිටු]], වෙතත් අවධානය යොමු කරන්න.",
	breadcrumb = "ParserFunction errors",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Requests for moves, mergers and splits"] = {
	description = "Pages and categories which have been tagged with a request for them to be moved, merged or split.",
	breadcrumb = "Moves, mergers and splits",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු", "ඉල්ලීම්"},
	can_be_empty = true,
	hidden = true,
}

raw_categories["Pages to be merged"] = {
	description = "Pages tagged to be merged by the {{tl|merge}} template.",
	parents = {"Requests for moves, mergers and splits"},
	can_be_empty = true,
}

raw_categories["Pages to be moved"] = {
	description = "Pages tagged to be moved by the {{tl|move}} template.",
	parents = {"Requests for moves, mergers and splits"},
	can_be_empty = true,
}

raw_categories["Pages to be split"] = {
	description = "Pages tagged to be split by the {{tl|split}} template.",
	parents = {"Requests for moves, mergers and splits"},
	can_be_empty = true,
}

raw_categories["Pages using bad params when calling a template"] = {
	description = "Pages that use unrecognized parameters when calling a template.",
	breadcrumb = "Bad template params",
	parents = {"වික්ෂනරි නඩත්තු කටයුතු"},
	can_be_empty = true,
}

table.insert(raw_handlers, function(data)
	local template_type = data.category:match("^Pages using bad params when calling (.+) templates$")
	if template_type then
		local parents = {{
			name = "Pages using bad params when calling a template",
			sort = template_type == "general use" and "*" or template_type,
		}}
		local lang = require("Module:languages").getByCanonicalName(template_type, nil, true)
		if lang then
			table.insert(parents, {name = "entry maintenance", is_label = true, lang = lang:getCode()})
		end
		return {
			lang = lang and lang:getCode() or nil,
			description = "Pages that use unrecognized parameters when calling " .. template_type .. " templates.",
			parents = parents,
			breadcrumb = template_type,
		}
	end
end)

table.insert(raw_handlers, function(data)
	local template = data.category:match("^Pages using bad params when calling (.+)$")

	function get_template_language(template_name)
        -- convert "R:es:DRAE" and "RQ:es:DRAE" to "es-DRAE" for language matching
        template_name = template_name:gsub("^RQ?:", "")
        template_name = template_name:gsub(":", "-")

		-- Check if the template name starts with a hyphenated language code
		local lang
		possible_language_code = template_name:match("^([a-z][a-z][a-z]?-[a-z][a-z][a-z])-")
		if possible_language_code ~= nil then
			lang = require("Module:languages").getByCode(possible_language_code)
		end

		-- Check if the template name starts with a two or three character language code
		if lang == nil then
			possible_language_code = template_name:match("^([a-z][a-z][a-z]?)-")
			if possible_language_code ~= nil then
				lang = require("Module:languages").getByCode(possible_language_code)
			end
		end

 		return lang
	end


	if template then
        template_name_without_namespace = template:gsub("^Template:", "")

		lang = get_template_language(template_name_without_namespace)

		local template_type
		if lang == nil then
			template_type = "general use"
		else
			template_type = lang:getCanonicalName()
		end

		return {
			lang = lang and lang:getCode() or nil,
			description = "Pages that use unrecognized parameters when calling [[" .. template .. "]].",
	        additional = "These template calls should be reviewed and the bad parameter should be corrected or removed.",
			breadcrumb = template,
			parents = {{
				name = "Pages using bad params when calling " .. template_type .. " templates",
				sort = template_name_without_namespace,
			}},
			hidden = true,
		}
	end
end)

return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}