Modul:Country alias/sandbox: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan
kTidak ada ringkasan suntingan
Tag: Pengembalian manual
Baris 203:
local code = stripToNil(args[1]) or error('flagIOC parameter 1 should be a country code')
local games = stripToNil(args[2])
local athletes = stripToNil(args[43])
if year then
games = games and (games .. ' OlimpiadeOlympics' .. year) or 'OlimpiadeOlympics' else
local year = stripToNil(args[2])
end
local athletes = stripToNil(args[4])
if year or mw.ustring.len( games ) < 25 then
games = games and (games .. ' Olimpiade' .. year) or 'Olimpiade' else
games = games and (mw.ustring.sub( games, 1, mw.ustring.find( games, ' ', 1, true ) ) .. ' Olimpiade' .. mw.ustring.sub(games, mw.ustring.find( games, ' ', 1, true ) + 1)) or 'Olimpiade'
end
local parms = {
alias = code,
fullName = games,
year = games:match('^%d+'),
games = games:gsub('^%d+ ?', ''),
}
local fullName = countryAlias(parms)
parms.flag = true
local dispName = fullName
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;[[{name} pada {games}|{name}]]{athletes}')
if fullName == 'ROC' then
fullName = 'Russian Olympic Committee athletes'
end
return (('[[File:{flag}|22x20px|border|alt=|link=]]&nbsp;[[{name} pada {games}|{namedispName}]]{athletes}')
:gsub('{(%w+)}', {
athletes = athletes and
Baris 225:
games = games,
name = fullName,
dispName = dispName,
}))
end