diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java
index 9c87e3828f..86deb47f1a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/Careportal/Dialogs/NewNSTreatmentDialog.java
@@ -53,6 +53,7 @@ import info.nightscout.utils.DateUtil;
import info.nightscout.utils.PlusMinusEditText;
import info.nightscout.utils.SafeParse;
import info.nightscout.utils.ToastUtils;
+import info.nightscout.utils.Translator;
public class NewNSTreatmentDialog extends DialogFragment implements View.OnClickListener, DatePickerDialog.OnDateSetListener, TimePickerDialog.OnTimeSetListener {
private static Logger log = LoggerFactory.getLogger(NewNSTreatmentDialog.class);
@@ -421,7 +422,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
if (data.has("eventType")) {
ret += getString(R.string.careportal_newnstreatment_eventtype);
ret += ": ";
- ret += data.get("eventType"); // TODO: translate this too
+ ret += Translator.translate(data.getString("eventType"));
ret += "\n";
}
if (data.has("glucose")) {
@@ -433,7 +434,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
if (data.has("glucoseType")) {
ret += getString(R.string.careportal_newnstreatment_glucosetype);
ret += ": ";
- ret += data.get("glucoseType"); // TODO: translate this too
+ ret += Translator.translate(data.getString("glucoseType"));
ret += "\n";
}
if (data.has("carbs")) {
diff --git a/app/src/main/java/info/nightscout/utils/Translator.java b/app/src/main/java/info/nightscout/utils/Translator.java
new file mode 100644
index 0000000000..93194655d7
--- /dev/null
+++ b/app/src/main/java/info/nightscout/utils/Translator.java
@@ -0,0 +1,63 @@
+package info.nightscout.utils;
+
+import info.nightscout.androidaps.MainApp;
+import info.nightscout.androidaps.R;
+
+/**
+ * Created by mike on 15.07.2016.
+ */
+public class Translator {
+
+ public static String translate(String text) {
+ switch (text) {
+
+ case "BG Check":
+ return MainApp.sResources.getString(R.string.careportal_bgcheck);
+ case "Snack Bolus":
+ return MainApp.sResources.getString(R.string.careportal_snackbolus);
+ case "Meal Bolus":
+ return MainApp.sResources.getString(R.string.careportal_mealbolus);
+ case "Correction Bolus":
+ return MainApp.sResources.getString(R.string.careportal_correctionbolus);
+ case "Carb Correction":
+ return MainApp.sResources.getString(R.string.careportal_carbscorrection);
+ case "Combo Bolus":
+ return MainApp.sResources.getString(R.string.careportal_combobolus);
+ case "Announcement":
+ return MainApp.sResources.getString(R.string.careportal_announcement);
+ case "Note":
+ return MainApp.sResources.getString(R.string.careportal_note);
+ case "Question":
+ return MainApp.sResources.getString(R.string.careportal_question);
+ case "Exercise":
+ return MainApp.sResources.getString(R.string.careportal_exercise);
+ case "Site Change":
+ return MainApp.sResources.getString(R.string.careportal_pumpsitechange);
+ case "Sensor Start":
+ return MainApp.sResources.getString(R.string.careportal_cgmsensorstart);
+ case "Sensor Change":
+ return MainApp.sResources.getString(R.string.careportal_cgmsensorinsert);
+ case "Insulin Change":
+ return MainApp.sResources.getString(R.string.careportal_insulincartridgechange);
+ case "Temp Basal Start":
+ return MainApp.sResources.getString(R.string.careportal_tempbasalstart);
+ case "Temp Basal End":
+ return MainApp.sResources.getString(R.string.careportal_tempbasalend);
+ case "Profile Switch":
+ return MainApp.sResources.getString(R.string.careportal_profileswitch);
+ case "Temporary Target":
+ return MainApp.sResources.getString(R.string.careportal_temporarytarget);
+ case "Temporary Target Cancel":
+ return MainApp.sResources.getString(R.string.careportal_temporarytargetcancel);
+ case "OpenAPS Offline":
+ return MainApp.sResources.getString(R.string.careportal_openapsoffline);
+ case "Finger":
+ return MainApp.sResources.getString(R.string.glucosetype_finger);
+ case "Sensor":
+ return MainApp.sResources.getString(R.string.glucosetype_sensor);
+ case "Manual":
+ return MainApp.sResources.getString(R.string.glucosetype_manual);
+ }
+ return text;
+ }
+}
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 72baca2d5f..8c28f16ec6 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -234,13 +234,18 @@
Úspěch
Poslední spojení:
Zrušit dočasný bazál
- Bolus %.2fU aplikován úspěšně
+ Bolus %.2fU aplikován úspěšně
Chyba při aplikování bolusu
Vzdálený bolus není momentálně povolen
- K potvzení bolusu %.2fU odpověz SMS s kódem %s
+ K potvzení bolusu %.2fU odpověz SMS s kódem %s
SMS komunikátor
Povolená tel. čísla
+XXXXXXXXXX;+YYYYYYYYYY
Povolit posílání bolusu přes SMS
Čekání na výsledek
+ Dočasný cíl
+ Dočasný cíl konec
+ Glukoměr
+ Jiný
+ Senzor
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4cdc854b40..3d0f23731d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -252,5 +252,10 @@
Bolus %.2fU delivered successfully
Allow remote bolusing via SMS
Remote bolus not allowed
+ Finger
+ Sensor
+ Manual
+ Temporary Target
+ Temporary Target Cancel