Module:Sandbox: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 21: Line 21:


function p.test_snapshot(frame)
function p.test_snapshot(frame)
local id = frame.args.id;
local name = frame.args.name;
local snapshot = mw.wikibase.getEntity(id);
local snapshot = mw.wikibase.getEntityIdForTitle(name);
local snapshot_name = snapshot:getLabel();
local snapshot_name = snapshot:getLabel();
local release = snapshot:formatPropertyValues('P9')['value'];
local release = snapshot:formatPropertyValues('P9')['value'];
return release
return snapshot_name .. "(" .. release .. ")"
end
end


return p;
return p;

Navigation menu