Pebble: allow to translate quick actions sent to the watch

Fixes #789
This commit is contained in:
Daniele Gobbetti 2017-09-10 17:57:18 +02:00
parent 6f702778f4
commit 6def9dc07e
2 changed files with 10 additions and 3 deletions

View File

@ -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;
}

View File

@ -467,4 +467,9 @@
<string name="discovery_pair_question">Select Pair to pair your devices. If this fails, try again without pairing.</string>
<string name="discovery_yes_pair">Pair</string>
<string name="discovery_dont_pair">Don\'t Pair</string>
<!-- strings sent to pebble watches for quick actions -->
<string name="_pebble_watch_open_on_phone">Open on phone</string>
<string name="_pebble_watch_mute">Mute</string>
<string name="_pebble_watch_reply">Reply</string>
</resources>