Модул:category tree/topic cat/data
Изглед
Script error: The function "main" does not exist.
local labels = {}
local handlers = {}
local top_level_data_module = "Модул:category tree/topic cat/data"
local data_module_prefix = top_level_data_module .. "/"
local subpages = {
"Body",
"Buildings and structures",
"Communication",
"Culture",
"Religion",
"Earth",
"Food and drink",
"Games",
"History",
"Human",
"People",
"Lifeforms",
"Animals",
"Plants",
"Miscellaneous",
"Names",
-- "Places",
"Места",
"Nature",
"Numbers",
"Philosophy",
"Sciences",
"Mathematics",
"Sex",
"Society",
"Sports",
"Technology",
"Thesaurus",
"Time",
"Transport",
"Physical actions",
}
labels["све теме"] = {
type = "toplevel",
description = "{{{langname}}} terms organized by topic, such as \"Family\", \"Chemistry\", \"Planets\", \"Canids\" или \"Cities in France\".",
parents = {{module = "poscatboiler", args = {label = "{{{langcat}}}", raw = true, called_from_inside = true}}},
}
for _, typ in ipairs { "повезаних", "set", "type", "name", "grouping", "related-to" } do
labels["списак " .. typ .. " категорија"] = {
type = "toplevel",
description = "Све " .. typ .. " категорије тренутно присутне у {{{langname}}}.",
parents = {{name = "све теме", sort = " *"}},
}
end
labels["списак мешовитих категорија"] = {
type = "toplevel",
description = "All categories currently available in {{{langname}}} that belong to more than one type.",
parents = {{name = "све теме", sort = " *"}},
}
for label, data in pairs(labels) do
data.module = top_level_data_module
end
-- Import subpages
for _, subpage in ipairs(subpages) do
local datamodule = data_module_prefix .. 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 .. " дефинисана у оба [["
.. datamodule .. "]] и [[" .. 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}