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 9937601d419ab0e5da095bb1f8f25114d55e7426..2daa4a5fcf6dfa60dc71fd7d3e255f42764d7626 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 e5cd967d66f187815b161f55eccac8638ca59797..643f197df35b6ce9b4c135cc769748b1ac19606a 100644 --- a/play-services-core/src/main/res/values/strings.xml +++ b/play-services-core/src/main/res/values/strings.xml @@ -226,4 +226,10 @@ This can take a couple of minutes." Connect to Google via Tor network Requires Orbot to be installed\nNot yet supported + OFF + ON / Automatic: %s + ON / Manual: %s + %s seconds + %s minutes +