From 93896a91bb9f92a9921f180844871727c60f99fe Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 20 Feb 2020 19:34:01 +0200 Subject: [PATCH] add currency symbol to debug output --- app/src/main/java/net/ktnx/mobileledger/model/Data.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/model/Data.java b/app/src/main/java/net/ktnx/mobileledger/model/Data.java index 9b832b03..0a2efe9f 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/Data.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/Data.java @@ -165,12 +165,12 @@ public final class Data { public static void refreshCurrencyData(Locale locale) { NumberFormat formatter = NumberFormat.getCurrencyInstance(locale); java.util.Currency currency = formatter.getCurrency(); - Logger.debug("locale", - String.format("Discovering currency symbol position for locale %s (currency is %s)", - locale.toString(), currency.toString())); + String symbol = currency.getSymbol(); + Logger.debug("locale", String.format( + "Discovering currency symbol position for locale %s (currency is %s; symbol is %s)", + locale.toString(), currency.toString(), symbol)); String formatted = formatter.format(1234.56f); Logger.debug("locale", String.format("1234.56 formats as '%s'", formatted)); - String symbol = currency.getSymbol(); if (formatted.startsWith(symbol)) currencySymbolPosition.setValue(Currency.Position.before); else if (formatted.endsWith(symbol)) -- 2.39.5