Modul:Country alias: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan
k uji coba
Tag: Pengembalian manual
Baris 64:
-- Return alias parameter, possibly modified for exceptional cases.
local alias = stripToNil(args.alias)
local year = tonumber(args.year)
local games = stripToNil(args.games)
local year = tonumber(args.year)
local fullName = stripToNil(args.fullName)
if fullName then
Baris 71:
end
if alias == 'ANG' then
if games == 'PestaCommonwealth Olahraga PersemakmuranGames' then
alias = 'ANG_CGF'
end
elseif alias == 'ART' then
if games == 'PestaAsian OlahragaIndoor Dalamand RuanganMartial danArts Bela Diri AsiaGames' then
alias = 'ART_AIMAG'
end
elseif alias == 'GBR' then
if games == 'KejuaraanWorld DuniaChampionships Atletikin Athletics' or games == 'World Athletics Championships' or games == 'KejuaraanEuropean EropaAthletics AtletikChampionships' then
alias = 'GBR_WCA'
elseif games == 'KejuaraanEuropean EropaChampionships' then
if year == 2018 then
alias = 'GBR_WCA'
Baris 87:
end
elseif alias == 'HKG' then
if games == 'PestaCommonwealth Olahraga PersemakmuranGames' then
alias = 'HKG_CGF'
end
Baris 102:
elseif alias == 'SWZ' then
if fullName then
if year and year >= 2018 and fullName ~= 'Pesta2018 OlahragaCommonwealth Persemakmuran 2018Games' then
alias = 'SWZ_YO2018'
end
elseif year and year >= 2018 and games ~= 'PestaCommonwealth Olahraga PersemakmuranGames' then
alias = 'SWZ_YO2018'
else
Baris 122:
elseif alias == 'RUS' then
if year and year==2020 then
if games=='OlimpiadeSummer Musim PanasOlympics' then
alias = 'ROC_2020'
elseif games=='ParalimpiadeSummer Musim PanasParalympics' then
alias = 'RPC'
end
elseif year and year==2022 and games=='OlimpiadeWinter Musim DinginOlympics' then
alias = 'ROC_2020'
end
elseif alias == 'ROC' then
if year and year==1960 and games=='OlimpiadeSummer Musim PanasOlympics' then
alias = 'ROC_Formosa'
elseif year and ( year==1964 or year==1968 ) and games=='OlimpiadeSummer Musim PanasOlympics' then
alias = 'ROC_Taiwan'
elseif year and year==2020 and games=='OlimpiadeSummer Musim PanasOlympics' then
alias = 'ROC_2020'
elseif year and year==2020 and games=='Musim Panas' then
alias = 'ROC_2020'
elseif year and year==2022 and games=='OlimpiadeWinter Musim DinginOlympics' then
alias = 'ROC_2020'
elseif year and year==2020 and games=='ParalimpiadeSummer Musim PanasParalympics' then
alias = 'RPC'
else
local pageName = mw.title.getCurrentTitle().text
if pageName == 'AtletRussian KomiteOlympic OlimpiadeCommittee Rusiaathletes padaat Olimpiadethe Olympics' then
alias = 'ROC_2020'
end
end
elseif alias == 'YUG' or alias == 'SCG' then
if year and year > 1992 and year < 2004 and games ~= 'ParalimpiadeSummer Musim PanasParalympics' then
alias = 'FR_YUG'
end
Baris 206 ⟶ 204:
local games = stripToNil(args[2])
local athletes = stripToNil(args[3])
games = games and ('Olimpiade 'games .. games' Olympics') or 'OlimpiadeOlympics'
local parms = {
alias = code,
fullName = games,
year = games:match('^%d+$'),
games = games:gsub('^%d+$ ?', ''),
}
local fullName = countryAlias(parms)
Baris 217 ⟶ 215:
local dispName = fullName
if fullName == 'ROC' then
fullName = 'AtletRussian KomiteOlympic OlimpiadeCommittee Rusiaathletes'
end
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;[[{name} padaat the {games}|{dispName}]]{athletes}')
:gsub('{(%w+)}', {
athletes = athletes and
Baris 246 ⟶ 244:
-- Implement [[Template:FlagIOCathlete]].
dispType = 'athlete'
args[3] = 'Olimpiade ' .. (args[3] or '') .. ' Olympics'
end
if dispType == 'name' or dispType == 'team' then
Baris 261 ⟶ 259:
alias = code,
fullName = games,
year = games:match('^%d+$'),
games = games:gsub('^%d+$ ?', ''),
}
local fullName = countryAlias(parms)
Baris 268 ⟶ 266:
local dispName = stripToNil(args.name)
if fullName == 'ROC' then
fullName = 'AtletRussian KomiteOlympic OlimpiadeCommittee Rusiaathletes'
dispName = 'ROC'
if dispType == 'team' then dispType = 'name' end
Baris 274 ⟶ 272:
if dispType == 'name' then
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;[[{name} padaat the {games}|{dispName}]]{athletes}')
:gsub('{(%w+)}', {
athletes = athletes and
Baris 285 ⟶ 283:
}))
elseif dispType == 'team' then
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;[[{name} padaat the {games}|{dispName}]]{alias}')
:gsub('{(%w+)}', {
alias = ('&nbsp;<span style="font-size:90%;">(' .. code .. ')</span>'),
Baris 294 ⟶ 292:
}))
elseif dispType == 'athlete' then
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;{athletes}&nbsp;<span style="font-size:90%;">([[{name} padaat the {games}|{dispName}]])</span>')
:gsub('{(%w+)}', {
athletes = athletes,
Baris 303 ⟶ 301:
}))
elseif dispType == 'medalist' then
return (('{athletes}<br>[[File:{flag}|23x15px|border|alt=|link=]]&nbsp;[[{name} padaat the {games}|{dispName}]]')
:gsub('{(%w+)}', {
athletes = athletes,