mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 17:41:57 +01:00
Make string values of summary data translatable
This commit is contained in:
parent
b236a6af16
commit
f05ad85f73
@ -254,7 +254,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
|||||||
value_field.setText(String.format("%s %s", df.format(value), getStringResourceByName(unit)));
|
value_field.setText(String.format("%s %s", df.format(value), getStringResourceByName(unit)));
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
TableRow field_row = new TableRow(ActivitySummaryDetail.this);
|
||||||
@ -288,7 +288,7 @@ public class ActivitySummaryDetail extends AbstractGBActivity {
|
|||||||
String packageName = getPackageName();
|
String packageName = getPackageName();
|
||||||
int resId = getResources().getIdentifier(aString, "string", packageName);
|
int resId = getResources().getIdentifier(aString, "string", packageName);
|
||||||
if (resId==0){
|
if (resId==0){
|
||||||
LOG.warn("SportsActivity " + "Missing string in strings:" + aString);
|
//LOG.warn("SportsActivity " + "Missing string in strings:" + aString);
|
||||||
return aString;
|
return aString;
|
||||||
}else{
|
}else{
|
||||||
return getString(resId);
|
return getString(resId);
|
||||||
|
@ -984,6 +984,11 @@
|
|||||||
<string name="activity_filter_filter_title">Filter</string>
|
<string name="activity_filter_filter_title">Filter</string>
|
||||||
<string name="activity_filter_apply_filter">Apply Filter</string>
|
<string name="activity_filter_apply_filter">Apply Filter</string>
|
||||||
<string name="activity_summaries_statistics">Statistics</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">
|
<plurals name="widget_alarm_target_hours">
|
||||||
|
Loading…
Reference in New Issue
Block a user