Difference between revisions of "Module:Category tree/topic cat/data"

From Multilingual Bookbinding Dictionary
Jump to navigation Jump to search
(Created page with "local labels = {} local subpages = { "Body", "Buildings and structures", "Communication", "Culture", "Earth", "Food and drink", "History", "Human", "Lifeforms", "A...")
 
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
local subpages = {
 
local subpages = {
"Body",
 
"Buildings and structures",
 
"Communication",
 
 
"Culture",
 
"Culture",
"Earth",
+
"Forwarding",
"Food and drink",
+
    "Tools",
"History",
+
"Materials",
"Human",
+
    "Styles",
"Lifeforms",
+
    "Processes"
"Animals",
+
 
"Plants",
 
"Mathematics",
 
"Miscellaneous",
 
"Names",
 
"Nature",
 
"Numbers",
 
"People",
 
"Philosophy",
 
"Places",
 
"Sciences",
 
"Sex",
 
"Social acts",
 
"Society",
 
"Sports",
 
"Technology",
 
"Time",
 
"Transport",
 
 
}
 
}
  
 
labels["all topics"] = {
 
labels["all topics"] = {
 
description = "{{{langname}}} terms organized by topic, such as \"Family\" or \"Chemistry\".",
 
description = "{{{langname}}} terms organized by topic, such as \"Family\" or \"Chemistry\".",
parents = {{template = "langcatboiler"}},
+
parents = {{template = "topics"}},
 
}
 
}
  

Latest revision as of 16:27, 19 September 2018

Documentation for this module may be created at Module:Category tree/topic cat/data/doc

local labels = {}

local subpages = {
	"Culture",
	"Forwarding",
    "Tools",
	"Materials",
    "Styles",
    "Processes"

}

labels["all topics"] = {
	description = "{{{langname}}} terms organized by topic, such as \"Family\" or \"Chemistry\".",
	parents = {{template = "topics"}},
}

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

labels["all sets"] = {
	description = "{{{langname}}} terms that belong to a particular set of things, such as \"Planets\" or \"Canids\".",
	parents = {{template = "langcatboiler"}},
}

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

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

-- Import subpages
for _, subpage in ipairs(subpages) do
	local datamodule = "Module:category tree/topic cat/data/" .. subpage
	for label, data in pairs(require(datamodule)) do
		assert(not labels[label], "Duplicate label: " .. label)
		data.edit = datamodule
		labels[label] = data
	end
end

return labels