Modul:Goalscorers: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
kTidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
Baris 83:
return p.error_msg() or outputString
end
function p.addIntroductorySentence() -- addmenambahkan introductoryteks/paragraf textawal
local totalGoalString = "Sebanyak" .. g.totalGoals .. " telah dicetak."
--There were [has been|have been|was|were] #GOALS goal(s) scored in #MATCHES match(s), for an average of #GOALS/#MATCHES per match.
local matches, dateUpdated = p.getNumberMatches()
Baris 93 ⟶ 92:
local Date = require('Module:Date')._Date
local text = string.format("Sebanyak %s %s gol telah dicetak", text1, mw.getLanguage('id'):formatNum(g.totalGoals))
local pluralGoals = ""
local text1 = ""
if g.totalGoals == 1 then
pluralGoals = ""
if dateUpdated == 'complete' then text1 = " " else text1 = " " end
else
if dateUpdated == 'complete' then text1 = " " else text1 = " " end
end
local text = string.format("Sebanyak %s %s gol telah dicetak", text1, mw.getLanguage('id'):formatNum(g.totalGoals))
local pluralMatches = ""
if matches==1 then pluralMatches = "" end
if matches then
local average = g.totalGoals/tonumber(matches) -- menghitung rata-rata gol
local precision = 3 -- tampilanpresisi d.dddua (tigaangka digitdibelakang angka)koma
if average < 1 then precision = 2 end -- tampilanpresisi 0.ddsatu (duaangka digitdibelakang angka)koma
average = tostring (average)
text average = text .. string.format(" pada %d pertandingan, dengan rata-rata %."..precision.."g gol per pertandingan", matches, mw.getLanguage('id'):formatNum(average))
 
local pluralAverage = ""
iftext = text .. tonumber(string.format("%.2f",average))==1 thenpada pluralAverage%d =pertandingan, %s"", endmatches, average)
text = text .. string.format(" pada %d pertandingan, dengan rata-rata %."..precision.."g gol per pertandingan", matches, average)
end
Baris 130 ⟶ 118:
return text --totalGoalString
end
function p.addFooterSentence() -- addmenambahkan notesteks atakhir/catatan bottomkaki
local footerSentence = g.args['footer'] or ""