From f918a5f30395993decc3cd487bbac02a06cb9c6e Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Mon, 19 Mar 2018 13:10:09 +0100 Subject: [PATCH] More loop results cleanup and i18n. --- .../info/nightscout/androidaps/data/PumpEnactResult.java | 5 +++-- .../plugins/ConfigBuilder/ConfigBuilderPlugin.java | 7 +++++-- .../androidaps/plugins/PumpCombo/ComboFragment.java | 4 ++-- app/src/main/res/layout/overview_wizard_dialog.xml | 2 +- app/src/main/res/values-bg/strings.xml | 2 +- app/src/main/res/values-cs/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-el/strings.xml | 2 +- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ko/strings.xml | 2 +- app/src/main/res/values-nl/strings.xml | 2 +- app/src/main/res/values-ro/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 2 +- app/src/main/res/values/strings.xml | 5 +++-- 17 files changed, 26 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/data/PumpEnactResult.java b/app/src/main/java/info/nightscout/androidaps/data/PumpEnactResult.java index a9467caafd..264a153c5e 100644 --- a/app/src/main/java/info/nightscout/androidaps/data/PumpEnactResult.java +++ b/app/src/main/java/info/nightscout/androidaps/data/PumpEnactResult.java @@ -97,7 +97,8 @@ public class PumpEnactResult { if (bolusDelivered > 0) { ret += "\n" + MainApp.sResources.getString(R.string.enacted) + ": " + enacted; ret += "\n" + MainApp.sResources.getString(R.string.comment) + ": " + comment; - ret += "\n" + MainApp.sResources.getString(R.string.smb_shortname) + ": " + bolusDelivered + "U"; + ret += "\n" + MainApp.sResources.getString(R.string.smb_shortname) + + ": " + bolusDelivered + " " + MainApp.gs(R.string.insulin_unit_shortname); } else if (isTempCancel) { ret += "\n" + MainApp.sResources.getString(R.string.enacted) + ": " + enacted; if (!comment.isEmpty()) @@ -131,7 +132,7 @@ public class PumpEnactResult { ret += "
" + MainApp.sResources.getString(R.string.enacted) + ": " + enacted; if (!comment.isEmpty()) ret += "
" + MainApp.sResources.getString(R.string.comment) + ": " + comment; - ret += "
" + MainApp.sResources.getString(R.string.smb_shortname) + ": " + bolusDelivered + "U"; + ret += "
" + MainApp.sResources.getString(R.string.smb_shortname) + ": " + bolusDelivered + " " + MainApp.gs(R.string.insulin_unit_shortname); } else if (isTempCancel) { ret += "
" + MainApp.sResources.getString(R.string.enacted) + ": " + enacted; ret += "
" + MainApp.sResources.getString(R.string.comment) + ": " + comment + diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 2fb7e6efa0..24da254cee 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -389,7 +389,8 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr if (Config.logCongigBuilderActions) log.debug("applyAPSRequest: Basal set correctly"); if (callback != null) { - callback.result(new PumpEnactResult().absolute(request.rate).duration(0).enacted(false).success(true).comment("Basal set correctly")).run(); + callback.result(new PumpEnactResult().absolute(request.rate).duration(0) + .enacted(false).success(true).comment(MainApp.gs(R.string.basal_set_correctly))).run(); } } } else if (activeTemp != null @@ -398,7 +399,9 @@ public class ConfigBuilderPlugin implements PluginBase, ConstraintsInterface, Tr if (Config.logCongigBuilderActions) log.debug("applyAPSRequest: Temp basal set correctly"); if (callback != null) { - callback.result(new PumpEnactResult().absolute(activeTemp.tempBasalConvertedToAbsolute(now, profile)).duration(activeTemp.getPlannedRemainingMinutes()).enacted(false).success(true).comment("Temp basal set correctly")).run(); + callback.result(new PumpEnactResult().absolute(activeTemp.tempBasalConvertedToAbsolute(now, profile)) + .enacted(false).success(true).duration(activeTemp.getPlannedRemainingMinutes()) + .comment(MainApp.gs(R.string.let_temp_basal_run))).run(); } } else { if (Config.logCongigBuilderActions) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java index d7c0a4b7c6..9753f35ea4 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/PumpCombo/ComboFragment.java @@ -233,7 +233,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis // reservoir int reservoirLevel = plugin.getPump().reservoirLevel; if (reservoirLevel != -1) { - reservoirView.setText(reservoirLevel + " " + MainApp.sResources.getString(R.string.treatments_wizard_unit_label)); + reservoirView.setText(reservoirLevel + " " + MainApp.sResources.getString(R.string.insulin_unit_shortname)); } else if (ps.insulinState == PumpState.LOW) { reservoirView.setText(MainApp.gs(R.string.combo_reservoir_low)); } else if (ps.insulinState == PumpState.EMPTY) { @@ -275,7 +275,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis if (bolus != null) { long agoMsc = System.currentTimeMillis() - bolus.timestamp; double bolusMinAgo = agoMsc / 60d / 1000d; - String unit = MainApp.gs(R.string.treatments_wizard_unit_label); + String unit = MainApp.gs(R.string.insulin_unit_shortname); String ago; if ((agoMsc < 60 * 1000)) { ago = MainApp.gs(R.string.combo_pump_connected_now); diff --git a/app/src/main/res/layout/overview_wizard_dialog.xml b/app/src/main/res/layout/overview_wizard_dialog.xml index faaae6967d..4fbdfd3614 100644 --- a/app/src/main/res/layout/overview_wizard_dialog.xml +++ b/app/src/main/res/layout/overview_wizard_dialog.xml @@ -108,7 +108,7 @@ android:gravity="left" android:minWidth="45dp" android:paddingLeft="5dp" - android:text="@string/treatments_wizard_unit_label" + android:text="@string/insulin_unit_shortname" android:textAppearance="?android:attr/textAppearanceSmall" /> diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index a8ce006ae4..1c50162d75 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -40,7 +40,7 @@ КЗ ВХ Корекция - Ед + Ед IOB от болуси Старт сега Базова базална стойност diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 9b41207756..a62329ae4b 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -139,7 +139,7 @@ Bolusové IOB Sacharidy Korekce - U + U Maximální povolený bolus [U] Maximální povolené sacharidy [g] Bezpečnost zadání ošetřeni diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 1d99f86773..bbe2ed5497 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -84,7 +84,7 @@ Aktives Gesamt-IOB: Gesamt-IOB: Basal-IOB - IE + IE Virtuelle Pumpe Reservoir xDrip diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 2dbac99d72..1b7fdf8022 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -42,7 +42,7 @@ TT Υδατάνθρακες Διόρθωση - U + U Bolus IOB Έναρξη τώρα ΕΙΚΟΝΙΚΗ ΑΝΤΛΙΑ diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 3a3c46cf13..af936ed618 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -36,7 +36,7 @@ Glucosa Hidratos Carbono Corrección - U + U Bolo IOB Ejecutar ahora BOMBA VIRTUAL diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 44550e54dc..67ecda2b0f 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -42,7 +42,7 @@ CT Glucides Corr - U + U Bolus IR "Exécuter maintenant " POMPE VIRTUELLE diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 9877ee2535..352f802ee6 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -425,7 +425,7 @@ Sicurezza delle prestazioni Valore massimo carbo (g) Bolo massimo (U) - U + U Correzione COB Carboidrati diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index a0994b4e9f..46f1cb3525 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -40,7 +40,7 @@ 혈당 탄수화물 교정 - U + U 식사주입 IOB 지금 실행 가상 펌프 diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index a6bb2f2d34..ca73dcbffa 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -347,7 +347,7 @@ Autoscroll Geen NS API geheim op (min 12 kar.) Max toegestane bolus [E] - E + E Correctie COB Koolhydraten diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index caa88fbe76..aca835b34d 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -42,7 +42,7 @@ BG Carbohidrați Corecție - U + U Bolus IOB Fă acum POMPĂ VIRTUALĂ diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2ebcf74b46..ddc446b62c 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -482,7 +482,7 @@ углеводы активн углеводы коррекция - ед + ед макс разрешенный болюс макс разрешенные углеводы (г) безопасность назначений diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index d4923abfbb..669f96e4e9 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -303,7 +303,7 @@ Säkerhet vid behandling Max tillåtna KH (g) Max tillåten bolus [E] - E + E Korr COB KH diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2f0cf26d7e..ffe1df0bc9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -42,7 +42,7 @@ TT Carbs Corr - U + U Bolus IOB Run now VIRTUAL PUMP @@ -889,7 +889,7 @@ Enable SMB when there is temp target active (eating soon, exercise) Enable SMB with high temp targets Enable SMB when there is high temp target active (exercise) - Let current temp basal run + Let temp basal run Mute Insulin Carbs @@ -963,5 +963,6 @@ Bolus count TBR count A bolus was delivered within the last 3 minutes, skipping SMB + Basal set correctly