Jump to content

Module:CapacityExchange/sandbox

From Meta, a Wikimedia project coordination wiki
Module documentation

This Lua module is part of the Capacity Exchange platform. It is designed to display user capacities on their user pages. The module retrieves user data and capacity information from toolforge:capx, process and generates the HTML content to present the user's known and wanted capacities.

Usage

[edit]

{{CapacityExchange}}


local lang = mw.getCurrentFrame():preprocess("{{Int:Lang}}")
local mb = mw.ext.translate.messageBundle.new( "Module:CapacityExchange/locale.json", lang )
local ct = mw.ext.translate.messageBundle.new( "Module:CapacityExchange/capacities.json", lang )

local p = {}
function p.main(frame)
	return "capacities type:", tostring(type(ct)), "count:", tostring(type(ct)=="table" and #ct or "n/a")
end
return p