From 6d50c155bf66bc071621c74e4a4136a1d4c3edfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Thu, 17 Oct 2024 19:51:09 +0200 Subject: [PATCH 1/3] Avoid (s) in strings if possible --- common/src/main/res/values/strings.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 9ede7ddf1d2..ae104f68e41 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -371,9 +371,9 @@ Template widgets Please wait while we load your entities Loading… - The location is disabled. The following enabled option(s) require you to enable location. If you do not enable the location, the sensor(s)/setting(s) will not work!\n\n%1$s\nDo you want to enable location? - The following enabled option(s) require you to enable location. If you do not enable the location, the sensor(s)/setting(s) will not work!\n\n%1$s - Some setting(s) do not work + Location is disabled, but is required for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s\nDo you want to enable location? + Location must be enabled for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s + Some options require location to work Disable option Location is disabled No recent locations @@ -396,7 +396,7 @@ Android set up restrictions for apps which want to use your WiFi, because WiFi can be theoretically used to determine your location.\n\nAlso to ensure the app can access WiFi in background (URL decision making, sensors) you need to allow location access all the time.\n\nTherefore, to use this option location access all the time is needed.\n\nContinue granting location access? Location access Location tracking - View a history of location tracking updates to troubleshoot the device tracker(s) + View a history of location tracking updates to troubleshoot the device tracker Location disabled Location Use biometric or screen lock credential to unlock app From 51789d6fc18e73e2bb79fa2b0692d6faae9ab511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Thu, 17 Oct 2024 20:10:14 +0200 Subject: [PATCH 2/3] 'must be enabled' -> 'is required' everywhere --- common/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index ae104f68e41..d8936014729 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -372,7 +372,7 @@ Please wait while we load your entities Loading… Location is disabled, but is required for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s\nDo you want to enable location? - Location must be enabled for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s + Location is required for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s Some options require location to work Disable option Location is disabled From bfee7eaa75f9b114f652862883a6dff06f19289b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Thu, 17 Oct 2024 20:27:14 +0200 Subject: [PATCH 3/3] Don't duplicate notification/dialog location warning string --- .../android/common/util/DisabledLocationHandler.kt | 7 ++++++- common/src/main/res/values/strings.xml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/io/homeassistant/companion/android/common/util/DisabledLocationHandler.kt b/common/src/main/java/io/homeassistant/companion/android/common/util/DisabledLocationHandler.kt index 47e3b64dc99..94898311fd2 100644 --- a/common/src/main/java/io/homeassistant/companion/android/common/util/DisabledLocationHandler.kt +++ b/common/src/main/java/io/homeassistant/companion/android/common/util/DisabledLocationHandler.kt @@ -114,7 +114,12 @@ object DisabledLocationHandler { } else { AlertDialog.Builder(context) .setTitle(commonR.string.location_disabled_title) - .setMessage(context.applicationContext.getString(commonR.string.location_disabled_message, parameters)) + .setMessage( + context.applicationContext.getString( + commonR.string.location_disabled_dialog_message, + context.applicationContext.getString(commonR.string.location_disabled_notification_message, parameters) + ) + ) .setPositiveButton(positionTextId) { _, _ -> context.applicationContext.startActivity(intent) } diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index d8936014729..b0d1e66914e 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -371,7 +371,7 @@ Template widgets Please wait while we load your entities Loading… - Location is disabled, but is required for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s\nDo you want to enable location? + %1$s\nDo you want to enable location? Location is required for the following enabled option(s). If you do not enable location, the sensor(s)/setting(s) will not work!\n\n%1$s Some options require location to work Disable option