]> git.ktnx.net Git - mobile-ledger.git/commitdiff
add currency symbol to debug output
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 20 Feb 2020 17:34:01 +0000 (19:34 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 20 Feb 2020 17:34:01 +0000 (19:34 +0200)
app/src/main/java/net/ktnx/mobileledger/model/Data.java

index 9b832b0353e0dcd561b1a8c708624082d3f0fc47..0a2efe9fe6e598d6ea410a3d202809f635dbc73b 100644 (file)
@@ -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))