Module:utilities/data: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
Tag: Reverted
(Undo revision 320501 by Sware (talk))
Tag: Undo
 
Line 41: Line 41:
["cu"] = "Cyrs",
["cu"] = "Cyrs",
["el"] = "Grek",
["el"] = "Grek",
["grc"] = "Polyt",
["grc"] = "polytonic",
["he"] = "Hebr",
["he"] = "Hebr",
["ka"] = "Geor",
["ka"] = "Geor",
Line 50: Line 50:
["xfa"] = "Ital",
["xfa"] = "Ital",
["zle-ono"] = "Cyrs",
["zle-ono"] = "Cyrs",
["zle-ort"] = "Cyrs",
["hi"] = "Deva",
["hi"] = "Deva",
["mr"] = "Deva",
["mr"] = "Deva",
Line 58: Line 57:
}
}


local lower = require("Module:string utilities").lower
-- Namespaces in which format_categories will add categories.
 
data.allowedNamespaces = {
local interwikis = {}
[""] = true,
for _, interwiki in pairs(mw.site.interwikiMap()) do
["Appendix"] = true,
interwikis[lower(interwiki.prefix)] = true
["Reconstruction"] = true,
end
["Citations"] = true,
data.interwikis = interwikis
["Contionary"] = true,
 
}
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
return data

Latest revision as of 20:29, 31 July 2023



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",
	["hi"] = "Deva",
	["mr"] = "Deva",
--[[
	[""] = "",
]]
}

-- Namespaces in which format_categories will add categories.
data.allowedNamespaces = {
	[""] = true,
	["Appendix"] = true,
	["Reconstruction"] = true,
	["Citations"] = true,
	["Contionary"] = true,
}

return data