Lompat ke isi

Modul:category tree/topic cat/data

Dari Wikikamus bahasa Indonesia, kamus bebas

Dokumentasi untuk modul ini dapat dibuat di Modul:category tree/topic cat/data/doc

local labels = {}
local handlers = {}

local subpages = {
	"Anatomi",
	"Bangunan",
	"Komunikasi",
	"Budaya",
	"Kebumian",
	"Makanan dan minuman",
	"Sejarah",
	"Manusia",
	"Bentuk kehidupan",
		"Binatang",
		"Tumbuhan",
	"Matematika",
	"Lain-lain",
	"Nama",
	"Alam",
	"Angka",
	"Tokoh",
	"Filsafat",
	"Tempat",
	"Sains",
	"Seks",
	"Sosial",
	"Masyarakat",
	"Olahraga",
	"Teknologi",
	"Waktu",
	"Transportasi",
}

labels["semua topik"] = {
	description = "{{{langname}}} terms organized by topic, such as \"Family\" or \"Chemistry\".",
	parents = {{module = "poscatboiler", args = {label = "{{{langcat}}}", raw = true, called_from_inside = true}}},
}

labels["daftar topik"] = {
	description = "All topics currently available in {{{langname}}}.",
	parents = {{name = "all topics", sort = " *"}},
}

labels["semua set"] = {
	description = "{{{langname}}} terms that belong to a particular set of things, such as \"Planets\" or \"Canids\".",
	parents = {{module = "poscatboiler", args = {label = "{{{langcat}}}", raw = true, called_from_inside = true}}},
}

labels["daftar set"] = {
	description = "All sets currently available in {{{langname}}}.",
	parents = {{name = "all sets", sort = " *"}},
}

for label, data in pairs(labels) do
	data.module = "Modul:category tree/topic cat/data"
end

-- Import subpages
for _, subpage in ipairs(subpages) do
	local datamodule = "Modul:category tree/topic cat/data/" .. subpage
	local retval = require(datamodule)
	if not retval["LABELS"] then
		retval = {LABELS = retval}
	end
	for label, data in pairs(retval["LABELS"]) do
		if labels[label] and not retval["IGNOREDUP"] then
			error("Label " .. label .. " defined in both [["
				.. datamodule .. "]] and [[" .. labels[label].module .. "]].")
		end
		data.module = datamodule
		labels[label] = data
	end
	if retval["HANDLERS"] then
		for _, handler in ipairs(retval["HANDLERS"]) do
			table.insert(handlers, { module = datamodule, handler = handler })
		end
	end
end

return {LABELS = labels, HANDLERS = handlers}