Module:Languages/data/all

From The Languages of David J. Peterson
Revision as of 11:16, 5 July 2023 by Juelos (talk | contribs) (Created page with "local u = mw.ustring.char local modules = { ["Module:languages/data/2"] = true, ["Module:languages/data/exceptional"] = true, } for i = 1, 26 do modules["Module:languages/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Languages/data/all/documentation

local u = mw.ustring.char

local modules = {
	["Module:languages/data/2"] = true,
	["Module:languages/data/exceptional"] = true,
}
for i = 1, 26 do
	modules["Module:languages/data/3/" .. u(0x60+i)] = true
end

local m = {}

for mname in pairs(modules) do
	for key, value in pairs(require(mname)) do
		if value[4] == "All" then
			local scripts = {}
			for script in pairs(require("Module:scripts/data")) do
				table.insert(scripts, script)
			end
			value[4] = scripts
		end
		m[key] = value
	end
	local xname = mname .. "/extra"
	for lkey, lvalue in pairs(require(xname)) do
		if m[lkey] then
			for key, value in pairs(lvalue) do
				m[lkey][key] = lvalue[key]
			end
		end
	end
end

return m