weather: fix all lint findings
- Commit
8c3d6406328c02b9548a3383f39cb850756210c7- Author
- Vayun Mathur <[email protected]>
- When
- 2026-11-17 04:20 UTC (19 days ago)
- Parents
8c9f61b
Fix every lint error and warning reported for the weather module's own sources by :weather:lintDev, now 0 errors / 0 warnings for weather/** (remaining report entries are transitive library findings owned by other clusters). OneComposablePerFile: split HomeScreen, LocationsScreen, RiseSetTimeRow, SquareBlock and CircularStatBlock into their own files, and rememberWindUnit/rememberPressureUnit/rememberUse24Hour out of SystemUnits.kt. Added POST_NOTIFICATIONS to the manifest (the library MaNotifications posts from this app) and converted the LocationsPage/WeatherMapState boxed state to mutableLongStateOf/mutableIntStateOf. Resources: removed locale-only weather_title, cloud_clear, cloud_mostly_clear, cloud_partly_cloudy and aqi_moderate entries (42 ExtraTranslation lines) and the verified-unused from_gusts string from all locales (no dynamic lookup in the module; gusts render via R.string.gusts). Suppression (1, genuine false positive): tools:ignore=ExportedService on the CarAppService in the manifest, with an explanatory comment — Android Auto / MA Auto hosts bind by the CarAppService intent-filter and the host is validated in code via createHostValidator(); requiring a manifest permission would break host binding. No lint config or baseline changed; no rule-bug categories. Verified: ./gradlew :weather:lintDev (0 own-module errors/warnings) and :weather:testDevUnitTest green.
Diff
weather/src/main/AndroidManifest.xml
diff --git a/weather/src/main/AndroidManifest.xml b/weather/src/main/AndroidManifest.xmlindex 45b1e2db17..eed5e9dac1 100644--- a/weather/src/main/AndroidManifest.xml+++ b/weather/src/main/AndroidManifest.xml@@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?>-<manifest xmlns:android="http://schemas.android.com/apk/res/android">+<manifest xmlns:android="http://schemas.android.com/apk/res/android"+ xmlns:tools="http://schemas.android.com/tools"> <!-- MAOS: opt out of the GrapheneOS Sensors permission (OTHER_SENSORS). --> <!-- This app uses no motion/environment sensors; MAOS withholds the -->@@ -7,6 +8,7 @@ <uses-permission android:name="com.vayunmathur.permission.SENSORS_OPTOUT" /> <uses-permission android:name="android.permission.INTERNET" />+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />@@ -56,9 +58,13 @@ android:exported="true" android:theme="@android:style/Theme.NoDisplay" /> + <!-- Car hosts (Android Auto / MA Auto) bind to this service by its+ CarAppService intent-filter; the host is validated in code via+ createHostValidator(), so no manifest permission can be required. --> <service android:name=".service.car.WeatherCarAppService"- android:exported="true">+ android:exported="true"+ tools:ignore="ExportedService"> <intent-filter> <action android:name="androidx.car.app.CarAppService" /> <category android:name="androidx.car.app.category.WEATHER" />
weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt b/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.ktindex effcb4aa63..9f3293c5f2 100644--- a/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt+++ b/weather/src/main/java/com/vayunmathur/weather/platform/SystemUnits.kt@@ -37,30 +37,6 @@ fun systemTempUnit(): TemperatureUnit = when (LocalePreferences.getTemperatureUn else -> TemperatureUnit.Celsius } -@Composable-fun rememberWindUnit(): WindUnit {- LocalConfiguration.current- return remember(LocalConfiguration.current) {- if (isImperialMeasurementSystem(Locale.getDefault())) WindUnit.Mph else WindUnit.KmH- }-}--@Composable-fun rememberPressureUnit(): PressureUnit {- LocalConfiguration.current- return remember(LocalConfiguration.current) {- if (isImperialMeasurementSystem(Locale.getDefault())) PressureUnit.InHg else PressureUnit.Hpa- }-}--@Composable-fun rememberUse24Hour(): Boolean {- LocalConfiguration.current- val context = LocalContext.current- return remember(LocalConfiguration.current) {- android.text.format.DateFormat.is24HourFormat(context)- }-} /** * True when the locale opts into a non-metric measurement system, either@@ -68,7 +44,7 @@ fun rememberUse24Hour(): Boolean { * preference sets, or by virtue of being one of the three remaining * predominantly-imperial country codes. */-private fun isImperialMeasurementSystem(locale: Locale): Boolean {+internal fun isImperialMeasurementSystem(locale: Locale): Boolean { val extension = locale.getUnicodeLocaleType("ms") if (extension != null) { return extension == "ussystem" || extension == "uksystem"
weather/src/main/java/com/vayunmathur/weather/platform/rememberPressureUnit.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/rememberPressureUnit.kt b/weather/src/main/java/com/vayunmathur/weather/platform/rememberPressureUnit.ktnew file mode 100644index 0000000000..326022c83b--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/platform/rememberPressureUnit.kt@@ -0,0 +1,17 @@+package com.vayunmathur.weather.platform++import androidx.compose.runtime.Composable+import androidx.compose.runtime.remember+import androidx.compose.ui.platform.LocalConfiguration+import androidx.compose.ui.platform.LocalContext+import com.vayunmathur.weather.domain.PressureUnit+import com.vayunmathur.weather.domain.WindUnit+import java.util.Locale++@Composable+fun rememberPressureUnit(): PressureUnit {+ LocalConfiguration.current+ return remember(LocalConfiguration.current) {+ if (isImperialMeasurementSystem(Locale.getDefault())) PressureUnit.InHg else PressureUnit.Hpa+ }+}
weather/src/main/java/com/vayunmathur/weather/platform/rememberUse24Hour.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/rememberUse24Hour.kt b/weather/src/main/java/com/vayunmathur/weather/platform/rememberUse24Hour.ktnew file mode 100644index 0000000000..7dc54fd67a--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/platform/rememberUse24Hour.kt@@ -0,0 +1,18 @@+package com.vayunmathur.weather.platform++import androidx.compose.runtime.Composable+import androidx.compose.runtime.remember+import androidx.compose.ui.platform.LocalConfiguration+import androidx.compose.ui.platform.LocalContext+import com.vayunmathur.weather.domain.PressureUnit+import com.vayunmathur.weather.domain.WindUnit+import java.util.Locale++@Composable+fun rememberUse24Hour(): Boolean {+ LocalConfiguration.current+ val context = LocalContext.current+ return remember(LocalConfiguration.current) {+ android.text.format.DateFormat.is24HourFormat(context)+ }+}
weather/src/main/java/com/vayunmathur/weather/platform/rememberWindUnit.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/platform/rememberWindUnit.kt b/weather/src/main/java/com/vayunmathur/weather/platform/rememberWindUnit.ktnew file mode 100644index 0000000000..364b400e68--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/platform/rememberWindUnit.kt@@ -0,0 +1,17 @@+package com.vayunmathur.weather.platform++import androidx.compose.runtime.Composable+import androidx.compose.runtime.remember+import androidx.compose.ui.platform.LocalConfiguration+import androidx.compose.ui.platform.LocalContext+import com.vayunmathur.weather.domain.PressureUnit+import com.vayunmathur.weather.domain.WindUnit+import java.util.Locale++@Composable+fun rememberWindUnit(): WindUnit {+ LocalConfiguration.current+ return remember(LocalConfiguration.current) {+ if (isImperialMeasurementSystem(Locale.getDefault())) WindUnit.Mph else WindUnit.KmH+ }+}
weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt b/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.ktindex 25188317db..34a5eca5b7 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/HomePage.kt@@ -185,78 +185,6 @@ fun HomePage( ) } -/**- * The forecast page, with no dependency on the ViewModel, the back stack or the clock so it- * can be rendered from a `@Preview` — see `src/screenshotTest`, which is where the store- * listing images come from.- */-@OptIn(ExperimentalMaterial3Api::class)-@Composable-fun HomeScreen(- state: LocationUiState,- units: DisplayUnits,- actions: WeatherActions,- drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed),- /** Short-range rain outlook; reads a clock, so the binder resolves it. */- precipitationNowcast: String? = null,- /**- * "Now" for the hourly strip and the sun arc. A parameter rather than a clock read so a- * preview's fixed sample data can't age out from under it.- */- nowEpochSec: Long = System.currentTimeMillis() / 1000,- onOpenMap: (WeatherMetric, String?) -> Unit = { _, _ -> },- /** The locations drawer. Empty in a preview, which has no saved-location list. */- drawerContent: @Composable () -> Unit = {},-) {- val scope = rememberCoroutineScope()- BackHandler(enabled = drawerState.isOpen) { scope.launch { drawerState.close() } }-- // Expanded windows (large tablets, desktop) pin the locations list as a- // permanent side panel next to the forecast instead of hiding it in a modal- // drawer — there is room for both, and picking another location without- // losing the current forecast is the point of the wide layout. The panel- // fills a fraction of the window rather than a fixed dp so it scales from- // an 840dp tablet to a full desktop window.- if (isExpandedWidth()) {- Row(modifier = Modifier.fillMaxSize()) {- Box(modifier = Modifier.fillMaxWidth(0.35f).fillMaxHeight()) {- drawerContent()- }- ForecastScaffold(- state = state,- units = units,- actions = actions,- drawerState = drawerState,- precipitationNowcast = precipitationNowcast,- nowEpochSec = nowEpochSec,- onOpenMap = onOpenMap,- modifier = Modifier.weight(1f).fillMaxHeight(),- )- }- return- }-- ModalNavigationDrawer(- drawerState = drawerState,- drawerContent = {- ModalDrawerSheet(- drawerContainerColor = MaterialTheme.colorScheme.surfaceContainer,- ) {- drawerContent()- }- },- ) {- ForecastScaffold(- state = state,- units = units,- actions = actions,- drawerState = drawerState,- precipitationNowcast = precipitationNowcast,- nowEpochSec = nowEpochSec,- onOpenMap = onOpenMap,- )- }-} /** * The forecast body under its floating in-content search bar. Shared by the@@ -265,7 +193,7 @@ fun HomeScreen( */ @OptIn(ExperimentalMaterial3Api::class) @Composable-private fun ForecastScaffold(+internal fun ForecastScaffold( state: LocationUiState, units: DisplayUnits, actions: WeatherActions,
weather/src/main/java/com/vayunmathur/weather/ui/HomeScreen.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/HomeScreen.kt b/weather/src/main/java/com/vayunmathur/weather/ui/HomeScreen.ktnew file mode 100644index 0000000000..9378c55675--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/ui/HomeScreen.kt@@ -0,0 +1,147 @@+package com.vayunmathur.weather.ui++import androidx.activity.compose.BackHandler+import com.vayunmathur.library.ui.ExpandVisibility+import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Box+import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.PaddingValues+import androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.Spacer+import androidx.compose.foundation.layout.fillMaxHeight+import androidx.compose.foundation.layout.fillMaxSize+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.height+import androidx.compose.foundation.layout.padding+import androidx.compose.foundation.rememberScrollState+import androidx.compose.foundation.verticalScroll+import com.vayunmathur.library.ui.AppScaffold+import com.vayunmathur.library.ui.Button+import com.vayunmathur.library.ui.CircularProgressIndicator+import com.vayunmathur.library.ui.DrawerState+import com.vayunmathur.library.ui.DrawerValue+import com.vayunmathur.library.ui.ExperimentalMaterial3Api+import com.vayunmathur.library.ui.isExpandedWidth+import com.vayunmathur.library.ui.LoadingIndicator+import com.vayunmathur.library.ui.MaterialTheme+import com.vayunmathur.library.ui.ModalDrawerSheet+import com.vayunmathur.library.ui.ModalNavigationDrawer+import com.vayunmathur.library.ui.OutlinedButton+import com.vayunmathur.library.ui.PullToRefreshBox+import com.vayunmathur.library.ui.Scaffold+import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.ui.rememberDrawerState+import com.vayunmathur.library.ui.appBarScrollBehavior+import com.vayunmathur.library.ui.isExpandedWidth+import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.collectAsState+import androidx.compose.runtime.getValue+import androidx.compose.runtime.rememberCoroutineScope+import androidx.compose.ui.Alignment+import androidx.compose.ui.Modifier+import androidx.compose.ui.platform.LocalContext+import androidx.compose.ui.res.stringResource+import androidx.compose.ui.unit.dp+import androidx.lifecycle.Lifecycle+import androidx.lifecycle.compose.LocalLifecycleOwner+import androidx.lifecycle.repeatOnLifecycle+import com.vayunmathur.library.util.NavBackStack+import com.vayunmathur.weather.R+import com.vayunmathur.weather.Route+import com.vayunmathur.weather.ui.components.CurrentWeatherCard+import com.vayunmathur.weather.ui.components.DailyCard+import com.vayunmathur.weather.ui.components.HourlyCard+import com.vayunmathur.weather.ui.components.MainSearchBar+import com.vayunmathur.weather.ui.components.MetricGraphSheet+import com.vayunmathur.weather.ui.components.SelectedDateTimeHeader+import com.vayunmathur.weather.ui.components.SummaryCard+import com.vayunmathur.weather.ui.components.WeatherBlocks+import com.vayunmathur.weather.platform.DisplayUnits+import com.vayunmathur.weather.platform.LocationUiState+import com.vayunmathur.weather.domain.SelectedDateOrTime+import com.vayunmathur.weather.domain.WeatherMetric+import com.vayunmathur.weather.domain.formatHourAxisLabel+import com.vayunmathur.weather.domain.metricSeries+import com.vayunmathur.weather.domain.metricValueFormatter+import com.vayunmathur.weather.domain.parseLocalIsoToEpochSec+import com.vayunmathur.weather.domain.resolveConditions+import com.vayunmathur.weather.platform.WeatherActions+import com.vayunmathur.weather.platform.WeatherViewModel+import com.vayunmathur.weather.platform.precipitationNowcast+import com.vayunmathur.weather.platform.rememberDisplayUnits+import kotlinx.coroutines.delay+import kotlinx.coroutines.launch++/**+ * The forecast page, with no dependency on the ViewModel, the back stack or the clock so it+ * can be rendered from a `@Preview` — see `src/screenshotTest`, which is where the store+ * listing images come from.+ */+@OptIn(ExperimentalMaterial3Api::class)+@Composable+fun HomeScreen(+ state: LocationUiState,+ units: DisplayUnits,+ actions: WeatherActions,+ drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed),+ /** Short-range rain outlook; reads a clock, so the binder resolves it. */+ precipitationNowcast: String? = null,+ /**+ * "Now" for the hourly strip and the sun arc. A parameter rather than a clock read so a+ * preview's fixed sample data can't age out from under it.+ */+ nowEpochSec: Long = System.currentTimeMillis() / 1000,+ onOpenMap: (WeatherMetric, String?) -> Unit = { _, _ -> },+ /** The locations drawer. Empty in a preview, which has no saved-location list. */+ drawerContent: @Composable () -> Unit = {},+) {+ val scope = rememberCoroutineScope()+ BackHandler(enabled = drawerState.isOpen) { scope.launch { drawerState.close() } }++ // Expanded windows (large tablets, desktop) pin the locations list as a+ // permanent side panel next to the forecast instead of hiding it in a modal+ // drawer — there is room for both, and picking another location without+ // losing the current forecast is the point of the wide layout. The panel+ // fills a fraction of the window rather than a fixed dp so it scales from+ // an 840dp tablet to a full desktop window.+ if (isExpandedWidth()) {+ Row(modifier = Modifier.fillMaxSize()) {+ Box(modifier = Modifier.fillMaxWidth(0.35f).fillMaxHeight()) {+ drawerContent()+ }+ ForecastScaffold(+ state = state,+ units = units,+ actions = actions,+ drawerState = drawerState,+ precipitationNowcast = precipitationNowcast,+ nowEpochSec = nowEpochSec,+ onOpenMap = onOpenMap,+ modifier = Modifier.weight(1f).fillMaxHeight(),+ )+ }+ return+ }++ ModalNavigationDrawer(+ drawerState = drawerState,+ drawerContent = {+ ModalDrawerSheet(+ drawerContainerColor = MaterialTheme.colorScheme.surfaceContainer,+ ) {+ drawerContent()+ }+ },+ ) {+ ForecastScaffold(+ state = state,+ units = units,+ actions = actions,+ drawerState = drawerState,+ precipitationNowcast = precipitationNowcast,+ nowEpochSec = nowEpochSec,+ onOpenMap = onOpenMap,+ )+ }+}
weather/src/main/java/com/vayunmathur/weather/ui/LocationsPage.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/LocationsPage.kt b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsPage.ktnew file mode 100644index 0000000000..7d51dcda95--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsPage.kt@@ -0,0 +1,118 @@+package com.vayunmathur.weather.ui++import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Column+import androidx.compose.foundation.layout.Spacer+import androidx.compose.foundation.layout.fillMaxWidth+import androidx.compose.foundation.layout.height+import androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.width+import com.vayunmathur.library.ui.R as UiR+import com.vayunmathur.library.ui.Button+import com.vayunmathur.library.ui.ExperimentalMaterial3Api+import com.vayunmathur.library.ui.IconBack+import com.vayunmathur.library.ui.IconDelete+import com.vayunmathur.library.ui.IconDragHandle+import com.vayunmathur.library.ui.IconSearch+import com.vayunmathur.library.ui.IconButton+import com.vayunmathur.library.ui.ListItem+import com.vayunmathur.library.ui.ListItemDefaults+import com.vayunmathur.library.ui.LazyListScaffold+import com.vayunmathur.library.ui.MaterialTheme+import com.vayunmathur.library.ui.ModalBottomSheet+import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.ui.TopAppBar+import com.vayunmathur.library.ui.TopAppBarDefaults+import com.vayunmathur.library.ui.SheetValue+import com.vayunmathur.library.ui.rememberBottomSheetState+import androidx.compose.runtime.Composable+import androidx.compose.runtime.LaunchedEffect+import androidx.compose.runtime.collectAsState+import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableLongStateOf+import androidx.compose.runtime.mutableStateOf+import androidx.compose.runtime.remember+import androidx.compose.runtime.setValue+import androidx.compose.ui.Modifier+import androidx.compose.ui.draw.shadow+import androidx.compose.ui.hapticfeedback.HapticFeedbackType+import androidx.compose.ui.platform.LocalContext+import androidx.compose.ui.platform.LocalHapticFeedback+import androidx.compose.ui.platform.LocalResources+import androidx.compose.ui.res.stringResource+import androidx.compose.ui.unit.dp+import com.vayunmathur.library.util.NavBackStack+import com.vayunmathur.weather.R+import com.vayunmathur.weather.Route+import com.vayunmathur.weather.data.SavedLocation+import com.vayunmathur.weather.ui.components.LocationItem+import com.vayunmathur.weather.ui.components.UseDeviceLocationCard+import com.vayunmathur.weather.platform.LocationRow+import com.vayunmathur.weather.platform.LocationsUiState+import com.vayunmathur.weather.platform.WeatherActions+import com.vayunmathur.weather.platform.WeatherViewModel+import androidx.compose.foundation.lazy.itemsIndexed+import androidx.compose.foundation.lazy.rememberLazyListState+import com.vayunmathur.library.ui.ReorderableItem+import com.vayunmathur.library.ui.draggableHandle+import com.vayunmathur.library.ui.rememberReorderableLazyListState+import com.vayunmathur.library.ui.appBarScrollBehavior+import com.vayunmathur.library.ui.animatedDp++/**+ * Binds [WeatherViewModel] and the back stack to the stateless [LocationsScreen].+ *+ * The per-row "Last updated 4m ago" line is built here because it needs both a [Resources]+ * for the string and a clock; the screen only ever sees the finished text.+ */+@Composable+fun LocationsPage(+ backStack: NavBackStack<Route>,+ viewModel: WeatherViewModel,+ activeLocation: SavedLocation?,+ onLocationSelect: (SavedLocation) -> Unit,+ onClose: () -> Unit,+) {+ val locations = viewModel.savedLocations.collectAsState().value.orEmpty()+ val forecasts by viewModel.forecasts.collectAsState()+ val resources = LocalResources.current++ // Ticks every 30s so the "Last updated Xm ago" labels advance over time+ // rather than being frozen at whatever they read when the drawer opened.+ var nowMs by remember { mutableLongStateOf(System.currentTimeMillis()) }+ LaunchedEffect(Unit) {+ while (true) {+ kotlinx.coroutines.delay(30_000)+ nowMs = System.currentTimeMillis()+ }+ }++ val (onAddCurrentLocation, deviceLocationLoading) = rememberRequestDeviceLocation(viewModel)++ val rows = locations.map { loc ->+ val state = forecasts[loc.id]+ LocationRow(+ location = loc,+ description = state?.fetchedAtEpochMs+ ?.takeIf { it > 0L }+ ?.let { resources.getString(R.string.last_updated, formatAgo(resources, it, nowMs)) }+ ?: resources.getString(R.string.no_data_yet),+ weatherCode = state?.forecast?.current?.weatherCode,+ isDay = (state?.forecast?.current?.isDay ?: 1) == 1,+ )+ }++ LocationsScreen(+ state = LocationsUiState(+ rows = rows,+ activeLocationId = activeLocation?.id,+ deviceLocationLoading = deviceLocationLoading,+ ),+ actions = viewModel,+ onLocationSelect = onLocationSelect,+ onClose = onClose,+ onSearchLocation = { backStack.add(Route.SearchLocation) },+ onUseDeviceLocation = onAddCurrentLocation,+ )+}+
weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.ktindex 4aad677124..8513ed24cb 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/LocationsScreen.kt@@ -64,57 +64,6 @@ import com.vayunmathur.library.ui.animatedDp * The per-row "Last updated 4m ago" line is built here because it needs both a [Resources] * for the string and a clock; the screen only ever sees the finished text. */-@Composable-fun LocationsPage(- backStack: NavBackStack<Route>,- viewModel: WeatherViewModel,- activeLocation: SavedLocation?,- onLocationSelect: (SavedLocation) -> Unit,- onClose: () -> Unit,-) {- val locations = viewModel.savedLocations.collectAsState().value.orEmpty()- val forecasts by viewModel.forecasts.collectAsState()- val resources = LocalResources.current-- // Ticks every 30s so the "Last updated Xm ago" labels advance over time- // rather than being frozen at whatever they read when the drawer opened.- var nowMs by remember { mutableStateOf(System.currentTimeMillis()) }- LaunchedEffect(Unit) {- while (true) {- kotlinx.coroutines.delay(30_000)- nowMs = System.currentTimeMillis()- }- }-- val (onAddCurrentLocation, deviceLocationLoading) = rememberRequestDeviceLocation(viewModel)-- val rows = locations.map { loc ->- val state = forecasts[loc.id]- LocationRow(- location = loc,- description = state?.fetchedAtEpochMs- ?.takeIf { it > 0L }- ?.let { resources.getString(R.string.last_updated, formatAgo(resources, it, nowMs)) }- ?: resources.getString(R.string.no_data_yet),- weatherCode = state?.forecast?.current?.weatherCode,- isDay = (state?.forecast?.current?.isDay ?: 1) == 1,- )- }-- LocationsScreen(- state = LocationsUiState(- rows = rows,- activeLocationId = activeLocation?.id,- deviceLocationLoading = deviceLocationLoading,- ),- actions = viewModel,- onLocationSelect = onLocationSelect,- onClose = onClose,- onSearchLocation = { backStack.add(Route.SearchLocation) },- onUseDeviceLocation = onAddCurrentLocation,- )-}- /** * Locations drawer content, with no dependency on the ViewModel or the back stack so it can * be rendered from a `@Preview` — see `src/screenshotTest`, which is where the store listing
weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapState.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapState.kt b/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapState.ktindex 8660141b9e..8125459e4e 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapState.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/WeatherMapState.kt@@ -17,6 +17,7 @@ import com.vayunmathur.weather.network.WeatherApi import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue+import androidx.compose.runtime.mutableIntStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue@@ -69,7 +70,7 @@ internal class WeatherMapState( ) var metadata by mutableStateOf<OmMapMetadata?>(null)- var timeIndex by mutableStateOf(0)+ var timeIndex by mutableIntStateOf(0) var userScrubbed by mutableStateOf(false) var visibleBbox by mutableStateOf<GeoBounds?>(null) var overlay by mutableStateOf<ImageBitmap?>(null)
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/BlockHeader.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/BlockHeader.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/BlockHeader.ktindex ee58fbaf5b..a7a16f3cea 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/BlockHeader.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/BlockHeader.kt@@ -50,27 +50,3 @@ fun BlockHeader( } } -/**- * One line of the translucent bottom panel on the Sun and Moon blocks: a small- * leading icon and a time (or duration, or phase name). [style] exists for the- * moon's phase names, which are far longer than a clock time and overflow the- * narrowest grid cell at the default size.- */-@Composable-fun RiseSetTimeRow(- text: String,- icon: @Composable (Modifier, Color) -> Unit,- style: TextStyle = MaterialTheme.typography.labelLarge,-) {- Row(verticalAlignment = Alignment.CenterVertically) {- icon(Modifier.size(18.dp), MaterialTheme.colorScheme.onSurface)- Spacer(Modifier.width(5.dp))- Text(- text = text,- color = MaterialTheme.colorScheme.onSurface,- style = style,- maxLines = 1,- softWrap = true,- )- }-}
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/CircularStatBlock.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/CircularStatBlock.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/CircularStatBlock.ktnew file mode 100644index 0000000000..36523ff4ec--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/CircularStatBlock.kt@@ -0,0 +1,10 @@+package com.vayunmathur.weather.ui.components.blocks++import androidx.compose.foundation.layout.BoxScope+import androidx.compose.foundation.shape.CircleShape+import androidx.compose.runtime.Composable++/** Circular variant — wind, pressure, cloud cover, visibility. */+@Composable+fun CircularStatBlock(content: @Composable BoxScope.() -> Unit) =+ StatBlock(shape = CircleShape, content = content)
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/RiseSetTimeRow.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/RiseSetTimeRow.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/RiseSetTimeRow.ktnew file mode 100644index 0000000000..a3bc581382--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/RiseSetTimeRow.kt@@ -0,0 +1,43 @@+package com.vayunmathur.weather.ui.components.blocks++import androidx.compose.foundation.layout.Arrangement+import androidx.compose.foundation.layout.Row+import androidx.compose.foundation.layout.Spacer+import androidx.compose.foundation.layout.padding+import androidx.compose.foundation.layout.size+import androidx.compose.foundation.layout.width+import com.vayunmathur.library.ui.MaterialTheme+import com.vayunmathur.library.ui.Text+import androidx.compose.runtime.Composable+import androidx.compose.ui.Alignment+import androidx.compose.ui.Modifier+import androidx.compose.ui.graphics.Color+import androidx.compose.ui.text.TextStyle+import androidx.compose.ui.text.font.FontWeight+import androidx.compose.ui.unit.Dp+import androidx.compose.ui.unit.dp++/**+ * One line of the translucent bottom panel on the Sun and Moon blocks: a small+ * leading icon and a time (or duration, or phase name). [style] exists for the+ * moon's phase names, which are far longer than a clock time and overflow the+ * narrowest grid cell at the default size.+ */+@Composable+fun RiseSetTimeRow(+ text: String,+ icon: @Composable (Modifier, Color) -> Unit,+ style: TextStyle = MaterialTheme.typography.labelLarge,+) {+ Row(verticalAlignment = Alignment.CenterVertically) {+ icon(Modifier.size(18.dp), MaterialTheme.colorScheme.onSurface)+ Spacer(Modifier.width(5.dp))+ Text(+ text = text,+ color = MaterialTheme.colorScheme.onSurface,+ style = style,+ maxLines = 1,+ softWrap = true,+ )+ }+}
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/SquareBlock.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/SquareBlock.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/SquareBlock.ktnew file mode 100644index 0000000000..eb55dae3fb--- /dev/null+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/SquareBlock.kt@@ -0,0 +1,10 @@+package com.vayunmathur.weather.ui.components.blocks++import androidx.compose.foundation.layout.BoxScope+import com.vayunmathur.library.ui.MaterialTheme+import androidx.compose.runtime.Composable++/** Square (rounded `extraLarge`) variant — humidity, precipitation, air quality, sun, pollen. */+@Composable+fun SquareBlock(content: @Composable BoxScope.() -> Unit) =+ StatBlock(shape = MaterialTheme.shapes.extraLarge, content = content)
weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.ktindex aef038ff48..9988e0a37f 100644--- a/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt+++ b/weather/src/main/java/com/vayunmathur/weather/ui/components/blocks/StatBlock.kt@@ -31,13 +31,3 @@ fun StatBlock( Box(modifier = Modifier.fillMaxSize().aspectRatio(1f), content = content) } }--/** Square (rounded `extraLarge`) variant — humidity, precipitation, air quality, sun, pollen. */-@Composable-fun SquareBlock(content: @Composable BoxScope.() -> Unit) =- StatBlock(shape = MaterialTheme.shapes.extraLarge, content = content)--/** Circular variant — wind, pressure, cloud cover, visibility. */-@Composable-fun CircularStatBlock(content: @Composable BoxScope.() -> Unit) =- StatBlock(shape = CircleShape, content = content)
weather/src/main/res/values-ar/strings.xml
diff --git a/weather/src/main/res/values-ar/strings.xml b/weather/src/main/res/values-ar/strings.xmlindex d2e34b32d6..aff80abb2a 100644--- a/weather/src/main/res/values-ar/strings.xml+++ b/weather/src/main/res/values-ar/strings.xml@@ -20,7 +20,6 @@ <string name="max_min">الأقصى <xliff:g id="max" example="28°C">%1$s</xliff:g> الأدنى <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">يشعر كأن <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="dew_point">نقطة الندى</string>- <string name="from_gusts">من <xliff:g id="direction" example="NW">%1$s</xliff:g> · الرياح العاصفة <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">لا بيانات كافية للرسم.</string> <string name="condition_mostly_clear">صافٍ غالبًا</string> <string name="condition_partly_cloudy">غائم جزئيًا</string>
weather/src/main/res/values-cs/strings.xml
diff --git a/weather/src/main/res/values-cs/strings.xml b/weather/src/main/res/values-cs/strings.xmlindex 78f01fb6d1..4fa393a62c 100644--- a/weather/src/main/res/values-cs/strings.xml+++ b/weather/src/main/res/values-cs/strings.xml@@ -5,7 +5,6 @@ <string name="search_location">Hledat místo</string> <string name="confirm_delete">Potvrdit smazání</string> <string name="city_name_hint">Název města</string>- <string name="weather_title">Počasí</string> <string name="add_location">Přidat místo</string> <string name="no_locations_yet">Zatím žádné místa</string> <string name="add_a_city_or_use_your_current_location">Přidejte město nebo použijte vaši aktuální polohu pro zobrazení předpovědi.</string>@@ -20,7 +19,6 @@ <string name="max_min">Max <xliff:g id="max" example="28 °C">%1$s</xliff:g> Min <xliff:g id="min" example="14 °C">%2$s</xliff:g></string> <string name="feels_like">Pocitově <xliff:g id="temp" example="26 °C">%1$s</xliff:g></string> <string name="dew_point">Rosný bod</string>- <string name="from_gusts">Z <xliff:g id="direction" example="NW">%1$s</xliff:g> · Nárazy <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">Nedostatek dat pro zobrazení.</string> <string name="condition_partly_cloudy">Polojasno</string> <string name="condition_cloudy">Zataženo</string>@@ -54,13 +52,9 @@ <string name="level_very_high">Velmi vysoký</string> <string name="level_extreme">Extrémní</string> <string name="level_severe">Silný</string>- <string name="cloud_clear">Jasno</string>- <string name="cloud_mostly_clear">Skoro jasno</string>- <string name="cloud_partly_cloudy">Polojasno</string> <string name="cloud_mostly_cloudy">Skoro zataženo</string> <string name="cloud_overcast">Zataženo</string> <string name="aqi_good">Dobrá</string>- <string name="aqi_moderate">Mírná</string> <string name="aqi_unhealthy_sensitive">Nezdravá (citlivé skupiny)</string> <string name="aqi_unhealthy">Nezdravá</string> <string name="aqi_very_unhealthy">Velmi nezdravá</string>
weather/src/main/res/values-de/strings.xml
diff --git a/weather/src/main/res/values-de/strings.xml b/weather/src/main/res/values-de/strings.xmlindex 6bf475115d..f312336a90 100644--- a/weather/src/main/res/values-de/strings.xml+++ b/weather/src/main/res/values-de/strings.xml@@ -4,6 +4,5 @@ <string name="search_location">Suche Standort</string> <string name="confirm_delete">Löschen bestätigen</string> <string name="city_name_hint">Stadt</string>- <string name="weather_title">Wetter</string> <string name="add_location">Ort hinzufügen</string> </resources>
weather/src/main/res/values-et/strings.xml
diff --git a/weather/src/main/res/values-et/strings.xml b/weather/src/main/res/values-et/strings.xmlindex c28a4b19d9..661790e8c4 100644--- a/weather/src/main/res/values-et/strings.xml+++ b/weather/src/main/res/values-et/strings.xml@@ -4,7 +4,6 @@ <string name="search_location">Otsi asukohta</string> <string name="confirm_delete">Kinnita kustutamine</string> <string name="city_name_hint">Linna või koha nimi</string>- <string name="weather_title">Ilmaennustus</string> <string name="add_location">Lisa asukoht</string> <string name="weather_widget_description">Ilmateave ja kellaaeg ühe vaatena - klõpsa ja vaata ennustust</string> <string name="no_matches">Vasteid pole</string>@@ -20,7 +19,6 @@ <string name="detect_your_device_s_current_location_au">Tuvasta automaatselt oma seadme praegune asukoht ja lisa oma loendisse</string> <string name="current_location">Praegune asukoht</string> <string name="locations">Asukohad</string>- <string name="from_gusts">Tuule suund <xliff:g id="direction" example="NW">%1$s</xliff:g> · Puhangud <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">Graafiku joonistamiseks pole piisavalt andmeid.</string> <string name="condition_partly_cloudy">Vahelduv pilvisus</string> <string name="condition_cloudy">Pilves</string>@@ -54,13 +52,9 @@ <string name="level_very_high">Väga kõrge</string> <string name="level_extreme">Äärmuslik</string> <string name="level_severe">Tõsine</string>- <string name="cloud_clear">Pilvitu</string>- <string name="cloud_mostly_clear">Enamuses pilvitu</string>- <string name="cloud_partly_cloudy">Vahelduv pilvisus</string> <string name="cloud_mostly_cloudy">Enamasti pilves</string> <string name="cloud_overcast">Lauspilves</string> <string name="aqi_good">Hea</string>- <string name="aqi_moderate">Mõõdukas</string> <string name="aqi_unhealthy_sensitive">Ebatervislik (ohustatutele)</string> <string name="aqi_unhealthy">Ebatervislik</string> <string name="aqi_very_unhealthy">Väga ebatervislik</string>
weather/src/main/res/values-fr/strings.xml
diff --git a/weather/src/main/res/values-fr/strings.xml b/weather/src/main/res/values-fr/strings.xmlindex d53ad357ee..1cde8095b1 100644--- a/weather/src/main/res/values-fr/strings.xml+++ b/weather/src/main/res/values-fr/strings.xml@@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="confirm_delete">Confirmer la suppression</string>- <string name="weather_title">Météo</string> <string name="add_location">Ajouter un lieu</string> <string name="city_name_hint">Nom de la ville</string> <string name="search_location">Rechercher un lieu</string>@@ -25,7 +24,6 @@ <string name="summary_slight_chance_rain">Faible risque de pluie.</string> <string name="metric_visibility">Visibilité</string> <string name="metric_temperature">Température</string>- <string name="from_gusts">Vent de <xliff:g id="direction" example="NW">%1$s</xliff:g> · Rafales à <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="metric_feels_like">Ressenti</string> <string name="feels_like">Ressenti : %1$s</string> <string name="use_current_location">Utiliser la position actuelle</string>@@ -63,13 +61,9 @@ <string name="level_very_high">Très élevé</string> <string name="level_extreme">Extrême</string> <string name="level_severe">Sévère</string>- <string name="cloud_clear">Dégagé</string>- <string name="cloud_mostly_clear">Peu nuageux</string>- <string name="cloud_partly_cloudy">Partiellement nuageux</string> <string name="cloud_mostly_cloudy">Très nuageux</string> <string name="cloud_overcast">Couvert</string> <string name="aqi_good">Bon</string>- <string name="aqi_moderate">Modéré</string> <string name="aqi_unhealthy">Mauvais</string> <string name="aqi_very_unhealthy">Très mauvais</string> <string name="aqi_hazardous">Dangereux</string>
weather/src/main/res/values-it/strings.xml
diff --git a/weather/src/main/res/values-it/strings.xml b/weather/src/main/res/values-it/strings.xmlindex 8a02e070ac..b01d6d031e 100644--- a/weather/src/main/res/values-it/strings.xml+++ b/weather/src/main/res/values-it/strings.xml@@ -4,7 +4,6 @@ <string name="search_location">Cerca località</string> <string name="confirm_delete">Conferma eliminazione</string> <string name="city_name_hint">Nome della città</string>- <string name="weather_title">Meteo</string> <string name="add_location">Aggiungi una località</string> <string name="weather_widget_description">Ora, data e meteo a colpo d\'occhio — tocca per le previsioni</string> <string name="no_locations_yet">Nessuna località</string>@@ -20,7 +19,6 @@ <string name="max_min">Max <xliff:g id="max" example="28°C">%1$s</xliff:g> Min <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">Percepiti <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="dew_point">Punto di rugiada</string>- <string name="from_gusts">Da <xliff:g id="direction" example="NW">%1$s</xliff:g> · Raffiche <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">Dati insufficienti per il grafico.</string> <string name="condition_mostly_clear">Prevalentemente sereno</string> <string name="condition_partly_cloudy">Parzialmente nuvoloso</string>
weather/src/main/res/values-ja/strings.xml
diff --git a/weather/src/main/res/values-ja/strings.xml b/weather/src/main/res/values-ja/strings.xmlindex b1a888fe5a..304436ea31 100644--- a/weather/src/main/res/values-ja/strings.xml+++ b/weather/src/main/res/values-ja/strings.xml@@ -2,7 +2,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name">天気</string> <string name="weather_widget_description">現在の時間、日付と天気を一目で - タップして天気予報を開く</string>- <string name="weather_title">天気</string> <string name="no_locations_yet">場所がありません</string> <string name="add_a_city_or_use_your_current_location">天気予報を見るには、都市を追加するか現在の位置を使用します。</string> <string name="add_location">場所を追加</string>@@ -20,7 +19,6 @@ <string name="max_min">最高気温 <xliff:g id="max" example="28°C">%1$s</xliff:g> 最低気温 <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">体感温度 <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="dew_point">露点</string>- <string name="from_gusts"><xliff:g id="direction" example="NW">%1$s</xliff:g> の風 · 最大瞬間風速 <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">グラフを描く十分なデータがありません。</string> <string name="condition_mostly_clear">晴れ</string> <string name="condition_partly_cloudy">晴れ</string>@@ -64,13 +62,9 @@ <string name="level_very_high">非常に強い</string> <string name="level_extreme">極端に強い</string> <string name="level_severe">極端に強い</string>- <string name="cloud_clear">快晴</string>- <string name="cloud_mostly_clear">晴れ</string>- <string name="cloud_partly_cloudy">晴れ</string> <string name="cloud_mostly_cloudy">曇り</string> <string name="cloud_overcast">曇り</string> <string name="aqi_good">良い</string>- <string name="aqi_moderate">中程度</string> <string name="aqi_unhealthy_sensitive">健康に良くない (敏感な人)</string> <string name="aqi_unhealthy">健康に良くない</string> <string name="aqi_very_unhealthy">非常に健康に良くない</string>
weather/src/main/res/values-pl/strings.xml
diff --git a/weather/src/main/res/values-pl/strings.xml b/weather/src/main/res/values-pl/strings.xmlindex 7a77ca7dd6..8e9c24ca01 100644--- a/weather/src/main/res/values-pl/strings.xml+++ b/weather/src/main/res/values-pl/strings.xml@@ -4,7 +4,6 @@ <string name="search_location">Wyszukaj lokalizację</string> <string name="confirm_delete">Potwierdź usunięcie</string> <string name="city_name_hint">Nazwa miasta</string>- <string name="weather_title">Pogoda</string> <string name="add_location">Dodaj lokalizację</string> <string name="weather_widget_description">Aktualny czas, data i pogoda na pierwszy rzut oka - dotknij, aby zobaczyć prognozę</string> <string name="no_locations_yet">Nie dodano jeszcze lokalizacji</string>@@ -20,7 +19,6 @@ <string name="max_min">Maks. <xliff:g id="max" example="28°C">%1$s</xliff:g> Min. <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">Odczuwalna <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="dew_point">Punkt rosy</string>- <string name="from_gusts">Z kierunku: <xliff:g id="direction" example="NW">%1$s</xliff:g> · W porywach <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">Za mało danych do sporządzenia wykresu.</string> <string name="condition_partly_cloudy">Częściowe zachmurzenie</string> <string name="condition_cloudy">Pochmurno</string>@@ -54,13 +52,9 @@ <string name="level_very_high">Bardzo wysoki</string> <string name="level_extreme">Ekstremalny</string> <string name="level_severe">Ciężki</string>- <string name="cloud_clear">Bezchmurnie</string>- <string name="cloud_mostly_clear">Przeważnie bezchmurnie</string>- <string name="cloud_partly_cloudy">Częściowe zachmurzenie</string> <string name="cloud_mostly_cloudy">Zachmurzenie duże</string> <string name="cloud_overcast">Całkowite zachmurzenie</string> <string name="aqi_good">Dobry</string>- <string name="aqi_moderate">Umiarkowany</string> <string name="aqi_unhealthy_sensitive">Niezdrowy (wrażliwy)</string> <string name="aqi_unhealthy">Niezdrowy</string> <string name="aqi_very_unhealthy">Bardzo niezdrowe</string>
weather/src/main/res/values-ru/strings.xml
diff --git a/weather/src/main/res/values-ru/strings.xml b/weather/src/main/res/values-ru/strings.xmlindex dcb72e59d6..be55e61ba6 100644--- a/weather/src/main/res/values-ru/strings.xml+++ b/weather/src/main/res/values-ru/strings.xml@@ -2,7 +2,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name">Погода</string> <string name="weather_widget_description">Текущее время, дата и погода — нажмите, чтобы посмотреть прогноз</string>- <string name="weather_title">Погода</string> <string name="no_locations_yet">Пока нет локаций</string> <string name="add_a_city_or_use_your_current_location">Добавьте город или укажите ваше текущее местоположение, чтобы посмотреть прогноз погоды.</string> <string name="add_location">Добавить местоположение</string>@@ -61,13 +60,9 @@ <string name="level_very_high">Очень высоко</string> <string name="level_extreme">Экстремально</string> <string name="level_severe">Сильно</string>- <string name="cloud_clear">Ясно</string>- <string name="cloud_mostly_clear">Малооблачно</string>- <string name="cloud_partly_cloudy">Переменная облачность</string> <string name="cloud_mostly_cloudy">Облачно с прояснениями</string> <string name="cloud_overcast">Пасмурно</string> <string name="aqi_good">Чисто</string>- <string name="aqi_moderate">Приемлемо</string> <string name="aqi_unhealthy_sensitive">Вредно (чувств.)</string> <string name="aqi_unhealthy">Вредно</string> <string name="aqi_very_unhealthy">Очень вредно</string>@@ -87,7 +82,6 @@ <string name="weather_blob_widget_description">Виджет в форме капли с температурой и иконкой погоды</string> <string name="max_min">Max <xliff:g id="max" example="28°C">%1$s</xliff:g> Min <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">Ощущается <xliff:g id="temp" example="26°C">%1$s</xliff:g></string>- <string name="from_gusts">Напр <xliff:g id="direction" example="NW">%1$s</xliff:g> · Порывы <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="precip_rain_in_min">Дождь через ~<xliff:g id="minutes" example="15">%1$d</xliff:g> минут</string> <string name="last_updated">Обновлено <xliff:g id="time_ago" example="2h ago">%1$s</xliff:g></string> <string name="minutes_ago"><xliff:g id="minutes" example="5">%1$d</xliff:g>минут назад</string>
weather/src/main/res/values-sv/strings.xml
diff --git a/weather/src/main/res/values-sv/strings.xml b/weather/src/main/res/values-sv/strings.xmlindex 05dd3b3296..a49399a5c4 100644--- a/weather/src/main/res/values-sv/strings.xml+++ b/weather/src/main/res/values-sv/strings.xml@@ -2,7 +2,6 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_name">Väder</string> <string name="weather_widget_description">Aktuell tid, datum och väder i en överblick – tryck för prognosen</string>- <string name="weather_title">Väder</string> <string name="no_locations_yet">Inga platser ännu</string> <string name="add_a_city_or_use_your_current_location">Lägg till en stad eller använd din aktuella plats för att se prognosen.</string> <string name="add_location">Lägg till plats</string>@@ -21,7 +20,6 @@ <string name="max_min">Max <xliff:g id="max" example="28°C">%1$s</xliff:g> Min <xliff:g id="min" example="14°C">%2$s</xliff:g></string> <string name="feels_like">Känns som <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="dew_point">Daggpunkt</string>- <string name="from_gusts">Från <xliff:g id="direction" example="NW">%1$s</xliff:g> · Byar <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="not_enough_data_to_plot">Inte tillräckligt med data för att rita diagrammet.</string> <string name="condition_mostly_clear">Mestadels klart</string> <string name="condition_partly_cloudy">Delvis molnigt</string>@@ -65,13 +63,9 @@ <string name="level_very_high">Mycket hög</string> <string name="level_extreme">Extrem</string> <string name="level_severe">Allvarlig</string>- <string name="cloud_clear">Klart</string>- <string name="cloud_mostly_clear">Mestadels klart</string>- <string name="cloud_partly_cloudy">Delvis molnigt</string> <string name="cloud_mostly_cloudy">Mestadels molnigt</string> <string name="cloud_overcast">Mulet</string> <string name="aqi_good">Bra</string>- <string name="aqi_moderate">Måttlig</string> <string name="aqi_unhealthy_sensitive">Ohälsosam (känsliga grupper)</string> <string name="aqi_unhealthy">Ohälsosam</string> <string name="aqi_very_unhealthy">Mycket ohälsosam</string>
weather/src/main/res/values-zh-rCN/strings.xml
diff --git a/weather/src/main/res/values-zh-rCN/strings.xml b/weather/src/main/res/values-zh-rCN/strings.xmlindex 9c5945ba96..54df3ecc4f 100644--- a/weather/src/main/res/values-zh-rCN/strings.xml+++ b/weather/src/main/res/values-zh-rCN/strings.xml@@ -4,7 +4,6 @@ <string name="search_location">搜索位置</string> <string name="confirm_delete">确认删除</string> <string name="city_name_hint">城市名称</string>- <string name="weather_title">天气</string> <string name="add_location">添加位置</string> <string name="weather_widget_description">一览当前时间、日期和天气 - 点按即可查看天气预报</string> <string name="add_a_city_or_use_your_current_location">添加城市或使用当前位置查看天气预报。</string>@@ -25,7 +24,6 @@ <string name="summary_slight_chance_rain">有小雨的可能。</string> <string name="metric_visibility">能见度</string> <string name="metric_temperature">温度</string>- <string name="from_gusts">来自 <xliff:g id="direction" example="NW">%1$s</xliff:g> · 阵风 <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <string name="metric_feels_like">体感</string> <string name="feels_like">体感 <xliff:g id="temp" example="26°C">%1$s</xliff:g></string> <string name="use_current_location">使用当前位置</string>@@ -70,13 +68,9 @@ <string name="level_very_high">很高</string> <string name="level_extreme">极端</string> <string name="level_severe">严重</string>- <string name="cloud_clear">晴</string>- <string name="cloud_mostly_clear">大部分晴</string>- <string name="cloud_partly_cloudy">多云</string> <string name="cloud_mostly_cloudy">大部分多云</string> <string name="cloud_overcast">阴天</string> <string name="aqi_good">良好</string>- <string name="aqi_moderate">中等</string> <string name="aqi_unhealthy_sensitive">不健康(敏感人群)</string> <string name="aqi_unhealthy">不健康</string> <string name="aqi_very_unhealthy">非常不健康</string>
weather/src/main/res/values/strings.xml
diff --git a/weather/src/main/res/values/strings.xml b/weather/src/main/res/values/strings.xmlindex ce669bfb45..08f0d60f1a 100644--- a/weather/src/main/res/values/strings.xml+++ b/weather/src/main/res/values/strings.xml@@ -44,7 +44,6 @@ <!-- HumidityBlock: row label for dew point inside humidity details. Noun phrase --> <string name="dew_point">Dew point</string> <!-- WindBlock: wind details line. %1$s = compass direction e.g. NW, %2$s = gusts speed e.g. 18 km/h -->- <string name="from_gusts">From <xliff:g id="direction" example="NW">%1$s</xliff:g> · Gusts <xliff:g id="gusts" example="18 km/h">%2$s</xliff:g></string> <!-- Placeholder when not enough data points (<2) to draw graph line --> <string name="not_enough_data_to_plot">Not enough data to plot.</string>