From 7ca06948f1dfa58057cff1b93f5effc82701efc3 Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Mon, 9 Mar 2026 09:53:43 +0100 Subject: [PATCH] =?UTF-8?q?Gjer=20widget-tidsstempel=20tydelegare=20med=20?= =?UTF-8?q?=C2=ABOppdatert=C2=BB-prefiks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Endrar widget-tidsstempel frå berre «14:32» til «Oppdatert 14:32» slik at det er tydeleg at dette er siste oppdateringstidspunkt. Co-Authored-By: Claude Opus 4.6 --- .../no/naiv/tilfluktsrom/widget/ShelterWidgetProvider.kt | 5 +++-- app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-nn/strings.xml | 1 + app/src/main/res/values/strings.xml | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/no/naiv/tilfluktsrom/widget/ShelterWidgetProvider.kt b/app/src/main/java/no/naiv/tilfluktsrom/widget/ShelterWidgetProvider.kt index e13e054..119f475 100644 --- a/app/src/main/java/no/naiv/tilfluktsrom/widget/ShelterWidgetProvider.kt +++ b/app/src/main/java/no/naiv/tilfluktsrom/widget/ShelterWidgetProvider.kt @@ -221,10 +221,11 @@ class ShelterWidgetProvider : AppWidgetProvider() { views.setTextViewText(R.id.widgetTimestamp, formatTimestamp(context)) } - /** Format current time as HH:mm, respecting the user's 12/24h preference. */ + /** Format current time as "Updated HH:mm", respecting the user's 12/24h preference. */ private fun formatTimestamp(context: Context): String { val format = DateFormat.getTimeFormat(context) - return format.format(System.currentTimeMillis()) + val timeStr = format.format(System.currentTimeMillis()) + return context.getString(R.string.widget_updated_at, timeStr) } /** diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index 6277398..7a815cd 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -51,6 +51,7 @@ \u00c5pne appen for posisjon Ingen tilfluktsromdata Trykk for \u00e5 oppdatere + Oppdatert %s Data er oppdatert diff --git a/app/src/main/res/values-nn/strings.xml b/app/src/main/res/values-nn/strings.xml index 2669d8e..0629cb6 100644 --- a/app/src/main/res/values-nn/strings.xml +++ b/app/src/main/res/values-nn/strings.xml @@ -51,6 +51,7 @@ Opne appen for posisjon Ingen tilfluktsromdata Trykk for \u00e5 oppdatere + Oppdatert %s Data er oppdatert diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c0897aa..ede64d0 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -51,6 +51,7 @@ Open app for location No shelter data Tap to refresh + Updated %s Data is up to date