Modul:Sports table/Badminton team: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan
NFarras (bicara | kontrib)
k Suntingan NFarras (bicara) dibatalkan ke versi terakhir oleh Medelam
Tag: Pengembalian
 
(9 revisi perantara oleh 2 pengguna tidak ditampilkan)
Baris 40:
for_against_style = string.lower(for_against_style)
if for_against_style=='m' or for_against_style=='match' or for_against_style=='matches' then
fa_letter = 'MP'
fa_word_sing = 'MainPartai'
fa_word_plur = 'MainPartai'
elseif for_against_style=='none' then
hide_for_against = true
else
fa_letter = 'MP'
fa_word_sing = 'MainPartai'
fa_word_plur = 'MainPartai'
end
Baris 71:
if game_for_against_style=='g' or game_for_against_style=='game' or game_for_against_style=='games' then
gfa_letter = 'G'
gfa_word_sing = 'GameGim'
gfa_word_plur = 'GamesGim'
elseif game_for_against_style=='none' then
hide_game_for_against = true
else
gfa_letter = 'G'
gfa_word_sing = 'GameGim'
gfa_word_plur = 'GamesGim'
end
Baris 100:
for_against_style = string.lower(for_against_style)
if point_for_against_style=='p' or point_for_against_style=='match' or point_for_against_style=='points' then
pfa_letter = 'PS'
pfa_word_sing = 'PoinSkor'
pfa_word_plur = 'PoinSkor'
elseif point_for_against_style=='none' then
hide_point_for_against = true
else
pfa_letter = 'PS'
pfa_word_sing = 'PoinSkor'
pfa_word_plur = 'PoinSkor'
end
-- Whether to use goal ratio (goal average) instead
Baris 133:
end
tt = p_sub.colhead(tt,team_width,team_head_text..VTE_text) -- Team col
tt = p_sub.colhead(tt,2030,'<abbr title="PlayedMain">Main</abbr>') -- Matches played col
if full_table then
tt = p_sub.colhead(tt,2030,'<abbr title="Menang">M</abbr>') -- Win col
if loss_first then
tt = p_sub.colhead(tt,2030,'<abbr title="Kalah">K</abbr>') -- Loss col
else
tt = p_sub.colhead(tt,2030,'<abbr title="Kalah">K</abbr>') -- Loss col
end
if not hide_for_against then
tt = p_sub.colhead(tt,2030,'<abbr title="Menang '..fa_word_plur..' for">M'..fa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,2030,'<abbr title="Kalah '..fa_word_plur..' against">K'..fa_letter..'A</abbr>') -- Against col
if do_ratio then
tt = p_sub.colhead(tt,2030,'<abbr title="Rasio '..fa_word_sing..' ratio">R'..fa_letter..'R</abbr>') -- Ratio col
elseif do_percentage then
tt = p_sub.colhead(tt,2030,'<abbr title="Persentase '..fa_word_sing..' percentage">%</abbr>') -- Percentage col
else
tt = p_sub.colhead(tt,2030,'<abbr title="Selisih '..fa_word_sing..' difference">S'..fa_letter..'D</abbr>') -- Difference col
end
if not hide_game_for_against then
tt = p_sub.colhead(tt,2030,'<abbr title="Menang '..gfa_word_plur..' for">M'..gfa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,2030,'<abbr title="Kalah '..gfa_word_plur..' against">K'..gfa_letter..'A</abbr>') -- Against col
if do_ratio then
tt = p_sub.colhead(tt,2030,'<abbr title="Rasio '..gfa_word_sing..' ratio">R'..gfa_letter..'R</abbr>') -- Ratio col
elseif do_percentage then
tt = p_sub.colhead(tt,2030,'<abbr title="Persentase '..gfa_word_sing..' percentage">%</abbr>') -- Percentage col
else
tt = p_sub.colhead(tt,2030,'<abbr title="Selisih '..gfa_word_sing..' difference">S'..gfa_letter..'D</abbr>') -- Difference col
end
if not hide_point_for_against then
tt = p_sub.colhead(tt,2030,'<abbr title="Menang '..pfa_word_plur..' for">M'..pfa_letter..'F</abbr>') -- For col
tt = p_sub.colhead(tt,2030,'<abbr title="Kalah '..pfa_word_plur..' against">K'..pfa_letter..'A</abbr>') -- Against col
if do_ratio then
tt = p_sub.colhead(tt,2030,'<abbr title="Rasio '..pfa_word_sing..' ratio">R'..pfa_letter..'R</abbr>') -- Ratio col
elseif do_percentage then
tt = p_sub.colhead(tt,2030,'<abbr title="Persentase '..pfa_word_sing..' percentage">%</abbr>') -- Percentage col
else
tt = p_sub.colhead(tt,2030,'<abbr title="Selisih '..pfa_word_sing..'">S'..pfa_letter..'D</abbr>') -- Difference col
end
end
Baris 177:
end
if show_points then
tt = p_sub.colhead(tt,2030,'<abbr title="Poin">Poin</abbr>') -- Points col
elseif show_perc then
tt = p_sub.colhead(tt,36,'<abbr title="Persentase kemenanganmenang">%MPCT</abbr>') -- Win percentage col
end
if full_table then
Baris 218:
local points = win_points*wins + loss_points*losses + s_pts
local win_perc = ''
--Some sports use draw as well
local win_perc = mm._precision_format((2*wins) / (2*matches), 3)
if matches == 0 then
-- Escape for zero matches
win_perc = '&mdash;'
else
elseif losses > 0 then
--Some sports use draw as well
-- Drop the leading zero (from the string)
win_perc = stringmm.sub_precision_format((win_perc,2,string.len*wins) / (win_perc2*matches), 3)
elseif if losses > 0 then
-- Drop the leading zero (from the string)
win_perc = string.sub(win_perc,2,string.len(win_perc))
end
end
Baris 369 ⟶ 372:
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..maig..'\n') -- MA
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..mcomp..'\n') -- Match comparison
if Args['game_for_against_style'] ~= 'none' then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gfor..'\n') -- GF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gaiggfor..'\n') -- GAGF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gcompgaig..'\n') -- Game comparisonGA
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..pforgcomp..'\n') -- PFGame comparison
end
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..paig..'\n') -- PA
if Args['point_for_against_style'] ~= 'none' then
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..pcomp..'\n') -- Point comparison
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..gforpfor..'\n') -- GFPF
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..paig..'\n') -- PA
table.insert(t,'| style="'..ii_fw..bg_col..'" |'..pcomp..'\n') -- Point comparison
end
end
Baris 398 ⟶ 405:
-- ------------------------------------------------------------
local status_code, status_called = {}
status_code = { A='AdvanceLolos toke ababak further roundselanjutnya', C='ChampionPemenang', D='DisqualifiedTerdiskualifikasi',
E='EliminatedTereliminasi', G='GuestTamu', H='HostTuan rumah', O='Pemenang babak Play-off winner', P='PromotedDipromosikan', Q='QualifiedTerkualifikasi toke thefase phaseyang indicateddisebutkan',
R='RelegatedDiturunkan', T='QualifiedTerkualifikasi, buttetapi notbelum yetlolos toke thefase particularyang phase indicateddisebutkan',
X='?', Y='?', Z='?'}
status_called = { A=false, C=false, D=false, E=false, G=false, H=false, O=false, P=false,