Module:Sandbox/Jackmcbarn: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
add pairs support
Jackmcbarn (talk | contribs)
basic tests
Line 42:
if type(k) == 'string' then
local to = args.to[k]
if type[(to]) == 'table' then
for _,v in ipairs(to) do
local retval = args.src[v]
Line 98:
 
function p.main(frame)
local args = {
mw.logObject(frame.args, 'frame.args')
uno = '#FF0000',
mw.logObject(frame:getParent().args, 'frame:getParent().args')
eins = '#ff0000',
end
dos = '#FF8000',
 
zwei = '#ff7f00',
function p.x(frame)
tres = '#ffff00',
mw.title.new(tonumber(frame.args[1]))
drei = '#FFFF00',
three = 'yellow'
}
local to = {
one = 'uno',
two = { 'dos', 'zwei' },
three = 'drei'
}
local wrapper = translationwrapper.create{src = args, to = to}
return wrapper
end