Merge branch 'pull/2185' into dev

This commit is contained in:
Milos Kozak 2019-11-22 16:10:55 +01:00
commit f537c0090a
4 changed files with 6 additions and 3 deletions

View file

@ -100,8 +100,8 @@ public class CareportalEvent implements DataPointWithLabelInterface, Interval {
String hours = " " + MainApp.gs(R.string.hours) + " "; String hours = " " + MainApp.gs(R.string.hours) + " ";
if (useShortText) { if (useShortText) {
days = "d"; days = MainApp.gs(R.string.shortday);
hours = "h"; hours = MainApp.gs(R.string.shorthour);
} }
return diff.get(TimeUnit.DAYS) + days + diff.get(TimeUnit.HOURS) + hours; return diff.get(TimeUnit.DAYS) + days + diff.get(TimeUnit.HOURS) + hours;

View file

@ -185,7 +185,7 @@ public class DateUtil {
long remainingTimeMinutes = timeInMillis / (1000 * 60); long remainingTimeMinutes = timeInMillis / (1000 * 60);
long remainingTimeHours = remainingTimeMinutes / 60; long remainingTimeHours = remainingTimeMinutes / 60;
remainingTimeMinutes = remainingTimeMinutes % 60; remainingTimeMinutes = remainingTimeMinutes % 60;
return "(" + ((remainingTimeHours > 0) ? (remainingTimeHours + "h ") : "") + remainingTimeMinutes + "')"; return "(" + ((remainingTimeHours > 0) ? (remainingTimeHours + MainApp.gs(R.string.shorthour) + " ") : "") + remainingTimeMinutes + "')";
} }
public static String sinceString(long timestamp) { public static String sinceString(long timestamp) {

View file

@ -778,6 +778,7 @@
<string name="shortgramm">g</string> <string name="shortgramm">g</string>
<string name="shortminute">m</string> <string name="shortminute">m</string>
<string name="shorthour">h</string> <string name="shorthour">h</string>
<string name="shortday">d</string>
<string name="none"><![CDATA[<none>]]></string> <string name="none"><![CDATA[<none>]]></string>
<string name="shortkilojoul">kJ</string> <string name="shortkilojoul">kJ</string>
<string name="shortenergy">En</string> <string name="shortenergy">En</string>

View file

@ -107,6 +107,8 @@ public class AAPSMocker {
when(MainApp.gs(R.string.configbuilder_insulin)).thenReturn("Insulin"); when(MainApp.gs(R.string.configbuilder_insulin)).thenReturn("Insulin");
when(MainApp.gs(R.string.bolusdelivering)).thenReturn("Delivering 0.0U"); when(MainApp.gs(R.string.bolusdelivering)).thenReturn("Delivering 0.0U");
when(MainApp.gs(R.string.profile_per_unit)).thenReturn("/U"); when(MainApp.gs(R.string.profile_per_unit)).thenReturn("/U");
when(MainApp.gs(R.string.shortday)).thenReturn("d");
when(MainApp.gs(R.string.shorthour)).thenReturn("h");
when(MainApp.gs(R.string.profile_carbs_per_unit)).thenReturn("g/U"); when(MainApp.gs(R.string.profile_carbs_per_unit)).thenReturn("g/U");
when(MainApp.gs(R.string.profile_ins_units_per_hour)).thenReturn("U/h"); when(MainApp.gs(R.string.profile_ins_units_per_hour)).thenReturn("U/h");
when(MainApp.gs(R.string.sms_wrongcode)).thenReturn("Wrong code. Command cancelled."); when(MainApp.gs(R.string.sms_wrongcode)).thenReturn("Wrong code. Command cancelled.");