Module:Mod List

local p = {}

function sort(cat, lang) local list = "" if lang == nil then list = mw:getCurrentFrame:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat, nottitlematch = '%/%', allowcachedresults = "true"}} else list = mw:getCurrentFrame:callParserFunction{name = "#dpl:", args = {namespace = "", category = cat .. lang, titlematch = '%' .. lang, allowcachedresults = "true"}} end

if list:find("Warning: No results.", 51, true) == nil then local mods = {} for mod in list:gsub("", "¦"):sub(9,-11):gmatch("([^¦]+)") do			table.insert(mods, mod) end table.sort(mods) local list = "" for _, mod in ipairs(mods) do			if lang == nil then list = list .. mod .. " &bull; " else local m = mod:match("%[%[.*|(.*)%]%]") --Doesn't matter which one we take list = list .. "" .. m:sub(1, -#lang-1) .. " &bull; " end end return list:sub(1,-20) else return "Translate mods" end end

p.major = function(params) return sort("Mods", params.args.lang) end

p.minor = function(params) return sort("Minor Mods", params.args.lang) end

return p