Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid (s) in strings if possible #4741

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
8 changes: 4 additions & 4 deletions common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@
<string name="template_widgets">Template widgets</string>
<string name="loading_entities">Please wait while we load your entities</string>
<string name="loading">Loading…</string>
<string name="location_disabled_message">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?</string>
<string name="location_disabled_notification_message">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</string>
<string name="location_disabled_notification_short_message">Some setting(s) do not work</string>
<string name="location_disabled_dialog_message">%1$s\nDo you want to enable location?</string>
<string name="location_disabled_notification_message">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</string>
<string name="location_disabled_notification_short_message">Some options require location to work</string>
<string name="location_disabled_option_disable">Disable option</string>
<string name="location_disabled_title">Location is disabled</string>
<string name="location_history_empty_title">No recent locations</string>
Expand All @@ -396,7 +396,7 @@
<string name="location_perm_info_message">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?</string>
<string name="location_perm_info_title">Location access</string>
<string name="location_tracking">Location tracking</string>
<string name="location_tracking_summary">View a history of location tracking updates to troubleshoot the device tracker(s)</string>
<string name="location_tracking_summary">View a history of location tracking updates to troubleshoot the device tracker</string>
<string name="location_warn_channel">Location disabled</string>
<string name="location">Location</string>
<string name="lock_summary">Use biometric or screen lock credential to unlock app</string>
Expand Down