Module:Team appearances list: Difference between revisions

Content deleted Content added
add in African Games + alt name
swap out for multiple name options
Line 225:
else
return "African Games"
end
else
return inputName
end
end
 
local function teamName(year, inputName)
-- Modifies output of display being sent back to the hlist
-- for games that have had a name change but are still considered
-- the same competition.
if inputName=="Eswatini" or inputName=="Swaziland" then
if year <= 2018 then
return "Swaziland"
else
return "Eswatini"
end
elseif inputName=="Upper Volta" or inputName=="Burkina Faso" then
if year <= 1983 then
return "Upper Volta"
else
return "Burkina Faso"
end
elseif inputName=="Democratic Republic of the Congo" or inputName=="Zaire" then
if year >= 1984 and year <=1996 then
return "Zaire"
else
return "Democratic Republic of the Congo"
end
else
Line 274 ⟶ 301:
end
local compName = gameName(y, args.competition)
local teamOut = teamName(y, args.team)
table.insert(appearances, string.format(
'[[%s at the %d %s|%s]]',
args.teamteamOut, y, compName, display
))
end