mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-01 13:12:50 +00:00
Amended as required
**/strings.xml need recreating server side.
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
<string id="MenuItemTap">Tap</string>
|
||||
<string id="MenuItemMenu">Menu</string>
|
||||
<string id="Confirm">Sure?</string>
|
||||
<string id="Executed" scope="glance">Executed</string>
|
||||
<string id="NoPhone" scope="glance">No Phone connection</string>
|
||||
<string id="NoInternet">No Internet connection</string>
|
||||
<string id="NoResponse">No Response, check Internet connection</string>
|
||||
|
@ -82,7 +82,7 @@ class HomeAssistantService {
|
||||
System.println("HomeAssistantService onReturnCall(): Service executed.");
|
||||
}
|
||||
var d = data as Lang.Array;
|
||||
var toast = "Executed";
|
||||
var toast = RezStrings.getExecuted();
|
||||
for(var i = 0; i < d.size(); i++) {
|
||||
if ((d[i].get("entity_id") as Lang.String).equals(identifier)) {
|
||||
toast = (d[i].get("attributes") as Lang.Dictionary).get("friendly_name") as Lang.String;
|
||||
|
@ -30,6 +30,7 @@ class RezStrings {
|
||||
private static var strMenuItemTap as Lang.String or Null;
|
||||
private static var strMenuItemMenu as Lang.String or Null;
|
||||
private static var strConfirm as Lang.String or Null;
|
||||
private static var strExecuted as Lang.String or Null;
|
||||
(:glance)
|
||||
private static var strNoPhone as Lang.String or Null;
|
||||
private static var strNoInternet as Lang.String or Null;
|
||||
@ -81,6 +82,7 @@ class RezStrings {
|
||||
strMenuItemTap = WatchUi.loadResource($.Rez.Strings.MenuItemTap);
|
||||
strMenuItemMenu = WatchUi.loadResource($.Rez.Strings.MenuItemMenu);
|
||||
strConfirm = WatchUi.loadResource($.Rez.Strings.Confirm);
|
||||
strExecuted = WatchUi.loadResource($.Rez.Strings.Executed);
|
||||
strNoPhone = WatchUi.loadResource($.Rez.Strings.NoPhone);
|
||||
strNoInternet = WatchUi.loadResource($.Rez.Strings.NoInternet);
|
||||
strNoResponse = WatchUi.loadResource($.Rez.Strings.NoResponse);
|
||||
@ -120,6 +122,10 @@ class RezStrings {
|
||||
return strConfirm;
|
||||
}
|
||||
|
||||
static function getExecuted() as Lang.String {
|
||||
return strExecuted;
|
||||
}
|
||||
|
||||
static function getNoPhone() as Lang.String {
|
||||
return strNoPhone;
|
||||
}
|
||||
|
Reference in New Issue
Block a user