From f8bb7b0487a932b7a76f8b770caf8cedd712a7ce Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Tue, 17 Jul 2018 00:43:45 +0200 Subject: [PATCH] Add some label translations (EN/FR) --- .../DetailsActivityFragments/Informations.java | 2 +- .../HomeActivityFragments/MarketCapitalization.java | 12 ++++++------ app/src/main/res/values-fr/strings.xml | 6 ++++++ app/src/main/res/values/strings.xml | 5 +++++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/Informations.java b/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/Informations.java index 8d95978..1fb345b 100644 --- a/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/Informations.java +++ b/app/src/main/java/com/herbron/moodl/Activities/DetailsActivityFragments/Informations.java @@ -139,7 +139,7 @@ public class Informations extends Fragment { if(currency.getMaxCoinSupply() == 0) { ((TextView) view.findViewById(R.id.txtViewTotalSupply)) - .setText(PlaceholderManager.getSymbolString("Infinity", getActivity())); + .setText(PlaceholderManager.getSymbolString(getString(R.string.infinity), getActivity())); } else { diff --git a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/MarketCapitalization.java b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/MarketCapitalization.java index ec688b9..e166a63 100644 --- a/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/MarketCapitalization.java +++ b/app/src/main/java/com/herbron/moodl/Activities/HomeActivityFragments/MarketCapitalization.java @@ -236,10 +236,10 @@ public class MarketCapitalization extends Fragment { colors.add(topCurrencies.get(i).getChartColor()); } - entries.add(new PieEntry(100-topCurrenciesDominance, "Others", "others")); + entries.add(new PieEntry(100-topCurrenciesDominance, getString(R.string.others), "others")); colors.add(-12369084); - PieDataSet set = new PieDataSet(entries, "Market Cap Dominance"); + PieDataSet set = new PieDataSet(entries, getString(R.string.market_dominance)); set.setColors(colors); set.setSliceSpace(1); set.setDrawValues(false); @@ -310,7 +310,7 @@ public class MarketCapitalization extends Fragment { pieChart.setTouchEnabled(true); pieChart.setEntryLabelColor(Color.WHITE); - updateDetails(marketCapManager.getMarketCap(), marketCapManager.getDayVolume(), "Global", 0); + updateDetails(marketCapManager.getMarketCap(), marketCapManager.getDayVolume(), getString(R.string.global), 0); ((TextView) view.findViewById(R.id.textViewActiveCrypto)) .setText(marketCapManager.getActive_crypto()); ((TextView) view.findViewById(R.id.textViewActiveMarkets)) @@ -374,7 +374,7 @@ public class MarketCapitalization extends Fragment { view.findViewById(R.id.currencyIcon).setVisibility(View.GONE); view.findViewById(R.id.layoutPercentageDominance).setVisibility(View.VISIBLE); - updateDetails(othersMarketCap, othersVolume, "Other coins", h.getY()); + updateDetails(othersMarketCap, othersVolume, getString(R.string.other_coins), h.getY()); pieChart.setDrawCenterText(true); } @@ -390,7 +390,7 @@ public class MarketCapitalization extends Fragment { view.findViewById(R.id.layoutActiveCrypto).setVisibility(View.VISIBLE); view.findViewById(R.id.layoutActiveMarkets).setVisibility(View.VISIBLE); - updateDetails(marketCapManager.getMarketCap(), marketCapManager.getDayVolume(), "Global", 0); + updateDetails(marketCapManager.getMarketCap(), marketCapManager.getDayVolume(), getString(R.string.global), 0); pieChart.setDrawCenterText(true); } @@ -416,7 +416,7 @@ public class MarketCapitalization extends Fragment { private SpannableString generateCenterSpannableText() { - SpannableString spannableString = new SpannableString("Market Capitalization Dominance"); + SpannableString spannableString = new SpannableString(getString(R.string.market_dominance)); return spannableString; } } diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index e6212eb..b0d8010 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -99,6 +99,12 @@ Restaurer une sauvegarde Paramètre des portes-monnaies + Infini + Autres + Dominance du marché + Global + Autres monnaies + 1 heure 3 heures diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6d47750..80e0bd8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -214,5 +214,10 @@ Confirm Cancel Save + Infinity + Others + Market Cap Dominance + Global + Other coins