From b603edf1107c411f5c56c6de5a9ae911cf8d3a74 Mon Sep 17 00:00:00 2001 From: Nebojsa Vuksic Date: Fri, 1 Aug 2025 13:18:33 +0200 Subject: [PATCH] Use localized string for weather time display in `WeatherDetailsCard` --- .../template/weatherApp/ui/components/WeatherDetailsCard.kt | 2 +- src/main/resources/messages/ComposeTemplate.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt index 267b9ee..3481809 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt @@ -72,7 +72,7 @@ fun WeatherDetailsCard( ) { // Current Time Text( - text = "Time: ${formatDateTime(currentWeatherForecast.date)}", + text = ComposeTemplateBundle.message("weather.app.time.text", timeToDisplay), color = textColor, fontSize = JewelTheme.defaultTextStyle.fontSize, fontWeight = FontWeight.Bold diff --git a/src/main/resources/messages/ComposeTemplate.properties b/src/main/resources/messages/ComposeTemplate.properties index b9082ab..81f87f8 100644 --- a/src/main/resources/messages/ComposeTemplate.properties +++ b/src/main/resources/messages/ComposeTemplate.properties @@ -1,4 +1,5 @@ weather.app.temperature.text={0}\u00B0C +weather.app.time.text=Time: {0}% weather.app.humidity.text=Humidity: {0}% weather.app.wind.direction.text=Wind: {0} km/h {1} weather.app.my.locations.header.text=My Locations