-- This module implements the {{Uses TemplateStyles}} template.localyesno=require('Module:Yesno')localmList=require('Module:List')localmTableTools=require('Module:TableTools')localmMessageBox=require('Module:Message box')localp={}functionp.main(frame)localorigArgs=frame:getParent().argslocalargs={}fork,vinpairs(origArgs)dov=v:match('^%s*(.-)%s*$')ifv~=''thenargs[k]=vendendreturnp._main(args)endfunctionp._main(args)localtStyles=mTableTools.compressSparseArray(args)localbox=p.renderBox(tStyles)localtrackingCategories=p.renderTrackingCategories(args,tStyles)returnbox..trackingCategoriesendfunctionp.renderBox(tStyles)localboxArgs={}localtstyleCount=#tStyleslocaltstyleText='stîla'iftstyleCount<1thenboxArgs.text='<strong class="error">Şaşî: TemplateStyles nehatiye nivîsîn</strong>'elseiftstyleCount>1thentstyleText=''endlocaltStylesLinks={}fori,tsinipairs(tStyles)dolocalsandboxLink=nillocaltsTitle=mw.title.new(ts)iftsTitlethenlocaltsSandboxTitle=mw.title.new(string.format('%s:%s/sandbox/%s',tsTitle.nsText,tsTitle.baseText,tsTitle.subpageText))iftsSandboxTitleandtsSandboxTitle.existsthensandboxLink=string.format(' ([[:%s|sandbox]])',tsSandboxTitle.prefixedText)endendtStylesLinks[i]=string.format('[[:%s]]%s',ts,sandboxLinkor'')endlocaltStylesList=mList.makeList('bulleted',tStylesLinks)boxArgs.text='[[:en:Wikipedia:TemplateStyles|TemplateStyles]] bi kar tîne:\n'..tStylesListendboxArgs.type='notice'boxArgs.small=trueboxArgs.image='[[File:Farm-Fresh css add.svg|32px|alt=CSS|link=:en:Wikipedia:TemplateStyles]]'returnmMessageBox.main('mbox',boxArgs)endfunctionp.renderTrackingCategories(args,tStyles,titleObj)ifyesno(args.nocat)thenreturn''endlocalcats={}-- Error categoryif#tStyles<1thencats[#cats+1]='Şaşiyên TemplateStyles bi kar tîne'end-- TemplateStyles categorytitleObj=titleObjormw.title.getCurrentTitle()localsubpageBlacklist={doc=true,sandbox=true,sandbox2=true,testcases=true}if(titleObj.namespace==10ortitleObj.namespace==828)andnotsubpageBlacklist[titleObj.subpageText]thenlocalcategory=args.categoryifnotcategorythencategory=categoryor'TemplateStyles bi kar tîne'endcats[#cats+1]=categoryifnotyesno(args.noprotcat)thenlocalcurrentProt=titleObj.protectionLevels["edit"]andtitleObj.protectionLevels["edit"][1]ornillocaladdedLevelCat=falselocaladdedPadlockCat=falsefori,tsinipairs(tStyles)dolocaltsTitleObj=mw.title.new(ts)localtsProt=tsTitleObj.protectionLevels["edit"]andtsTitleObj.protectionLevels["edit"][1]orniliftsProt~=currentProtandnotaddedLevelCatthencats[#cats+1]=nilendiftsProtandnotaddedPadlockCatthenlocalcontent=tsTitleObj:getContent()ifnotcontent:find("{{pp-")thencats[#cats+1]=niladdedPadlockCat=trueendendendendendfori,catinipairs(cats)docats[i]=string.format('[[Kategorî:%s]]',cat)endreturntable.concat(cats)endreturnp