Modifications

370 octets ajoutés ,  3 mai 2023 à 17:25
decimal separator for ES numbers
Ligne 70 : Ligne 70 :  
elseif (ulang == "EN" or ulang == "JA" or ulang == "HU" or ulang == "TR") then
 
elseif (ulang == "EN" or ulang == "JA" or ulang == "HU" or ulang == "TR") then
 
return formattedSum .. "g"
 
return formattedSum .. "g"
elseif ulang == "ES" then return formattedSum .. "[[File:Gold.png|18px|link=]]"
+
elseif ulang == "ES" then
 +
if (sum < 1000) then return formattedSum .. "[[File:Gold.png|18px|link=]]"
 +
elseif (sum < 10000) then
 +
local length = #(tostring(sum))
 +
local temp = string.sub(tostring(sum), -3)
 +
return string.sub(tostring(sum), 1, (length-3)) .. "." .. temp .. "[[File:Gold.png|18px|link=]]"
 +
else
 +
local temp = {mw.ustring.gsub(tostring(formattedSum), "%s" , ".")}
 +
return temp[1] .. "[[File:Gold.png|18px|link=]]"
 +
end
 
elseif ulang == "FR" then return formattedSum .. "po"
 
elseif ulang == "FR" then return formattedSum .. "po"
 
elseif ulang == "IT" then return formattedSum .. "o"
 
elseif ulang == "IT" then return formattedSum .. "o"
105 789

modifications