From: Damyan Ivanov Date: Sun, 5 Apr 2020 20:31:50 +0000 (+0300) Subject: use locale-aware String.format X-Git-Tag: v0.12.0~59 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=7de6571579a70ab1a74cc703c14e91f3b6136387;p=mobile-ledger.git use locale-aware String.format --- diff --git a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java index 4468724e..c97b7e4a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java @@ -21,6 +21,8 @@ import androidx.annotation.NonNull; import net.ktnx.mobileledger.utils.Misc; +import java.util.Locale; + public class LedgerTransactionAccount { private String accountName; private String shortAccountName; @@ -99,8 +101,8 @@ public class LedgerTransactionAccount { sb.append(currency); sb.append(' '); } - sb.append(String.format("%,1.2f", amount)); + sb.append(String.format(Locale.US, "%,1.2f", amount)); return sb.toString(); } -} +} \ No newline at end of file