Module:Sandbox: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 20: Line 20:
end
end


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


return p;
return p;