Modul:Goalscorers: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
perbaikan separator desimal (.) → (,)
Baris 90:
function p.addIntroductorySentence() -- menambahkan teks/paragraf awal
local totalGoalString = "Sebanyak" .. g.totalGoals .. " telah dicetak."
local matches, dateUpdated = p.getNumberMatches()
Baris 97:
local Date = require('Module:Date')._Date
local text1 = ""
local text = string.format("Sebanyak %s gol telah dicetak", mw.getLanguage('id'):formatNum(g.totalGoals))
if g.totalGoals >= 1 then
if dateUpdated ~= 'complete' or dateUpdated ~= 'completed' or dateUpdated ~= 'selesai' then text1 = "telah dicetak" end
else
if dateUpdated == 'complete' or dateUpdated == 'completed' or dateUpdated == 'selesai' then text1 = "dicetak" end
end
local text = string.format("Sebanyak %s gol telah dicetak%s", mw.getLanguage('id'):formatNum(g.totalGoals), text1)
if matches then
Baris 103 ⟶ 110:
local precision = 3 -- presisi dua angka dibelakang koma
if average < 1 then precision = 2 end -- presisi satu angka dibelakang koma
average = string.format(" dengan rata-rata %."..precision.."g gol per pertandingan", average)
text = text .. string.format(" pada %d pertandingan, dengan rata-rata %s gol per pertandingan", matches, mw.getLanguage('id'):formatNum( tonumber(average)))
end
if dateUpdated == 'complete' or dateUpdated =='completed' or dateUpdated =='selesai' or dateUpdated == "" then
text = text .. "."
else
Baris 905 ⟶ 912:
local text1 = "Sebanyak"
if g.args['lc'] then text1 = "sebanyak" end
local text2 = ""
if ongoing then text2 = "telah" end
local updateString = ""
local averageString = ""
-- auto version: string.format(" pada %d match%spertandingan, dengan rata-rata %.3g gol per pertandingan", matches, average)
if g.args['goals'] and g.args['matches'] then
local averageGoals = g.args['goals']/g.args['matches']
averageString = string.format(" pada %d pertandingan, dengan rata-rata %.3g gol per pertandingan", g.args['matches'], averageGoals)
end
if g.args['updated'] and g.args['updated'] ~= "complete" and g.args['updated'] ~= "completed" and g.args['updated'] ~= "selesai" then
updateString = "&nbsp;(per " ..g.args['updated'].. ")"
end
Baris 920 ⟶ 929:
local text = ""
if g.args['goals'] then
text = string.format("%s %s %s %s dicetak pada %d pertandingan, dengan rata-rata %s gol per pertandingan %s",
text1, text2, statNumber, statType, g.args['matches'], mw.getLanguage('id'):formatNum( tonumber(averageString))..updateString..sep) --Sebanyak %statNumber %statType telah dicetak %averageString (%updateString)
end
text = p.addAdditionHeaderText(text) -- handles template parameters bold, further, extra