Pumunta sa nilalaman

Module:utilities/data

Mula Wiktionary
Pagbabago noong 17:36, 5 Abril 2023 ni 50.200.33.170 (usapan): (Nilikha ang pahina na may 'local data = {} data.notneeded = { ["und"] = true, ["cmn"] = true, ["ja"] = true, ["zu"] = true, ["nan"] = true, ["yue"] = true, ["ko"] = true, } data.neededhassubpage = { ["ga"] = true, ["gv"] = true, ["nv"] = true, ["roa-jer"] = true, ["fr"] = true, ["rm"] = true, ["prg"] = true, ["gd"] = true, ["twf"] = true, ["en"] = true, ["ro"] = true, ["egl"] = true, ["roa-tar"] = true, ["gl"] = true, ["ast"] = true, ["br"] = true, } --[[ Script...')
(iba) ← Mas luma | Kasalukuyang pagbabago (iba) | Mas bago → (iba)

Ang dokumentasyon ng ng modyul na ito ay maaaring likhain sa Module:utilities/data/doc

local data = {}

data.notneeded = {
	["und"] = true,
	["cmn"] = true,
	["ja"] = true,
	["zu"] = true,
	["nan"] = true,
	["yue"] = true,
	["ko"] = true,
}

data.neededhassubpage = {
	["ga"] = true,
	["gv"] = true,
	["nv"] = true,
	["roa-jer"] = true,
	["fr"] = true,
	["rm"] = true,
	["prg"] = true,
	["gd"] = true,
	["twf"] = true,
	["en"] = true,
	["ro"] = true,
	["egl"] = true,
	["roa-tar"] = true,
	["gl"] = true,
	["ast"] = true,
	["br"] = true,
}

--[[
	Script that should be applied to links in categories.
]]
data.catfix_scripts = {
	["ab"] = "Cyrl",
	["ae"] = "Avst",
	["ar"] = "Arab",
	["ary"] = "Arab",
	["be"] = "Cyrl",
	["cu"] = "Cyrs",
	["el"] = "Grek",
	["grc"] = "polytonic",
	["he"] = "Hebr",
	["ka"] = "Geor",
	["orv"] = "Cyrs",
	["ru"] = "Cyrl",
	["sa"] = "Deva",
	["syl"] = "Sylo",
	["xfa"] = "Ital",
	["zle-ono"] = "Cyrs",
	["zle-ort"] = "Cyrs",
	["hi"] = "Deva",
	["mr"] = "Deva",
--[[
	[""] = "",
]]
}

local lower = require("Module:string utilities").lower

local interwikis = {}
for _, interwiki in pairs(mw.site.interwikiMap()) do
	interwikis[lower(interwiki.prefix)] = true
end
data.interwikis = interwikis

local namespaces = {}
for _, namespace in pairs(mw.site.namespaces) do
	namespaces[lower(namespace.name)] = true
	for _, alias in pairs(namespace.aliases) do
		namespaces[lower(alias)] = true
	end
end
data.namespaces = namespaces

return data