1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

Make string values of summary data translatable

This commit is contained in:
vanous 2020-08-22 10:31:32 +02:00
parent b236a6af16
commit f05ad85f73
2 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -984,6 +984,11 @@
<string name="activity_filter_filter_title">Filter</string>
<string name="activity_filter_apply_filter">Apply Filter</string>
<string name="activity_summaries_statistics">Statistics</string>
<!-- swim styles -->
<string name="breaststroke">Breaststroke</string>
<string name="freestyle">Freestyle</string>
<string name="backstroke">Backstroke</string>
<string name="medley">Medley</string>
<plurals name="widget_alarm_target_hours">