Module:Redirect-distinguish: Difference between revisions
m
15 revisions imported from wikipedia:Module:Redirect-distinguish: All aboard the import train again. Originally imported from English Wikipedia.
(Added check for example values) |
m (15 revisions imported from wikipedia:Module:Redirect-distinguish: All aboard the import train again. Originally imported from English Wikipedia.) |
||
(12 intermediate revisions by 7 users not shown) | |||
Line 20:
end
local redirectTitle = mw.title.new(args[1])
local currentTitle = currentTitle or mw.title.getCurrentTitle()
if redirectTitle and redirectTitle.exists then▼
if
if not redirectTitle.isRedirect then▼
args[1] = args[1] .. '[[Category:Articles with redirect hatnotes needing review]]'▼
args[1] == 'TERM' or
end▼
currentTitle.namespace ~= 0
▲ elseif not string.match(args[1], 'REDIRECT%d+') and not args[1] == 'TERM' then
then
--do nothing
args[1] = args[1] .. '[[Category:Missing redirects]]'
if string.find(redirectTitle:getContent(), '#invoke:RfD') then
args[1] = args[1] ..
'[[Category:Articles with redirect hatnotes impacted by RfD]]'
else
args[1] = args[1] ..
▲ end
end
if not args[2] then
Line 38 ⟶ 49:
local redirect = table.remove(args, 1)
local text = string.format(
'"%s" redirects here.
redirect,
mHatlist.orList
)
return mHatnote._hatnote(text)
|