Module:shortcut box: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 18: Line 18:


if args.temp then
if args.temp then
output[#output + 1] = "Temporary [[Wiktionary:Shortcut|shortcut" .. (args[2] and 's' or '') .. "]]:<br/>"
output[#output + 1] = "Temporary [[wikt:Wiktionary:Shortcut|shortcut" .. (args[2] and 's' or '') .. "]]:<br/>"
else
else
output[#output + 1] = "[[Wiktionary:Shortcut|Shortcut" .. (args[2] and 's' or '') .. "]]:<br/>"
output[#output + 1] = "[[wikt:Wiktionary:Shortcut|Shortcut" .. (args[2] and 's' or '') .. "]]:<br/>"
end
end
Line 57: Line 57:
local targetText = redirectTarget.fullText
local targetText = redirectTarget.fullText
if title.nsText == "Template" then
if title.nsText == "Template" then
if SUBPAGENAME == 'documentation' then
if SUBPAGENAME == 'doc' then
iattn = (targetText ~= BASEPAGENAME)
iattn = (targetText ~= BASEPAGENAME)
else
else
Line 63: Line 63:
end
end
else
else
if SUBPAGENAME == 'documentation' then
if SUBPAGENAME == 'doc' then
iattn = not (targetText == BASEPAGENAME
iattn = not (targetText == BASEPAGENAME
or targetText == FULLPAGENAME)
or targetText == FULLPAGENAME)
else
else
iattn = not (targetText == FULLPAGENAME
iattn = not (targetText == FULLPAGENAME
or targetText == FULLPAGENAME .. '/documentation')
or targetText == FULLPAGENAME .. '/doc')
end
end
end
end
Line 93: Line 93:
output[#output + 1] = '[[Category:Shortcut boxes needing attention]]'
output[#output + 1] = '[[Category:Shortcut boxes needing attention]]'
end
end
if SUBPAGENAME ~= 'documentation' then
if SUBPAGENAME ~= 'doc' then
output[#output + 1] = '[[Category:Wiktionary pages with shortcuts]]'
output[#output + 1] = '[[Category:Templates with shortcuts]]'
end
end
end
end