Difference between revisions 21306959 and 26847635 on frwiktionary

local export = {}
local m_languages = require('Module:languages')

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
	if mw.title.getCurrentTitle().nsText ~= "Category" and mw.title.getCurrentTitle().nsText ~= "Catégorie" then
		error("This template/module can only be used on pages in the Category: namespace.")
(contracted; show full)	
	return table.concat(categories, "") .. table.concat(boxes, "\n") .. "\n" .. table.concat(display, "\n\n")
end

function show_error(text)
	return  mw.getCurrentFrame():expandTemplate{title = "maintenance box", args = {
		"red",
		image = "[[File:
Ambox warning pnOOjs UI icon alert-destructive.svg|50px]]",
		title = "The automatically-generated contents of this category has errors.",
		text = text,
		}}
end

-- Check the name of the current page, and return an error if it's not right.
function check_name(current, template, info)
(contracted; show full)			return mw.getCurrentFrame():expandTemplate{title = TOC_template.text, args = {}}
		end
	end
	
	return nil
end

return export