Module:Sandbox/Jackmcbarn Explained

local getTarget = require('Module:Redirect').getTargetlocal p =

local function pagetype(nsText) return nsText

and 'articles' or (mw.ustring.lower(nsText) .. ' pages')end

function p.main(frame) local currentTitle = mw.title.getCurrentTitle local target = getTarget(currentTitle) if target then local currentNsText, targetNsText = currentTitle.nsText, mw.title.new(target).nsText if currentNsText ~= targetNsText then return string.format('', pagetype(currentNsText), pagetype(targetNsText)) end end return ''end

return p