Modul:Country alias: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
k uji coba
kTidak ada ringkasan suntingan
 
(1 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 4:
--[[
The following country code is used for multiple countries:
ANG (workaround: added ANG_CGF for use with CommonwealthPesta GamesOlahraga Persemakmuran)
 
The following names have different names/flags based on sport/year
Baris 11:
Individual Olympic Athletes IOA, IOA_2000 (IOA changed to Independent Olympic Athletes in 2012)
Russian Athletes OAR (2018), ROC_2020 (2020 Summer, 2022 Winter)
SWZ Swaziland became Eswatini after the 2018 CommonwealthPesta GamesOlahraga Persemakmuran
MKD Macedonia became North Macedonia in 2019
ART No "Athlete" before Refugee Team @ 2017 AIMAG
Baris 69:
local fullName = stripToNil(args.fullName)
if fullName then
year = tonumber(fullName:match('^%d+$')) -- ignore args.year
end
if alias == 'ANG' then
if games == 'CommonwealthPesta GamesOlahraga Persemakmuran' then
alias = 'ANG_CGF'
end
elseif alias == 'ART' then
if games == 'AsianPesta IndoorOlahraga andDalam MartialRuangan Artsdan GamesBela Diri Asia' then
alias = 'ART_AIMAG'
end
elseif alias == 'GBR' then
if games == 'WorldKejuaraan ChampionshipsDunia in AthleticsAtletik' or games == 'WorldKejuaraan AthleticsAtletik ChampionshipsDunia' or games == 'EuropeanKejuaraan AthleticsEropa ChampionshipsAtletik' then
alias = 'GBR_WCA'
elseif games == 'EuropeanKejuaraan ChampionshipsEropa' then
if year == 2018 then
alias = 'GBR_WCA'
Baris 88:
end
elseif alias == 'HKG' then
if games == 'CommonwealthPesta GamesOlahraga Persemakmuran' then
alias = 'HKG_CGF'
end
Baris 103:
elseif alias == 'SWZ' then
if fullName then
if year and year >= 2018 and fullName ~= '2018Pesta CommonwealthOlahraga GamesPersemakmuran 2018' then
alias = 'SWZ_YO2018'
end
elseif year and year >= 2018 and games ~= 'CommonwealthPesta GamesOlahraga Persemakmuran' then
alias = 'SWZ_YO2018'
else
Baris 123:
elseif alias == 'RUS' then
if year and year==2020 then
if games=='SummerOlimpiade OlympicsMusim Panas' then
alias = 'ROC_2020'
elseif games=='SummerParalimpiade ParalympicsMusim Panas' then
alias = 'RPC'
end
elseif year and year==2022 and games=='WinterOlimpiade OlympicsMusim Dingin' then
alias = 'ROC_2020'
end
elseif alias == 'ROC' then
if year and year==1960 and games=='SummerOlimpiade OlympicsMusim Panas' then
alias = 'ROC_Formosa'
elseif year and ( year==1964 or year==1968 ) and games=='SummerOlimpiade OlympicsMusim Panas' then
alias = 'ROC_Taiwan'
elseif year and year==2020 and games=='SummerOlimpiade OlympicsMusim Panas' then
alias = 'ROC_2020'
elseif year and year==2022 and games=='WinterOlimpiade OlympicsMusim Dingin' then
alias = 'ROC_2020'
elseif year and year==2020 and games=='SummerParalimpiade ParalympicsMusim Panas' then
alias = 'RPC'
else
Baris 219:
local games = stripToNil(args[2])
local athletes = stripToNil(args[3])
games = games and (games'Olimpiade ' .. ' Olympics'games) or 'OlympicsOlimpiade'
local parms = {
alias = code,
Baris 259:
-- Implement [[Template:FlagIOCathlete]].
dispType = 'athlete'
args[3] = 'Olimpiade ' .. (args[3] or '') .. ' Olympics'
end
if dispType == 'name' or dispType == 'team' then
Baris 274:
alias = code,
fullName = games,
year = games:match('^%d+$'),
games = games:gsub('^ ?%d+ ?$', ''),
}
local fullName = countryAlias(parms)