Այս մոդուլն օգտագործվում է բազմաթիվ էջերում, ուստի այստեղ կատարված փոփոխությունները նկատելի կլինեն շատերին: Խնդրում ենք ցանկացած փոփոխություն փորձարկել ավազարկղում կամ Ձեր անձնական ենթաէջում: Հաշվի առեք փոփոխությունների քննարկման հնարավորությունը քննարկման էջում կամ խորհրդարանում դրանք կատարելուց առաջ:
localcategorizeByAward=true;localWDS=require('Module:WikidataSelectors')localp={}localproject='hywiki';--Property:P19, Property:P20, Property:P119functionp.formatAwardWithQualifiers(context,options,statement)localentriesToLookupCategory={};localcircumstances=context.getSourcingCircumstances(statement);localresult=context.formatSnak(options,statement.mainsnak,circumstances);insertFromSnak(statement.mainsnak,entriesToLookupCategory)result=result..context.formatRefs(options,statement);if(categorizeByAward)thenlocalproperty=mw.ustring.upper(options.property);if(property=='P166')thenresult=result..getCategory('P2517',entriesToLookupCategory);endendreturnresult;end-- append entity id from snak to resultfunctioninsertFromSnak(snak,result)if(notcategorizeByAward)thenreturn;endif(snakandsnak.datavalueandsnak.datavalue.type=='wikibase-entityid'andsnak.datavalue.valueandsnak.datavalue.value['entity-type']=='item')thentable.insert(result,'Q'..snak.datavalue.value['numeric-id']);endendfunctiongetCategory(propertyToSearch,entriesToLookupCategoryFor)for_,awardIdinpairs(entriesToLookupCategoryFor)dolocalawardEntity=mw.wikibase.getEntity(awardId);localclaims=WDS.filter(awardEntity.claims,propertyToSearch);if(claims)thenfor_,claiminpairs(claims)doif(claim.mainsnakandclaim.mainsnakandclaim.mainsnak.datavalueandclaim.mainsnak.datavalue.type=="wikibase-entityid")thenlocalcatEntityId='Q'..claim.mainsnak.datavalue.value["numeric-id"];localcatEntity=mw.wikibase.getEntity(catEntityId);if(catEntityandcatEntity.sitelinks)thenif(catEntity.sitelinks[project]andcatEntity.sitelinks[project].title)thenreturn'[['..catEntity.sitelinks[project].title..']]';elsereturn'[[Կատեգորիա:Հոդվածներ, որոնք մրցանակակիրների կատեգորիայի կարիք ունեն]]'endendendendendendreturn'';endreturnp;