diff --git a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt index 9937601d41..2daa4a5fcf 100644 --- a/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt +++ b/play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt @@ -107,15 +107,15 @@ class PushNotificationAdvancedFragment : PreferenceFragmentCompat() { } private fun getSummaryString(value: Int, learnt: Int): String = when (value) { - -1 -> "OFF" - 0 -> "ON / Automatic: " + getHeartbeatString(learnt) - else -> "ON / Manual: " + getHeartbeatString(value * 60000) + -1 -> getString(R.string.push_notifications_summary_off) + 0 -> getString(R.string.push_notifications_summary_automatic, getHeartbeatString(learnt)) + else -> getString(R.string.push_notifications_summary_manual, getHeartbeatString(value * 60000)) } private fun getHeartbeatString(heartbeatMs: Int): String { return if (heartbeatMs < 120000) { - (heartbeatMs / 1000).toString() + " seconds" - } else (heartbeatMs / 60000).toString() + " minutes" + getString(R.string.push_notifications_summary_values_seconds, (heartbeatMs / 1000).toString()) + } else getString(R.string.push_notifications_summary_values_minutes, (heartbeatMs / 60000).toString()) } companion object { diff --git a/play-services-core/src/main/res/values/strings.xml b/play-services-core/src/main/res/values/strings.xml index 6f64dbdc1e..2a58de1fc6 100644 --- a/play-services-core/src/main/res/values/strings.xml +++ b/play-services-core/src/main/res/values/strings.xml @@ -220,4 +220,9 @@ This can take a couple of minutes." No result Invalid JSON + OFF + ON / Automatic: %s + ON / Manual: %s + %s seconds + %s minutes