Module:Configuration list entry

local p = {} local getTranslatablePage = require("Module:Template translation").getTranslatedTemplate function p._main(name) -- FIXME: Module:Template translation should be more easily callable from Lua local fakeFrame = {args = {title="$wg" .. name, tntns="Manual"}} local translatedPage, present = getTranslatablePage(fakeFrame, true) if not present then error("Invalid configuration variable: $wg" .. name) end local translatedText = mw.title.new(translatedPage):getContent local lines = mw.text.split(translatedText,"\n") local inTemplate = false local removed, description for _, line in ipairs(lines) do		if line == "" then break end if inTemplate then summary = summary or line:match("^summary=(.*)$") removed = removed or line:match("^version_max=(.*)$") end end if summary then if removed then if tonumber(removed) < 1.19 then error("$wg" .. name .. " was removed before 1.19, so shouldn't be listed.") end summary = mw.getCurrentFrame:expandTemplate{title="removed-inline",args={removed}} .. summary end else error("Could not find summary for $wg" .. name) end return summary; end function p.main(frame) return p._main(frame.args.name) end return p;