From f05ad85f73a949c4bc7e5fb5c9d498376e6e5f31 Mon Sep 17 00:00:00 2001 From: vanous Date: Sat, 22 Aug 2020 10:31:32 +0200 Subject: [PATCH] Make string values of summary data translatable --- .../gadgetbridge/activities/ActivitySummaryDetail.java | 4 ++-- app/src/main/res/values/strings.xml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java index 59177e279..f6cf15d62 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ActivitySummaryDetail.java @@ -254,7 +254,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity { value_field.setText(String.format("%s %s", df.format(value), getStringResourceByName(unit))); } } else { - value_field.setText(innerData.getString("value")); + value_field.setText(getStringResourceByName(innerData.getString("value"))); //we could optimize here a bit and only do this for particular activities (swim at the moment...) } TableRow field_row = new TableRow(ActivitySummaryDetail.this); @@ -288,7 +288,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity { String packageName = getPackageName(); int resId = getResources().getIdentifier(aString, "string", packageName); if (resId==0){ - LOG.warn("SportsActivity " + "Missing string in strings:" + aString); + //LOG.warn("SportsActivity " + "Missing string in strings:" + aString); return aString; }else{ return getString(resId); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4db708430..28e3316ab 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -984,6 +984,11 @@ Filter Apply Filter Statistics + + Breaststroke + Freestyle + Backstroke + Medley