Module:CapacityExchange/sandbox
Appearance
| This is the module sandbox page for Module:CapacityExchange (diff). |
| This module is rated as beta, and is ready for widespread use. It is still new and should be used with some caution to ensure the results are as expected. |
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