localexport={}functionexport.show(frame)localoutput={}-- Hacky way to allow function to be called from other modules.localargs=(frame.getParentandframe:getParent().args)orframelocaldemo=falselocalFULLPAGENAME=mw.title.getCurrentTitle().fullTextlocalBASEPAGENAME,SUBPAGENAME=FULLPAGENAME:match("^(.-)/([^/]-)$")-- BASEPAGENAME = BASEPAGENAME or FULLPAGENAMEifframe.getParentandFULLPAGENAME==frame:getParent():getTitle()thendemo=trueendoutput[#output+1]='<div class="noprint plainlinks shortcut-box">'ifargs.tempthenoutput[#output+1]="Temporary [[Wiktionary:Shortcut|shortcut"..(args[2]and's'or'').."]]:<br/>"elseoutput[#output+1]="[[Wiktionary:Shortcut|Shortcut"..(args[2]and's'or'').."]]:<br/>"endlocalattn=falsefori,shortcutinipairs(args)dolocaltitle=mw.title.new(shortcut)ifnottitlethenoutput[#output+1]='<span class="attentionseeking">(<code>'..mw.text.nowiki(shortcut)..'</code>)</span><br/>'attn=trueelselocaliattn=falselocalitemifnottitle.existsthenattn=truelocalquery='action=edit&redlink=1&preloadtext='..mw.uri.encode('#REDIRECT [['..FULLPAGENAME..']]')iftitle.nsText=="Template"thenitem='<code>{{['..tostring(mw.uri.fullUrl(shortcut,query))..' <span style="color:#c20;">'..title.text..'</span>]}}</code>'elseitem='['..tostring(mw.uri.fullUrl(shortcut,query))..' <span style="color:#c20;">'..shortcut..'</span>]'endelseiftitle.nsText=="Template"thenitem='<code>{{['..tostring(mw.uri.fullUrl(shortcut,'redirect=no'))..' '..title.text..']}}</code>'elseitem='['..tostring(mw.uri.fullUrl(shortcut,'redirect=no'))..' '..shortcut..']'endifnotdemothenlocalredirectTarget=title.redirectTargetifredirectTargetthenredirectTarget.fragment=''-- remove fragment, if presentlocaltargetText=redirectTarget.fullTextiftitle.nsText=="Template"thenifSUBPAGENAME=='documentation'theniattn=(targetText~=BASEPAGENAME)elseiattn=(targetText~=FULLPAGENAME)endelseifSUBPAGENAME=='documentation'theniattn=not(targetText==BASEPAGENAMEortargetText==FULLPAGENAME)elseiattn=not(targetText==FULLPAGENAMEortargetText==FULLPAGENAME..'/documentation')endendendifnot(redirectTargetandredirectTarget.exists)theniattn=trueendendendifiattnthenitem='<span class="attentionseeking">'..item..'</span>'endoutput[#output+1]=item..'<br/>'attn=attnoriattnendendifnotargs.nocatthenifattnthenoutput[#output+1]='[[Category:Shortcut boxes needing attention]]'endifSUBPAGENAME~='documentation'thenoutput[#output+1]='[[Category:Wiktionary pages with shortcuts]]'endendoutput[#output+1]='</div>'returntable.concat(output)endreturnexport