Modul:etymology languages/track-bad-etym-code

Daripada Wiktionary

Pendokumenan untuk modul ini boleh diciptakan di Modul:etymology languages/track-bad-etym-code/doc

local function track(page)
	require("Module:debug/track")("etymology languages/" .. page)
	return true
end

-- FIXME: Temporary. Lists nonstandard codes to track, so we can consider eliminating them. Consider moving to
-- [[Module:etymology languages/data]] so it only gets loaded once per page; but that would require restructuring
-- [[Module:etymology languages/data]] (probably a good idea anyway).
local nonstandard_codes_to_track = {
	["CL."] = true,
	["EL."] = true,
	["LL."] = true,
	["ML."] = true,
	["NL."] = true,
	["RL."] = true,
	["VL."] = true,
	-- badly named Prakrit codes
	["inc-pka"] = true,
	["inc-elu"] = true,
	["inc-khs"] = true,
	["inc-pmg"] = true,
	["inc-pmh"] = true,
	["inc-psi"] = true,
	["inc-pse"] = true,
	["prk-avt"] = true,
	["prc-prk"] = true,
	["bhl-prk"] = true,
	["dks-prk"] = true,
	["skr-prk"] = true,
	["cnd-prk"] = true,
	["sbr-prk"] = true,
	["abh-prk"] = true,
	["drm-prk"] = true,
	["odr-prk"] = true,
}

return function(code)
	if nonstandard_codes_to_track[code] then
		track(code)
	end
	return true
end