local p =
function p.teamroster(frame) local columns = tonumber(frame.args.columns)
-- WDlink_off is used to decide if a Wikidata flag will be shown if wiki
"//fr.wikipedia.org" or wiki
"//br.wikipedia.org" or wiki
"//de.wikipedia.org" or wiki
"//es.wikipedia.org" or wiki
"//nl.wikipedia.org" or wiki
"//pl.wikipedia.org" or wiki
"//ro.wikipedia.org" then WDlink_off = true end
local startOfSeason = squadSeason.claims["P580"][1].mainsnak.datavalue.value.time local _, _, seasonYear, seasonMonth, seasonDay = string.find(startOfSeason, "(%d+)-(%d+)-0*(%d+)")
local i = 1 while squadSeason.claims["P527"][i] do riderIds[i] = 'Q' .. squadSeason.claims["P527"][i].mainsnak.datavalue.value['numeric-id'] local rider = mw.wikibase.getEntityObject(riderIds[i]) local label = rider:getLabel local link = rider:getSitelink if label
null then riderNames[i] = label elseif label
if pcall(function flags[i] = flag(getNationalityOnDate (riderIds[i], startOfSeason), startOfSeason) end ) then else flags[i] = end
i = i + 1 end
local tableBody = local tableHeader = frame:expandTemplate local tableFoot = frame:expandTemplate i = 1 local tableSize = table.getn(riderNames) while riderNames[i] do tableBody = tableBody .. frame:expandTemplate
if columns
i then tableBody = tableBody .. tableFoot ..'
' local tableEnd = ' |
return '
'.. tableStart.. tableHeader.. tableBody.. tableFoot.. tableEnd.. ' |
return p