Línea 17: |
Línea 17: |
| end | | end |
| | | |
− | if ulang == "ES" then | + | if formattedresult < 1000 then return formattedresult end |
− | --replace space with dot
| + | if ulang ~= "ES" then return formattedresult end |
− | --Problem: ES doesn't add a space for 4 digits
| + | |
− | local temp = {mw.ustring.gsub(formattedresult, "%s" , ".")}
| + | --replace space with dot |
− | return temp[1]
| + | --Problem: ES doesn't add a space for 4 digits |
− | else
| + | local temp = string.sub(formattedresult, -3) |
− | return formattedresult
| + | return string.sub(formattedresult, 1, #formattedresult-3) .. "." .. temp |
− | end
| |
| end | | end |
| | | |