Modul:Kategorizuj
Dokumentaci tohoto modulu lze vytvořit na stránceNápověda:Modul:Kategorizuj
require'strict'
localp={}
functionp.test(frame)
localWikidata=require'Modul:Wikidata'
locallib=require'Modul:Wikidata/lib'
localproperty=frame.args.property
localpattern=frame.args.pattern
localout={}
for_,valueinipairs(Wikidata.getRawValues{property=property})do
locallabel=mw.wikibase.getLabel(value)
iflabelthen
table.insert(out,lib.formatFromPattern(label,pattern))
end
end
returntable.concat(out,'')
end
returnp