8,282
edits
No edit summary |
No edit summary |
||
Line 170: | Line 170: | ||
end | end | ||
else | else | ||
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) | if mw.title.new(link, 'main').exists == false then | ||
link = i18n.modLink:gsub( '%$1', 'mcwiki' ):gsub( '%$2', name ) | |||
else | |||
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) | |||
for _, suffix in pairs( i18n.suffixes ) do | |||
link = link:gsub( ' ' .. suffix .. '$', '' ) | |||
end | |||
end | end | ||
end | end |