diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java index dcda0bc0aa..7282ac0763 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Wear/WearPlugin.java @@ -158,7 +158,7 @@ public class WearPlugin extends PluginBase { @Subscribe public void onStatusEvent(final EventBolusRequested ev) { - String status = String.format(MainApp.sResources.getString(R.string.bolusrequested), ev.getAmount()); + String status = String.format(MainApp.gs(R.string.bolusrequested), ev.getAmount()); Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS); intent.putExtra("progresspercent", 0); intent.putExtra("progressstatus", status); @@ -172,9 +172,9 @@ public class WearPlugin extends PluginBase { String status; if (ev.result.success) { - status = MainApp.sResources.getString(R.string.success); + status = MainApp.gs(R.string.success); } else { - status = MainApp.sResources.getString(R.string.nosuccess); + status = MainApp.gs(R.string.nosuccess); } Intent intent = new Intent(ctx, WatchUpdaterService.class).setAction(WatchUpdaterService.ACTION_SEND_BOLUSPROGRESS); intent.putExtra("progresspercent", 100); diff --git a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java index 8ec61932c8..a5ad59ca0b 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java +++ b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java @@ -55,7 +55,7 @@ public class QueueThread extends Thread { PumpInterface pump = ConfigBuilderPlugin.getActivePump(); if (pump == null) { log.debug("QUEUE: pump == null"); - MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.pumpNotInitialized))); + MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.pumpNotInitialized))); SystemClock.sleep(1000); continue; } @@ -63,7 +63,7 @@ public class QueueThread extends Thread { if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) { MainApp.bus().post(new EventDismissBolusprogressIfRunning(null)); - MainApp.bus().post(new EventPumpStatusChanged(MainApp.sResources.getString(R.string.connectiontimedout))); + MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.connectiontimedout))); log.debug("QUEUE: timed out"); pump.stopConnecting(); diff --git a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandSetProfile.java b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandSetProfile.java index 8a8bc41dfa..03764dee0b 100644 --- a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandSetProfile.java +++ b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandSetProfile.java @@ -47,7 +47,7 @@ public class CommandSetProfile extends Command { if (r.enacted && profileSwitch.source == Source.NIGHTSCOUT) { SmsCommunicatorPlugin smsCommunicatorPlugin = MainApp.getSpecificPlugin(SmsCommunicatorPlugin.class); if (smsCommunicatorPlugin != null && smsCommunicatorPlugin.isEnabled(PluginType.GENERAL)) { - smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.sResources.getString(R.string.profile_set_ok)); + smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.gs(R.string.profile_set_ok)); } } }