Merge pull request #3085 from olorinmaia/AddDashPodStatusStrings

Add dash pod status translation strings in AAPSClient Overview
This commit is contained in:
Milos Kozak 2023-11-29 14:06:01 +01:00 committed by GitHub
commit ca0995dd2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -158,6 +158,7 @@
<string name="omnipod_common_pod_status_activation_time_exceeded">Activation time exceeded</string>
<string name="omnipod_common_pod_status_inactive">Inactive</string>
<string name="omnipod_common_pod_status_pod_fault_description">Pod Fault: %1$03d %2$s</string>
<string name="omnipod_common_pod_status_normal">Normal</string>
<!-- Omnipod - Commands -->
<string name="omnipod_common_cmd_deactivate_pod">Deactivate Pod</string>

View file

@ -991,9 +991,9 @@ class OmnipodDashPumpPlugin @Inject constructor(
val extended = JSONObject()
try {
val podStatus = when {
podStateManager.isPodRunning && podStateManager.isSuspended -> "suspended"
podStateManager.isPodRunning -> "normal"
else -> "no active Pod"
podStateManager.isPodRunning && podStateManager.isSuspended -> rh.gs(info.nightscout.androidaps.plugins.pump.omnipod.common.R.string.omnipod_common_pod_status_suspended).lowercase()
podStateManager.isPodRunning -> rh.gs(info.nightscout.androidaps.plugins.pump.omnipod.common.R.string.omnipod_common_pod_status_normal).lowercase()
else -> rh.gs(info.nightscout.androidaps.plugins.pump.omnipod.common.R.string.omnipod_common_pod_status_no_active_pod).lowercase()
}
status.put("status", podStatus)
status.put("timestamp", dateUtil.toISOString(podStateManager.lastUpdatedSystem))