From 6def9dc07e0db7c5059d766ec6df4cf6c9ce97b4 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Sun, 10 Sep 2017 17:57:18 +0200 Subject: [PATCH] Pebble: allow to translate quick actions sent to the watch Fixes #789 --- .../service/devices/pebble/PebbleProtocol.java | 8 +++++--- app/src/main/res/values/strings.xml | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java index 018d173c..86e303fd 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java @@ -36,6 +36,8 @@ import java.util.Random; import java.util.SimpleTimeZone; import java.util.UUID; +import nodomain.freeyourgadget.gadgetbridge.GBApplication; +import nodomain.freeyourgadget.gadgetbridge.R; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEvent; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventAppInfo; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventAppManagement; @@ -589,9 +591,9 @@ public class PebbleProtocol extends GBDeviceProtocol { byte actions_count; short actions_length; String dismiss_string; - String open_string = "Open on phone"; - String mute_string = "Mute"; - String reply_string = "Reply"; + String open_string = GBApplication.getContext().getString(R.string._pebble_watch_open_on_phone); + String mute_string = GBApplication.getContext().getString(R.string._pebble_watch_mute); + String reply_string = GBApplication.getContext().getString(R.string._pebble_watch_reply); if (sourceName != null) { mute_string += " " + sourceName; } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8038d217..92c680cf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -467,4 +467,9 @@ Select Pair to pair your devices. If this fails, try again without pairing. Pair Don\'t Pair + + + Open on phone + Mute + Reply