Module:Soldier: Difference between revisions
Do not link or categorize bogus IPW labels |
Do not link or categorize bogus IPW labels |
||
| Line 636: | Line 636: | ||
end | end | ||
return out | return out | ||
end | |||
local function isJunkIpwItalianLabel(part) | |||
local lower = mw.ustring.lower(trim(part)) | |||
local spaced = mw.ustring.gsub(lower, '%s+', ' ') | |||
local junk = { | |||
['16063'] = true, ['16095'] = true, ['16302'] = true, | |||
['16320'] = true, ['16695'] = true, | |||
['1st army'] = true, ['2 day'] = true, ['2/23/44'] = true, | |||
} | |||
return junk[spaced] == true | |||
end | end | ||
| Line 691: | Line 702: | ||
part = trim(part) | part = trim(part) | ||
if part ~= '' then | if part ~= '' then | ||
if isIpw then | if pagePrefix == 'IPW Italian ' then | ||
if isJunkIpwItalianLabel(part) then | |||
table.insert(out, part) | |||
else | |||
table.insert(out, string.format('[[Team %s%s|%s %s]]', pagePrefix, part, label, part)) | |||
end | |||
elseif isIpw then | |||
local code, shown, mii = normalizeIpwTeamCode(part) | local code, shown, mii = normalizeIpwTeamCode(part) | ||
if mii then | if mii then | ||