Modularization of pressure unit conversion/formatting

This commit is contained in:
Julien Papasian 2025-08-11 20:56:15 +02:00 committed by Julien Papasian
parent 731c65f29a
commit d9d51978f7
192 changed files with 3726 additions and 491 deletions

View file

@ -7,6 +7,7 @@
**Removed features**
- Mean daytime/nighttime temperatures as threshold lines. Use a normals source instead
- [Met Office UK] Removed address lookup feature
- Pressure unit - Kilogram force per square centimeter
**Improvements and fixes**
- Main screen - Allow to move small blocks by drag & drop
@ -59,6 +60,7 @@
**Technical**
- Current location process refactoring: coordinates, forced refresh when coordinates changed from more than 5 km
- Address lookup process refactoring to prepare for future ability to add a location manually by coordinates
- Pressure unit conversion/formatting refactoring
# Version 6.0.4-alpha (2025-07-23)

View file

@ -170,6 +170,8 @@ Translation is done externally [on Weblate](https://hosted.weblate.org/projects/
English (and regional variants) and French translations are maintained by repo maintainers, but they are open to proofreading/improvements. You will need to make a pull request, as we didnt find a way to make these languages in suggestion-only mode in Weblate (let us know if you find anything).
For unit formatting, we use [Unicode data](https://www.unicode.org/cldr/charts/47/summary/root.html) as much as possible. If you believe there is an error, please [open a discussion](https://github.com/breezy-weather/breezy-weather/discussions/categories/general) with evidences that the changes you suggest is the recommendation for your language.
# Contact us

View file

@ -271,6 +271,7 @@ dependencies {
implementation(projects.domain)
implementation(projects.mapsUtils)
implementation(projects.uiWeatherView)
implementation(projects.weatherUnit)
implementation(libs.breezy.datasharing.lib)
implementation(libs.core.ktx)

View file

@ -59,7 +59,6 @@ import org.breezyweather.common.basic.models.options.unit.DurationUnit
import org.breezyweather.common.basic.models.options.unit.PollenUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationIntensityUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationUnit
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.basic.models.options.unit.SpeedUnit
import org.breezyweather.common.basic.models.options.unit.TemperatureUnit
import org.breezyweather.common.basic.models.options.unit.getCloudCoverDescription
@ -106,6 +105,8 @@ import org.breezyweather.domain.weather.model.validPollens
import org.breezyweather.domain.weather.model.validPollutants
import org.breezyweather.sources.SourceManager
import org.breezyweather.sources.getFeatureSource
import org.breezyweather.unit.pressure.Pressure
import org.breezyweather.unit.pressure.PressureUnit
import kotlin.math.roundToInt
class WeatherContentProvider : ContentProvider() {
@ -552,9 +553,9 @@ class WeatherContentProvider : ContentProvider() {
summary = null
),
pressure = BreezyDailyUnit(
avg = getPressureUnit(day.visibility?.average, pressureUnit),
max = getPressureUnit(day.visibility?.max, pressureUnit),
min = getPressureUnit(day.visibility?.min, pressureUnit),
avg = getPressureUnit(day.pressure?.average, pressureUnit),
max = getPressureUnit(day.pressure?.max, pressureUnit),
min = getPressureUnit(day.pressure?.min, pressureUnit),
summary = null
),
cloudCover = BreezyDailyUnit(
@ -869,12 +870,12 @@ class WeatherContentProvider : ContentProvider() {
}
private fun getPressureUnit(
pressure: Double?,
pressure: Pressure?,
pressureUnit: PressureUnit,
): BreezyUnit? {
return pressure?.let {
BreezyUnit(
value = pressureUnit.convertUnit(it).roundDecimals(pressureUnit.precision),
value = it.toDouble(pressureUnit).roundDecimals(pressureUnit.decimals.long),
unit = pressureUnit.id
)
}

View file

@ -78,12 +78,8 @@ enum class DetailScreen(
location.weather?.hourlyForecast?.any {
(it.relativeHumidity ?: 0.0) > 0.0 || (it.dewPoint ?: 0.0) != 0.0
} == true
TAG_PRESSURE -> location.weather?.dailyForecast?.any {
(it.pressure?.average ?: 0.0) > 0.0
} == true ||
location.weather?.hourlyForecast?.any {
(it.pressure ?: 0.0) > 0.0
} == true
TAG_PRESSURE -> location.weather?.dailyForecast?.any { it.pressure?.average != null } == true ||
location.weather?.hourlyForecast?.any { it.pressure != null } == true
TAG_CLOUD_COVER -> location.weather?.dailyForecast?.any {
(it.cloudCover?.min ?: 0) > 0 || (it.cloudCover?.max ?: 0) > 0
} == true ||

View file

@ -51,16 +51,6 @@ import org.breezyweather.common.extensions.isTraditionalChinese
import org.breezyweather.domain.settings.SettingsManager
import java.text.FieldPosition
import java.util.Locale
import kotlin.Array
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.Number
import kotlin.String
import kotlin.UnsupportedOperationException
import kotlin.apply
import kotlin.charArrayOf
import kotlin.let
import kotlin.math.pow
import kotlin.math.roundToInt
import kotlin.time.Duration.Companion.days
@ -289,7 +279,6 @@ object UnitUtils {
* @param value
* @param unit
* @param perUnit an optional per unit. /!\ Only supported on Android SDK >= 26
* @param unitWidth
*/
@RequiresApi(api = Build.VERSION_CODES.N)
fun formatWithMeasureFormat(

View file

@ -1,163 +0,0 @@
/**
* This file is part of Breezy Weather.
*
* Breezy Weather is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, version 3 of the License.
*
* Breezy Weather is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Breezy Weather. If not, see <https://www.gnu.org/licenses/>.
*/
package org.breezyweather.common.basic.models.options.unit
import android.content.Context
import android.icu.util.MeasureUnit
import android.os.Build
import org.breezyweather.R
import org.breezyweather.common.basic.models.options.basic.UnitEnum
import org.breezyweather.common.basic.models.options.basic.UnitUtils
import org.breezyweather.common.extensions.currentLocale
// actual pressure = pressure(mb) * factor.
enum class PressureUnit(
override val id: String,
override val measureUnit: MeasureUnit?,
override val perMeasureUnit: MeasureUnit?,
override val convertUnit: (Double) -> Double,
val chartStep: Double,
val precision: Int = 0,
) : UnitEnum<Double> {
MILLIBAR(
"mb",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) MeasureUnit.MILLIBAR else null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit },
chartStep = 15.0
),
KILOPASCAL( // TODO: Consider deleting
"kpa",
null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit.div(10) },
chartStep = 1.5,
1
),
HECTOPASCAL(
"hpa",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) MeasureUnit.HECTOPASCAL else null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit },
chartStep = 15.0
),
ATMOSPHERE(
"atm",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) MeasureUnit.ATMOSPHERE else null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit.div(1013) },
chartStep = 0.015,
3
),
MILLIMETER_OF_MERCURY(
"mmhg",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) MeasureUnit.MILLIMETER_OF_MERCURY else null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit.div(1.333) },
chartStep = 10.0
),
INCH_OF_MERCURY(
"inhg",
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) MeasureUnit.INCH_HG else null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit.div(33.864) },
chartStep = 0.5,
2
),
KILOGRAM_FORCE_PER_SQUARE_CENTIMETER( // TODO: Consider deleting
"kgfpsqcm",
null,
null,
{ valueInDefaultUnit -> valueInDefaultUnit.div(980.7) },
chartStep = 0.015,
3
),
;
companion object {
const val NORMAL = 1013.25
/**
* Copyright © 1991-Present Unicode, Inc.
* License: Unicode License v3 https://www.unicode.org/license.txt
* Source (simplified): https://github.com/unicode-org/cldr/blob/3f3967f3cbadc56bbb44a9aed20784e82ac64c67/common/supplemental/units.xml#L546-L551
*/
fun getDefaultUnit(
context: Context,
) = when (context.currentLocale.country) {
"BR", "EG", "GB", "IL", "TH" -> MILLIBAR
"MX", "RU" -> MILLIMETER_OF_MERCURY
"US" -> INCH_OF_MERCURY
else -> HECTOPASCAL
}
fun validateValue(pressure: Double?): Double? {
return pressure?.let { if (it in 800.0..1200.0) it else null }
}
fun getUnit(id: String): PressureUnit? {
return PressureUnit.entries.firstOrNull { it.id == id }
}
}
override val valueArrayId = R.array.pressure_unit_values
override val nameArrayId = R.array.pressure_units
override val contentDescriptionArrayId = R.array.pressure_unit_voices
override fun getName(context: Context) = UnitUtils.getName(context, this)
override fun getMeasureContentDescription(context: Context) = UnitUtils.getMeasureContentDescription(context, this)
override fun getConvertedUnit(valueInDefaultUnit: Double) = convertUnit(valueInDefaultUnit)
override fun formatValue(
context: Context,
valueInDefaultUnit: Double,
) = UnitUtils.formatValue(
context = context,
enum = this,
value = valueInDefaultUnit,
precision = precision
)
override fun formatMeasure(
context: Context,
value: Double,
isValueInDefaultUnit: Boolean,
) = UnitUtils.formatMeasure(
context = context,
enum = this,
value = value,
precision = precision,
isValueInDefaultUnit = isValueInDefaultUnit
)
override fun formatContentDescription(
context: Context,
value: Double,
isValueInDefaultUnit: Boolean,
) = UnitUtils.formatMeasure(
context = context,
enum = this,
value = value,
precision = precision,
isValueInDefaultUnit = isValueInDefaultUnit,
unitWidth = UnitWidth.FULL
)
}

View file

@ -30,6 +30,7 @@ import breezyweather.data.Database
import breezyweather.data.DatabaseHandler
import breezyweather.data.Hourlys
import breezyweather.data.Locations
import breezyweather.data.PressureColumnAdapter
import breezyweather.data.TimeZoneColumnAdapter
import breezyweather.data.WeatherCodeColumnAdapter
import breezyweather.data.Weathers
@ -86,14 +87,19 @@ class DbModule {
timezoneAdapter = TimeZoneColumnAdapter
),
weathersAdapter = Weathers.Adapter(
weather_codeAdapter = WeatherCodeColumnAdapter
weather_codeAdapter = WeatherCodeColumnAdapter,
pressureAdapter = PressureColumnAdapter
),
dailysAdapter = Dailys.Adapter(
daytime_weather_codeAdapter = WeatherCodeColumnAdapter,
nighttime_weather_codeAdapter = WeatherCodeColumnAdapter
nighttime_weather_codeAdapter = WeatherCodeColumnAdapter,
pressure_averageAdapter = PressureColumnAdapter,
pressure_maxAdapter = PressureColumnAdapter,
pressure_minAdapter = PressureColumnAdapter
),
hourlysAdapter = Hourlys.Adapter(
weather_codeAdapter = WeatherCodeColumnAdapter
weather_codeAdapter = WeatherCodeColumnAdapter,
pressureAdapter = PressureColumnAdapter
),
alertsAdapter = Alerts.Adapter(
severityAdapter = AlertSeverityColumnAdapter

View file

@ -83,12 +83,7 @@ val Locale.isChinese: Boolean
// There is no way to access the script used, so assume Taiwan, Hong Kong and Macao
val Locale.isTraditionalChinese: Boolean
get() = isChinese &&
!country.isNullOrEmpty() &&
(
country.equals("TW", ignoreCase = true) ||
country.equals("HK", ignoreCase = true) ||
country.equals("MO", ignoreCase = true)
)
arrayOf("TW", "HK", "MO").any { country.equals(it, ignoreCase = true) }
val Locale.isIndian: Boolean
get() = language.equals("hi", ignoreCase = true) || language.equals("mr", ignoreCase = true)

View file

@ -16,12 +16,16 @@
package org.breezyweather.common.extensions
import android.content.Context
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.calculateEndPadding
import androidx.compose.foundation.layout.calculateStartPadding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.platform.LocalLayoutDirection
import org.breezyweather.domain.settings.SettingsManager
import org.breezyweather.unit.formatting.UnitWidth
import org.breezyweather.unit.pressure.Pressure
import java.math.BigDecimal
import java.math.RoundingMode
import kotlin.math.ceil
@ -76,6 +80,43 @@ val Array<Double>.median: Double?
}
}
/**
* Convenient format function with parameters filled for ou app
*/
fun Pressure.formatMeasure(
context: Context,
valueWidth: UnitWidth = UnitWidth.SHORT,
unitWidth: UnitWidth = UnitWidth.SHORT,
): String {
val settings = SettingsManager.getInstance(context)
return format(
context = context,
unit = settings.getPressureUnit(context),
valueWidth = valueWidth,
unitWidth = unitWidth,
locale = context.currentLocale,
useNumberFormatter = settings.useNumberFormatter,
useMeasureFormat = settings.useMeasureFormat
)
}
/**
* Convenient format function with parameters filled for ou app
*/
fun Pressure.formatValue(
context: Context,
width: UnitWidth = UnitWidth.SHORT,
): String {
val settings = SettingsManager.getInstance(context)
return formatValue(
unit = settings.getPressureUnit(context),
width = width,
locale = context.currentLocale,
useNumberFormatter = settings.useNumberFormatter,
useMeasureFormat = settings.useMeasureFormat
)
}
/**
* Taken from Mihon
* Apache License, Version 2.0

View file

@ -31,10 +31,11 @@ import org.breezyweather.common.basic.models.options.appearance.HourlyTrendDispl
import org.breezyweather.common.basic.models.options.unit.DistanceUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationIntensityUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationUnit
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.basic.models.options.unit.SpeedUnit
import org.breezyweather.common.basic.models.options.unit.TemperatureUnit
import org.breezyweather.common.bus.EventBus
import org.breezyweather.common.extensions.currentLocale
import org.breezyweather.unit.pressure.PressureUnit
class SettingsChangedMessage
@ -270,7 +271,7 @@ class SettingsManager private constructor(
.firstOrNull { it.id == (config.getString("pressure_unit", "auto") ?: "auto") }
fun getPressureUnit(context: Context): PressureUnit {
return pressureUnit ?: PressureUnit.getDefaultUnit(context)
return pressureUnit ?: PressureUnit.getDefaultUnit(context.currentLocale)
}
var speedUnit: SpeedUnit?

View file

@ -37,6 +37,7 @@ import org.breezyweather.common.basic.models.options.WidgetWeekIconMode
import org.breezyweather.common.basic.models.options.basic.UnitUtils
import org.breezyweather.common.basic.models.options.unit.SpeedUnit
import org.breezyweather.common.basic.models.options.unit.TemperatureUnit
import org.breezyweather.common.extensions.formatMeasure
import org.breezyweather.common.extensions.getFormattedDate
import org.breezyweather.common.extensions.getFormattedMediumDayAndMonth
import org.breezyweather.common.extensions.getFormattedMediumDayAndMonthInAdditionalCalendar
@ -272,7 +273,6 @@ abstract class AbstractRemoteViewsPresenter {
if (subtitleP.isNullOrEmpty()) return ""
val temperatureUnit = SettingsManager.getInstance(context).getTemperatureUnit(context)
// val precipitationUnit = getInstance(context).getPrecipitationUnit(context)
val pressureUnit = SettingsManager.getInstance(context).getPressureUnit(context)
val distanceUnit = SettingsManager.getInstance(context).getDistanceUnit(context)
val speedUnit = SettingsManager.getInstance(context).getSpeedUnit(context)
var subtitle = subtitleP
@ -326,9 +326,8 @@ abstract class AbstractRemoteViewsPresenter {
} ?: context.getString(R.string.null_data_text)
).replace(
"\$cps$",
weather.current?.pressure?.let {
pressureUnit.formatMeasure(context, it)
} ?: context.getString(R.string.null_data_text)
weather.current?.pressure?.formatMeasure(context)
?: context.getString(R.string.null_data_text)
).replace(
"\$cv$",
weather.current?.visibility?.let {

View file

@ -48,7 +48,6 @@ import org.breezyweather.common.basic.models.options.unit.DistanceUnit
import org.breezyweather.common.basic.models.options.unit.DurationUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationIntensityUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationUnit
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.basic.models.options.unit.SpeedUnit
import org.breezyweather.common.basic.models.options.unit.TemperatureUnit
import org.breezyweather.common.extensions.ensurePositive
@ -56,6 +55,8 @@ import org.breezyweather.common.extensions.getIsoFormattedDate
import org.breezyweather.common.extensions.toCalendarWithTimeZone
import org.breezyweather.domain.weather.index.PollutantIndex
import org.breezyweather.ui.theme.weatherView.WeatherViewController
import org.breezyweather.unit.pressure.Pressure
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import org.shredzone.commons.suncalc.MoonIllumination
import org.shredzone.commons.suncalc.MoonTimes
import org.shredzone.commons.suncalc.SunTimes
@ -68,6 +69,7 @@ import kotlin.math.ln
import kotlin.math.log10
import kotlin.math.pow
import kotlin.math.roundToInt
import kotlin.math.roundToLong
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.hours
@ -254,7 +256,7 @@ internal fun computeMissingHourlyData(
wind = wind,
relativeHumidity = relativeHumidity,
dewPoint = dewPoint,
pressure = PressureUnit.validateValue(hourly.pressure),
pressure = hourly.pressure?.toValidOrNull(),
cloudCover = cloudCover,
visibility = visibility
)
@ -1355,17 +1357,17 @@ fun getDailyDewPoint(
fun getDailyPressure(
initialDailyPressure: DailyPressure?,
values: List<Double>?,
values: List<Pressure>?,
): DailyPressure? {
if (values.isNullOrEmpty()) return initialDailyPressure
return DailyPressure(
average = PressureUnit.validateValue(initialDailyPressure?.average)
?: values.average(),
min = PressureUnit.validateValue(initialDailyPressure?.min)
?: values.min(),
max = PressureUnit.validateValue(initialDailyPressure?.max)
?: values.max()
average = initialDailyPressure?.average?.toValidOrNull()
?: values.map { it.value }.average().roundToLong().pascals,
min = initialDailyPressure?.min?.toValidOrNull()
?: values.minOfOrNull { it.value }?.pascals,
max = initialDailyPressure?.max?.toValidOrNull()
?: values.maxOfOrNull { it.value }?.pascals
)
}
@ -1605,7 +1607,7 @@ internal fun completeCurrentFromHourlyData(
airQuality = currentAirQuality ?: hourly.airQuality,
relativeHumidity = newRelativeHumidity,
dewPoint = newDewPoint,
pressure = PressureUnit.validateValue(newCurrent.pressure) ?: hourly.pressure,
pressure = newCurrent.pressure?.toValidOrNull() ?: hourly.pressure,
cloudCover = UnitUtils.validatePercent(newCurrent.cloudCover) ?: hourly.cloudCover,
visibility = DistanceUnit.validateValue(newCurrent.visibility) ?: hourly.visibility,
ceiling = newCurrent.ceiling?.ensurePositive()

View file

@ -58,6 +58,7 @@ import org.breezyweather.sources.brightsky.json.BrightSkyCurrentWeather
import org.breezyweather.sources.brightsky.json.BrightSkyCurrentWeatherResult
import org.breezyweather.sources.brightsky.json.BrightSkyWeather
import org.breezyweather.sources.brightsky.json.BrightSkyWeatherResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Calendar
import java.util.Date
@ -211,7 +212,7 @@ class BrightSkyService @Inject constructor(
),
relativeHumidity = result.relativeHumidity?.toDouble(),
dewPoint = result.dewPoint,
pressure = result.pressure,
pressure = result.pressure?.hectopascals,
cloudCover = result.cloudCover,
visibility = result.visibility?.toDouble()
)
@ -271,7 +272,7 @@ class BrightSkyService @Inject constructor(
),
relativeHumidity = result.relativeHumidity?.toDouble(),
dewPoint = result.dewPoint,
pressure = result.pressure,
pressure = result.pressure?.hectopascals,
cloudCover = result.cloudCover,
visibility = result.visibility?.toDouble(),
sunshineDuration = result.sunshine?.div(60)

View file

@ -32,7 +32,7 @@ import io.reactivex.rxjava3.core.Observable
import kotlinx.coroutines.rx3.rxObservable
import org.breezyweather.common.extensions.toCalendarWithTimeZone
import org.breezyweather.common.source.WeatherSource
import org.breezyweather.common.utils.helpers.LogHelper
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import java.util.Calendar
import java.util.Date
import java.util.TimeZone
@ -138,7 +138,7 @@ class DebugService @Inject constructor() : WeatherSource {
),
uV = UV(index = Math.random().times(12)),
dewPoint = Math.random().times(10).plus(5),
pressure = Math.random().times(100).plus(963),
pressure = Math.random().times(100).plus(963).hectopascals,
visibility = Math.random().times(50000).roundToInt().toDouble(),
cloudCover = Math.random().times(100).roundToInt()
)

View file

@ -100,7 +100,7 @@ class GadgetbridgeService @Inject constructor() : BroadcastSource {
)?.roundToInt(),
dewPoint = current?.dewPoint?.roundCelsiusToKelvin(),
pressure = current?.pressure?.toFloat(),
pressure = current?.pressure?.inHectopascals?.toFloat(),
cloudCover = current?.cloudCover,
visibility = current?.visibility?.toFloat(),

View file

@ -90,6 +90,7 @@ import org.breezyweather.sources.openmeteo.json.OpenMeteoWeatherResult
import org.breezyweather.ui.common.composables.AlertDialogNoPadding
import org.breezyweather.ui.settings.preference.composables.PreferenceView
import org.breezyweather.ui.settings.preference.composables.SwitchPreferenceView
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.HttpException
import retrofit2.Retrofit
import java.text.Collator
@ -390,7 +391,7 @@ class OpenMeteoService @Inject constructor(
uV = UV(index = current.uvIndex),
relativeHumidity = current.relativeHumidity?.toDouble(),
dewPoint = current.dewPoint,
pressure = current.pressureMsl,
pressure = current.pressureMsl?.hectopascals,
cloudCover = current.cloudCover,
visibility = current.visibility
)
@ -438,9 +439,9 @@ class OpenMeteoService @Inject constructor(
min = dailyResult.dewPointMin?.getOrNull(i)
),
pressure = DailyPressure(
average = dailyResult.pressureMslMean?.getOrNull(i),
max = dailyResult.pressureMslMax?.getOrNull(i),
min = dailyResult.pressureMslMin?.getOrNull(i)
average = dailyResult.pressureMslMean?.getOrNull(i)?.hectopascals,
max = dailyResult.pressureMslMax?.getOrNull(i)?.hectopascals,
min = dailyResult.pressureMslMin?.getOrNull(i)?.hectopascals
),
cloudCover = DailyCloudCover(
average = dailyResult.cloudCoverMean?.getOrNull(i),
@ -492,7 +493,7 @@ class OpenMeteoService @Inject constructor(
uV = UV(index = hourlyResult.uvIndex?.getOrNull(i)),
relativeHumidity = hourlyResult.relativeHumidity?.getOrNull(i)?.toDouble(),
dewPoint = hourlyResult.dewPoint?.getOrNull(i),
pressure = hourlyResult.pressureMsl?.getOrNull(i),
pressure = hourlyResult.pressureMsl?.getOrNull(i)?.hectopascals,
cloudCover = hourlyResult.cloudCover?.getOrNull(i),
visibility = hourlyResult.visibility?.getOrNull(i)?.toDouble()
)

View file

@ -59,6 +59,7 @@ import org.breezyweather.sources.pirateweather.json.PirateWeatherCurrently
import org.breezyweather.sources.pirateweather.json.PirateWeatherDaily
import org.breezyweather.sources.pirateweather.json.PirateWeatherHourly
import org.breezyweather.sources.pirateweather.json.PirateWeatherMinutely
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Objects
import javax.inject.Inject
@ -166,7 +167,7 @@ class PirateWeatherService @Inject constructor(
uV = UV(index = result.uvIndex),
relativeHumidity = result.humidity?.times(100),
dewPoint = result.dewPoint,
pressure = result.pressure,
pressure = result.pressure?.hectopascals,
cloudCover = result.cloudCover?.times(100)?.roundToInt(),
visibility = result.visibility?.times(1000),
dailyForecast = dailySummary,
@ -201,7 +202,7 @@ class PirateWeatherService @Inject constructor(
uV = UV(index = result.uvIndex),
relativeHumidity = DailyRelativeHumidity(average = result.humidity?.times(100)),
dewPoint = DailyDewPoint(average = result.dewPoint),
pressure = DailyPressure(average = result.pressure),
pressure = DailyPressure(average = result.pressure?.hectopascals),
cloudCover = DailyCloudCover(average = result.cloudCover?.times(100)?.roundToInt()),
visibility = DailyVisibility(average = result.visibility?.times(1000))
)
@ -243,7 +244,7 @@ class PirateWeatherService @Inject constructor(
),
relativeHumidity = result.humidity?.times(100),
dewPoint = result.dewPoint,
pressure = result.pressure,
pressure = result.pressure?.hectopascals,
cloudCover = result.cloudCover?.times(100)?.roundToInt(),
visibility = result.visibility?.times(1000)
)

View file

@ -56,7 +56,7 @@ import kotlinx.collections.immutable.toImmutableMap
import org.breezyweather.R
import org.breezyweather.common.basic.models.options.appearance.DetailScreen
import org.breezyweather.common.basic.models.options.basic.UnitUtils
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.extensions.formatMeasure
import org.breezyweather.common.extensions.getFormattedTime
import org.breezyweather.common.extensions.is12Hour
import org.breezyweather.common.extensions.roundDownToNearestMultiplier
@ -65,6 +65,12 @@ import org.breezyweather.common.extensions.toDate
import org.breezyweather.domain.settings.SettingsManager
import org.breezyweather.ui.common.charts.BreezyLineChart
import org.breezyweather.ui.settings.preference.bottomInsetItem
import org.breezyweather.unit.formatting.UnitWidth
import org.breezyweather.unit.pressure.Pressure
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import org.breezyweather.unit.pressure.PressureUnit
import org.breezyweather.unit.pressure.toPressure
import java.util.Date
import kotlin.math.max
import kotlin.math.min
@ -74,7 +80,7 @@ fun DetailsPressure(
location: Location,
hourlyList: ImmutableList<Hourly>,
daily: Daily,
defaultValue: Pair<Date, Double>?,
defaultValue: Pair<Date, Pressure>?,
modifier: Modifier = Modifier,
) {
val mappedValues = remember(hourlyList) {
@ -83,7 +89,7 @@ fun DetailsPressure(
.associate { it.date.time to it.pressure!! }
.toImmutableMap()
}
var activeItem: Pair<Date, Double>? by remember { mutableStateOf(null) }
var activeItem: Pair<Date, Pressure>? by remember { mutableStateOf(null) }
val markerVisibilityListener = remember {
object : CartesianMarkerVisibilityListener {
override fun onShown(marker: CartesianMarker, targets: List<CartesianMarker.Target>) {
@ -147,8 +153,8 @@ fun DetailsPressure(
fun PressureHeader(
location: Location,
daily: Daily,
activeItem: Pair<Date, Double>?,
defaultValue: Pair<Date, Double>?,
activeItem: Pair<Date, Pressure>?,
defaultValue: Pair<Date, Pressure>?,
) {
val context = LocalContext.current
@ -173,11 +179,10 @@ fun PressureHeader(
@Composable
private fun PressureItem(
header: String?,
pressure: Double?,
pressure: Pressure?,
modifier: Modifier = Modifier,
) {
val context = LocalContext.current
val pressureUnit = SettingsManager.getInstance(context).getPressureUnit(context)
Column(
modifier = modifier.fillMaxWidth()
@ -189,7 +194,7 @@ private fun PressureItem(
TextFixedHeight(
text = pressure?.let {
UnitUtils.formatUnitsDifferentFontSize(
formattedMeasure = pressureUnit.formatMeasure(context, it),
formattedMeasure = it.formatMeasure(context),
fontSize = MaterialTheme.typography.headlineSmall.fontSize
)
} ?: AnnotatedString(""),
@ -197,7 +202,7 @@ private fun PressureItem(
modifier = Modifier
.clearAndSetSemantics {
pressure?.let {
contentDescription = pressureUnit.formatContentDescription(context, it)
contentDescription = it.formatMeasure(context, unitWidth = UnitWidth.LONG)
}
}
)
@ -207,7 +212,7 @@ private fun PressureItem(
@Composable
private fun PressureChart(
location: Location,
mappedValues: ImmutableMap<Long, Double>,
mappedValues: ImmutableMap<Long, Pressure>,
daily: Daily,
markerVisibilityListener: CartesianMarkerVisibilityListener,
) {
@ -217,14 +222,14 @@ private fun PressureChart(
val chartStep = pressureUnit.chartStep
val maxY = remember(mappedValues) {
max(
pressureUnit.getConvertedUnit(PressureUnit.NORMAL) + chartStep.times(1.6),
pressureUnit.getConvertedUnit(mappedValues.values.max())
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) + chartStep.times(1.6),
mappedValues.values.maxOf { it.toDouble(pressureUnit) }
).roundUpToNearestMultiplier(chartStep)
}
val minY = remember(mappedValues) {
min(
pressureUnit.getConvertedUnit(PressureUnit.NORMAL) - chartStep.times(1.6),
pressureUnit.getConvertedUnit(mappedValues.values.min())
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) - chartStep.times(1.6),
mappedValues.values.minOf { it.toDouble(pressureUnit) }
).roundDownToNearestMultiplier(chartStep)
}
@ -235,7 +240,7 @@ private fun PressureChart(
lineSeries {
series(
x = mappedValues.keys,
y = mappedValues.values.map { pressureUnit.getConvertedUnit(it) }
y = mappedValues.values.map { it.toDouble(pressureUnit) }
)
}
}
@ -246,29 +251,29 @@ private fun PressureChart(
modelProducer,
daily.date,
maxY,
{ _, value, _ -> pressureUnit.formatMeasure(context, value, isValueInDefaultUnit = false) },
{ _, value, _ -> value.toPressure(pressureUnit).formatMeasure(context) },
persistentListOf(
persistentMapOf(
pressureUnit.getConvertedUnit(1080.0).toFloat() to Color(48, 8, 24),
pressureUnit.getConvertedUnit(1046.0).toFloat() to Color(111, 24, 64),
pressureUnit.getConvertedUnit(1038.0).toFloat() to Color(142, 47, 57),
pressureUnit.getConvertedUnit(1030.0).toFloat() to Color(159, 81, 44),
pressureUnit.getConvertedUnit(1024.0).toFloat() to Color(163, 116, 67),
pressureUnit.getConvertedUnit(1019.0).toFloat() to Color(167, 147, 107),
pressureUnit.getConvertedUnit(1015.25).toFloat() to Color(176, 174, 152),
pressureUnit.getConvertedUnit(1013.25).toFloat() to Color(182, 182, 182),
pressureUnit.getConvertedUnit(1011.25).toFloat() to Color(155, 183, 172),
pressureUnit.getConvertedUnit(1007.0).toFloat() to Color(103, 162, 155),
pressureUnit.getConvertedUnit(1002.0).toFloat() to Color(26, 140, 147),
pressureUnit.getConvertedUnit(995.0).toFloat() to Color(0, 117, 146),
pressureUnit.getConvertedUnit(986.0).toFloat() to Color(0, 90, 148),
pressureUnit.getConvertedUnit(976.0).toFloat() to Color(0, 52, 146),
pressureUnit.getConvertedUnit(950.0).toFloat() to Color(0, 32, 96),
pressureUnit.getConvertedUnit(900.0).toFloat() to Color(8, 16, 48)
1080.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(48, 8, 24),
1046.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(111, 24, 64),
1038.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(142, 47, 57),
1030.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(159, 81, 44),
1024.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(163, 116, 67),
1019.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(167, 147, 107),
1015.25.hectopascals.toDouble(pressureUnit).toFloat() to Color(176, 174, 152),
1013.25.hectopascals.toDouble(pressureUnit).toFloat() to Color(182, 182, 182),
1011.25.hectopascals.toDouble(pressureUnit).toFloat() to Color(155, 183, 172),
1007.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(103, 162, 155),
1002.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(26, 140, 147),
995.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(0, 117, 146),
986.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(0, 90, 148),
976.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(0, 52, 146),
950.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(0, 32, 96),
900.0.hectopascals.toDouble(pressureUnit).toFloat() to Color(8, 16, 48)
)
),
trendHorizontalLines = persistentMapOf(
pressureUnit.getConvertedUnit(PressureUnit.NORMAL) to stringResource(R.string.temperature_normal_short)
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) to stringResource(R.string.temperature_normal_short)
),
minY = minY,
topAxisValueFormatter = { _, value, _ ->
@ -281,7 +286,7 @@ private fun PressureChart(
return@BreezyLineChart "-"
}
val currentValue = mappedValues.values.elementAt(currentIndex)
val trend = with(currentValue - previousValue) {
val trend = with(currentValue.value - previousValue.value) {
when {
// Take into account the trend if the difference is of at least 0.5
this >= 0.5 -> ""

View file

@ -28,12 +28,15 @@ import breezyweather.domain.location.model.Location
import org.breezyweather.R
import org.breezyweather.common.basic.BreezyActivity
import org.breezyweather.common.basic.models.options.appearance.DetailScreen
import org.breezyweather.common.basic.models.options.basic.UnitUtils
import org.breezyweather.common.extensions.formatMeasure
import org.breezyweather.common.extensions.formatValue
import org.breezyweather.common.extensions.getThemeColor
import org.breezyweather.common.utils.helpers.IntentHelper
import org.breezyweather.domain.settings.SettingsManager
import org.breezyweather.ui.common.widgets.ArcProgress
import org.breezyweather.ui.theme.resource.providers.ResourceProvider
import org.breezyweather.unit.formatting.UnitWidth
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
class PressureViewHolder(parent: ViewGroup) : AbstractMainCardViewHolder(
LayoutInflater.from(parent.context).inflate(R.layout.container_main_pressure, parent, false)
@ -57,17 +60,17 @@ class PressureViewHolder(parent: ViewGroup) : AbstractMainCardViewHolder(
val talkBackBuilder = StringBuilder(context.getString(R.string.pressure))
location.weather!!.current?.pressure?.let {
val pressureUnit = SettingsManager.getInstance(context).getPressureUnit(context)
mPressure = it.toFloat()
mPressure = it.inHectopascals.toFloat()
mEnable = true
if (itemAnimationEnabled) {
pressureProgress.apply {
progress = 0f
pressureValueView.text = pressureUnit.formatValue(context, 0.0)
pressureValueView.text = 0.0.hectopascals.formatValue(context)
}
} else {
pressureProgress.apply {
progress = mPressure.minus(963f)
pressureValueView.text = pressureUnit.formatValue(context, it)
pressureValueView.text = it.formatValue(context)
}
}
val pressureColor = context.getThemeColor(androidx.appcompat.R.attr.colorPrimary)
@ -77,9 +80,9 @@ class PressureViewHolder(parent: ViewGroup) : AbstractMainCardViewHolder(
max = 100f
}
pressureUnitView.text = UnitUtils.getName(context, pressureUnit)
pressureUnitView.text = pressureUnit.getNominativeUnit(context)
talkBackBuilder.append(context.getString(R.string.colon_separator))
talkBackBuilder.append(pressureUnit.formatContentDescription(context, it))
talkBackBuilder.append(it.formatMeasure(context, unitWidth = UnitWidth.LONG))
}
itemView.contentDescription = talkBackBuilder.toString()
@ -101,8 +104,8 @@ class PressureViewHolder(parent: ViewGroup) : AbstractMainCardViewHolder(
pressureProgress.apply {
progress = (animation.animatedValue as Float)
}
pressureValueView.text = SettingsManager.getInstance(context).getPressureUnit(context)
.formatValue(context, pressureProgress.progress.plus(963.0))
pressureValueView.text = pressureProgress.progress.plus(963.0).hectopascals
.formatValue(context)
}
mAttachAnimatorSet = AnimatorSet().apply {
playTogether(pressureNumber)

View file

@ -25,7 +25,8 @@ import breezyweather.domain.location.model.Location
import org.breezyweather.R
import org.breezyweather.common.basic.BreezyActivity
import org.breezyweather.common.basic.models.options.appearance.DetailScreen
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.extensions.currentLocale
import org.breezyweather.common.extensions.formatMeasure
import org.breezyweather.common.extensions.getThemeColor
import org.breezyweather.ui.common.widgets.trend.TrendRecyclerView
import org.breezyweather.ui.common.widgets.trend.chart.PolylineAndHistogramView
@ -33,6 +34,9 @@ import org.breezyweather.ui.theme.ThemeManager
import org.breezyweather.ui.theme.resource.ResourceHelper
import org.breezyweather.ui.theme.resource.providers.ResourceProvider
import org.breezyweather.ui.theme.weatherView.WeatherViewController
import org.breezyweather.unit.formatting.UnitWidth
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import org.breezyweather.unit.pressure.PressureUnit
import kotlin.math.max
/**
@ -64,7 +68,7 @@ class HourlyPressureAdapter(
val hourly = weather.nextHourlyForecast[position]
hourly.pressure?.let { pressure ->
talkBackBuilder.append(activity.getString(R.string.comma_separator))
.append(mPressureUnit.formatContentDescription(activity, pressure))
.append(pressure.formatMeasure(activity, unitWidth = UnitWidth.LONG))
}
hourlyItem.setIconDrawable(
hourly.weatherCode?.let {
@ -75,7 +79,7 @@ class HourlyPressureAdapter(
mPolylineAndHistogramView.setData(
buildPressureArrayForItem(mPressures, position),
null,
hourly.pressure?.let { mPressureUnit.formatValue(activity, it) },
hourly.pressure?.formatValue(mPressureUnit, UnitWidth.NARROW, activity.currentLocale),
null,
mHighestPressure,
mLowestPressure,
@ -139,7 +143,7 @@ class HourlyPressureAdapter(
run {
var i = 0
while (i < mPressures.size) {
mPressures[i] = weather.nextHourlyForecast.getOrNull(i / 2)?.pressure?.toFloat()
mPressures[i] = weather.nextHourlyForecast.getOrNull(i / 2)?.pressure?.value?.toFloat()
i += 2
}
}
@ -159,11 +163,11 @@ class HourlyPressureAdapter(
weather.nextHourlyForecast
.forEach { hourly ->
hourly.pressure?.let {
if (mHighestPressure == null || it > mHighestPressure!!) {
mHighestPressure = it.toFloat()
if (mHighestPressure == null || it.value > mHighestPressure!!) {
mHighestPressure = it.value.toFloat()
}
if (mLowestPressure == null || it < mLowestPressure!!) {
mLowestPressure = it.toFloat()
if (mLowestPressure == null || it.value < mLowestPressure!!) {
mLowestPressure = it.value.toFloat()
}
}
}
@ -193,7 +197,7 @@ class HourlyPressureAdapter(
keyLineList.add(
TrendRecyclerView.KeyLine(
PressureUnit.NORMAL.toFloat(),
mPressureUnit.formatValue(activity, PressureUnit.NORMAL),
PressureUnit.NORMAL.pascals.formatValue(mPressureUnit, UnitWidth.NARROW, activity.currentLocale),
activity.getString(R.string.temperature_normal_short),
TrendRecyclerView.KeyLine.ContentPosition.ABOVE_LINE
)

View file

@ -27,9 +27,9 @@ import androidx.compose.ui.res.stringResource
import org.breezyweather.R
import org.breezyweather.common.basic.models.options.unit.DistanceUnit
import org.breezyweather.common.basic.models.options.unit.PrecipitationUnit
import org.breezyweather.common.basic.models.options.unit.PressureUnit
import org.breezyweather.common.basic.models.options.unit.SpeedUnit
import org.breezyweather.common.basic.models.options.unit.TemperatureUnit
import org.breezyweather.common.extensions.currentLocale
import org.breezyweather.common.extensions.plus
import org.breezyweather.domain.settings.SettingsManager
import org.breezyweather.ui.common.widgets.Material3Scaffold
@ -39,6 +39,8 @@ import org.breezyweather.ui.settings.preference.composables.ListPreferenceViewWi
import org.breezyweather.ui.settings.preference.composables.PreferenceScreen
import org.breezyweather.ui.settings.preference.listPreferenceItem
import org.breezyweather.ui.settings.preference.smallSeparatorItem
import org.breezyweather.unit.formatting.UnitWidth
import org.breezyweather.unit.pressure.PressureUnit
@Composable
fun UnitSettingsScreen(
@ -204,18 +206,19 @@ fun UnitSettingsScreen(
}
smallSeparatorItem()
listPreferenceItem(R.string.settings_units_pressure) { id ->
val valueArray = stringArrayResource(R.array.pressure_unit_values)
val nameArray = stringArrayResource(R.array.pressure_units).mapIndexed { index, value ->
if (index == 0) {
stringResource(
R.string.parenthesis,
stringResource(R.string.settings_follow_system),
PressureUnit.getDefaultUnit(context).getName(context)
)
} else {
value
}
}.toTypedArray()
val allowedPressureUnits = PressureUnit.entries.filter { it != PressureUnit.PASCAL }
val valueArray = arrayOf("auto") +
allowedPressureUnits.map { it.id }
val nameArray = arrayOf(
stringResource(
R.string.parenthesis,
stringResource(R.string.settings_follow_system),
PressureUnit.getDefaultUnit(context.currentLocale)
.getDisplayName(context, context.currentLocale, UnitWidth.LONG)
)
) + allowedPressureUnits.map {
it.getDisplayName(context, context.currentLocale, UnitWidth.LONG)
}
ListPreferenceViewWithCard(
title = stringResource(id),
summary = { _, value -> nameArray[valueArray.indexOfFirst { it == value }] },
@ -225,7 +228,7 @@ fun UnitSettingsScreen(
isLast = true,
onValueChanged = { pressureUnitId ->
SettingsManager.getInstance(context).pressureUnit = if (pressureUnitId != "auto") {
PressureUnit.entries.firstOrNull { it.id == pressureUnitId }
PressureUnit.getUnit(pressureUnitId)
} else {
null
}

View file

@ -186,7 +186,6 @@
<string name="unit_atm">ضغط جوي</string>
<string name="unit_mmhg">ملي متر زئبق</string>
<string name="unit_inhg">بوصة من الزئبق</string>
<string name="unit_kgfpsqcm">كغم\\سم²</string>
<string name="settings_main_cards_title">البطاقات</string>
<string name="widget_custom_subtitle_keyword_d_description">التاريخ</string>
<string name="widget_custom_subtitle_keyword_ct_description">درجة الحرارة الحالية (°C°/F)</string>
@ -433,7 +432,6 @@
<string name="unit_mb_voice">ملي بار</string>
<string name="unit_hpa_voice">هيكتوباسكال</string>
<string name="unit_inhg_voice">بوصة من الزئبق</string>
<string name="unit_kgfpsqcm_voice">قوة الكيلوغرام لكل سنتيمتر مربع</string>
<string name="unit_mugpcum_voice">ميكروغرام لكل متر مكعب</string>
<string name="unit_h_voice">ساعات</string>
<string name="unit_ppcm">\\م³</string>

View file

@ -455,8 +455,6 @@
<string name="unit_mmhg">мм рт. сл.</string>
<string name="unit_mmhg_voice">Міліметраў ртутнага слупа</string>
<string name="unit_inhg_voice">Цаляў ртутнага слупа</string>
<string name="unit_kgfpsqcm">кгс/cм²</string>
<string name="unit_kgfpsqcm_voice">Кілаграм-сіла на квадратны сантыметр</string>
<string name="unit_mugpcum">мкг/м³</string>
<string name="unit_h">гадз</string>
<string name="unit_h_voice">гадзіны</string>

View file

@ -449,10 +449,8 @@
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Инчове живак</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_ppcm">/m³</string>
<string name="unit_ppcm_voice">На кубичен метър</string>
<string name="unit_kgfpsqcm_voice">Килограм сила на квадратен сантиметър</string>
<string name="unit_h">h</string>
<string name="about_source_code">Програмен код</string>
<string name="notification_style_cities">Градове</string>

View file

@ -264,7 +264,6 @@
<string name="unit_hpa_voice">Hektopaskala</string>
<string name="unit_atm">atm</string>
<string name="unit_atm_voice">Atmosfera</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_h">h</string>
<string name="unit_h_voice">sati</string>
<string name="notification_channel_crash_logs">Zapisnici o padu</string>
@ -512,7 +511,6 @@
<string name="unit_in">inč</string>
<string name="unit_in_voice">Inča</string>
<string name="unit_nmi_voice">Nautičke milje</string>
<string name="unit_kgfpsqcm_voice">Kilograma sile po centimetru kvadratnom</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Mikrograma po kubnom metru</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -239,7 +239,6 @@
<string name="unit_atm_voice">Atmosferes</string>
<string name="unit_mmhg_voice">Mil·límetres de mercuri</string>
<string name="unit_inhg_voice">Polzades de mercuri</string>
<string name="unit_kgfpsqcm_voice">Kilogram de força per centímetre quadrat</string>
<string name="unit_mugpcum_voice">Micrograms per metre cúbic</string>
<string name="unit_mgpcum_voice">Mil·ligrams per metre cúbic</string>
<string name="unit_h_voice">hores</string>
@ -473,7 +472,6 @@
<string name="about_privacy_policy">Política de privacitat</string>
<string name="settings_debug_dump_crash_logs_title">Compartir registres derrors</string>
<string name="unit_cmph_voice">Centímetres per hora</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="settings_modules_live_wallpaper_error">No sha pogut llançar el selector de fons de pantalla. Encara pots habilitar el fons de pantalla %s triant «Fons de pantalla animat» al teu selector de fons de pantalla dinici.</string>
<string name="unit_bft_voice">a lescala Beaufort</string>
<string name="message_server_timeout">Sha excedit el temps despera de la sol·licitud</string>

View file

@ -274,7 +274,6 @@
<string name="unit_atm_voice">Atmosféry</string>
<string name="unit_mmhg_voice">Milimetry rtuti</string>
<string name="unit_inhg_voice">Palce rtuti</string>
<string name="unit_kgfpsqcm_voice">Kilogram síly na centimetr čtvereční</string>
<string name="unit_mugpcum_voice">Mikrogramy na metr krychlový</string>
<string name="unit_mgpcum_voice">Milligramy na metr krychlový</string>
<string name="unit_h_voice">hodin</string>
@ -302,7 +301,6 @@
<string name="unit_nmi">nmi</string>
<string name="openmeteo_weather_text_thunderstorm_with_slight_hail">Bouřka s drobným krupobitím</string>
<string name="openmeteo_weather_text_thunderstorm_with_heavy_hail">Bouřka se silným krupobitím</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="settings_units_summary">Teplota, srážky, vzdálenost, rychlost, tlak</string>
<string name="location_message_search_failed">Vyhledávání polohy se nezdařilo</string>
<string name="location_message_permission_background_missing">Chybějící oprávnění k přístupu k poloze na pozadí</string>

View file

@ -172,7 +172,6 @@
<string name="weather_api_unauthorized_content">Hos nogle vejrdatakilder, er du nødt til at angiver din egen API-nøgle. Hvis du allerede har angivet en, så dobbelttjek venligst den API-nøgle, du har angivet.</string>
<string name="widget_label_text_size">Tekststørrelse</string>
<string name="unit_lpsqm_voice">Liter per kvadratmeter</string>
<string name="unit_kgfpsqcm_voice">Kilogram kraft per kvadratmeter</string>
<string name="settings_debug_summary">Nedbrudslogge</string>
<string name="common_weather_text_snow">Nogen sne</string>
<string name="unit_mmph">mm/t</string>
@ -251,7 +250,6 @@
<string name="common_weather_text_rain_snow_mixed_showers_heavy">Kraftig byge med slud</string>
<string name="common_weather_text_drizzle">Støvregn</string>
<string name="common_weather_text_drizzle_freezing_light">Let isglat</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="common_weather_text_drizzle_freezing_heavy">Kraftigt isglat</string>
<string name="settings_background_updates_refresh_skip_when_battery_low">Ignorér når batteriet er lavt</string>

View file

@ -244,7 +244,6 @@
<string name="openmeteo_weather_text_thunderstorm_with_heavy_hail">Gewitter mit starkem Hagel</string>
<string name="widget_custom_subtitle_keyword_cps_description">Aktueller Luftdruck</string>
<string name="widget_custom_subtitle_keyword_d_description">Datum</string>
<string name="unit_kgfpsqcm_voice">Kilogramm Kraft pro Quadratzentimeter</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="common_weather_text_overcast">Bedeckt</string>
<string name="unit_mph">mph</string>
@ -334,7 +333,6 @@
<string name="unit_km">km</string>
<string name="unit_km_voice">Kilometer</string>
<string name="unit_mi">mi</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mgpcum_voice">Milligramm pro Kubikmeter</string>
<string name="air_quality_level_5_description">Empfindliche Personengruppen werden unmittelbare gesundheitliche Auswirkungen spüren und sollten Aktivitäten im Freien vermeiden. Bei gesunden Menschen kommt es bei längerer Exposition wahrscheinlich zu Atembeschwerden und Hustenreiz. Wir empfehlen, nicht nach draußen zu gehen und Aktivitäten im Freien zu verschieben.</string>
<string name="settings_source_default_value">Standard (unverändert)</string>

View file

@ -406,8 +406,6 @@
<string name="unit_atm_voice">Ατμόσφαιρες</string>
<string name="unit_mmhg_voice">Χιλιοστά υδραργύρου</string>
<string name="unit_inhg_voice">ίντσες υδραργύρου</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Χιλιόγραμμα δύναμης ανά τετραγωνικό εκατοστό</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_mgpcum_voice">χιλιοστόγραμμα ανά κυβικό μέτρο</string>

View file

@ -19,7 +19,6 @@
<string name="unit_km_voice">Kilometres</string>
<string name="unit_m_voice">Metres</string>
<string name="unit_mmhg_voice">Millimetres of mercury</string>
<string name="unit_kgfpsqcm_voice">Kilogram force per square centimetre</string>
<string name="unit_mugpcum_voice">Micrograms per cubic metre</string>
<string name="unit_mgpcum_voice">Milligrams per cubic metre</string>
<string name="unit_ppcm_voice">Per cubic metre</string>

View file

@ -19,7 +19,6 @@
<string name="unit_km_voice">Kilometres</string>
<string name="unit_m_voice">Metres</string>
<string name="unit_mmhg_voice">Millimetres of mercury</string>
<string name="unit_kgfpsqcm_voice">Kilogram force per square centimetre</string>
<string name="unit_mugpcum_voice">Micrograms per cubic metre</string>
<string name="unit_mgpcum_voice">Milligrams per cubic metre</string>
<string name="unit_ppcm_voice">Per cubic metre</string>

View file

@ -19,7 +19,6 @@
<string name="unit_km_voice">Kilometres</string>
<string name="unit_m_voice">Metres</string>
<string name="unit_mmhg_voice">Millimetres of mercury</string>
<string name="unit_kgfpsqcm_voice">Kilogram force per square centimetre</string>
<string name="unit_mugpcum_voice">Micrograms per cubic metre</string>
<string name="unit_mgpcum_voice">Milligrams per cubic metre</string>
<string name="unit_ppcm_voice">Per cubic metre</string>

View file

@ -19,7 +19,6 @@
<string name="unit_km_voice">Kilometers</string>
<string name="unit_m_voice">Meters</string>
<string name="unit_mmhg_voice">Millimeters of mercury</string>
<string name="unit_kgfpsqcm_voice">Kilogram force per square centimeter</string>
<string name="unit_mugpcum_voice">Micrograms per cubic meter</string>
<string name="unit_mgpcum_voice">Milligrams per cubic meter</string>
<string name="unit_ppcm_voice">Per cubic meter</string>

View file

@ -442,8 +442,6 @@
<string name="unit_mmhg_voice">Milimetroj da hidrargo</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Coloj da hidrargo</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Kilograma forto por kvadrata centimetro</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Mikrogramoj por kuba metro</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -239,7 +239,6 @@
<string name="unit_atm_voice">Atmósferas</string>
<string name="unit_mmhg_voice">Milímetros de mercurio</string>
<string name="unit_inhg_voice">Pulgadas de mercurio</string>
<string name="unit_kgfpsqcm_voice">Kilogramo de fuerza por centímetro cuadrado</string>
<string name="unit_mugpcum_voice">Microgramos por metro cúbico</string>
<string name="unit_mgpcum_voice">Miligramos por metro cúbico</string>
<string name="unit_h_voice">horas</string>
@ -509,7 +508,6 @@
<string name="unit_kpa">kPa</string>
<string name="unit_km">km</string>
<string name="notification_channel_background_services">Servicios en segundo plano</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_bft_voice">en la escala de Beaufort</string>
<string name="unit_mps">m/s</string>
<string name="common_weather_text_snow_showers">Nevadas</string>

View file

@ -385,8 +385,6 @@
<string name="unit_mb_voice">Millibaarid</string>
<string name="unit_kpa">kPa</string>
<string name="unit_atm">atm</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Jõukilogramm ruutsentimeetri kohta</string>
<string name="unit_inhg_voice">Tolli elavhõbedat</string>
<string name="notification_channel_widget">Vidin</string>
<string name="notification_channel_background_services">Tagatausta teenused</string>

View file

@ -409,7 +409,6 @@
<string name="settings_source_default_value">Lehenetsia (aldatu gabe)</string>
<string name="unit_mmhg">mmHg</string>
<string name="unit_inhg">imHg</string>
<string name="unit_kgfpsqcm_voice">Indar kilogramoa zentimetro karratuko</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_mgpcum_voice">Miligramoak metro kubikoko</string>
<string name="notification_channel_forecast">Iragarpena</string>
@ -419,7 +418,6 @@
<string name="common_weather_text_fog">Lainoa</string>
<string name="unit_mmhg_voice">Merkurio milimetroak</string>
<string name="unit_inhg_voice">Merkurio-hazbeteak</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="notification_channel_widget">Trepeta</string>
<string name="about_translators">Itzultzaileak</string>

View file

@ -518,7 +518,6 @@
<string name="unit_mb">mb</string>
<string name="unit_mb_voice">میلی بار</string>
<string name="unit_atm">اتمسفر استاندارد</string>
<string name="unit_kgfpsqcm">کیلوگرم/ سانتیمتر مربع</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">میکرو گرم بر متر‌مکعب</string>
<string name="unit_h_voice">ساعت</string>
@ -547,7 +546,6 @@
<string name="unit_mmhg_voice">میلی متر جیوه</string>
<string name="unit_inhg">اینچ جیوه</string>
<string name="unit_inhg_voice">اینچ جیوه</string>
<string name="unit_kgfpsqcm_voice">نیروی کیلوگرم بر سانتی متر مکعب</string>
<string name="notification_update_error">%d به‌روزرسانی ناموفق</string>
<string name="unit_ppcm">/m³</string>
<string name="unit_ppcm_voice">بر متر مکعب</string>

View file

@ -361,7 +361,6 @@
<string name="weather_message_unsupported_feature">Lähde ei tue jotakin vaadittua ominaisuutta</string>
<string name="about_privacy_policy">Tietosuojaseloste</string>
<string name="settings_debug_dump_crash_logs_title">Jaa kaatumislokit</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_bft_voice">Boforiasteikolla</string>
<string name="unit_mb_voice">Millibaaria</string>
<string name="unit_mps">m/s</string>
@ -387,7 +386,6 @@
<string name="air_quality_pm10">PM10</string>
<string name="common_weather_text_rain_showers">Sadekuuroja</string>
<string name="weather_api_key_required_missing_content">Käyttääksesi tätä lähdettä, sinun on annettava API-avain.</string>
<string name="unit_kgfpsqcm_voice">Kilogrammaa neliösenttimetrillä</string>
<string name="pollen_level_0">Ei yhtään</string>
<string name="settings_location_access_permission_already_granted">Lupa myönnetty jo</string>
<string name="notification_update_error">%d päivitys(tä) epäonnistui</string>

View file

@ -814,8 +814,6 @@
<string name="unit_mmhg_voice">Millimètres de mercure</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Pouces de mercure</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Kilogramme de force par mètre carré</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Microgrammes par mètre cube</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -465,8 +465,6 @@
<string name="unit_mmhg_voice">Milliméadair mhearcair</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Orlaí mearcair</string>
<string name="unit_kgfpsqcm">kgf / cm²</string>
<string name="unit_kgfpsqcm_voice">Fórsa cileagram in aghaidh an ceintiméadar cearnach</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Micrograms in aghaidh an mhéadair chiúbaigh</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -472,7 +472,6 @@
<string name="unit_inhg_voice">אינצ\'ים של כספית</string>
<string name="unit_mgpcum_voice">מיליגרמים עבור מטר מעוקב</string>
<string name="unit_mugpcum_voice">מיקרוגרמים עבור מטר מעוקב</string>
<string name="unit_kgfpsqcm_voice">קילוגרם כוח עבור סנטימטר רבוע</string>
<string name="unit_h_voice">שעות</string>
<string name="unit_ppcm_voice">עבור מטר מעוקב</string>
<string name="notification_refreshed_at">רוענן ב</string>

View file

@ -521,7 +521,6 @@
<string name="common_weather_text_snow_light">हल्की बर्फ</string>
<string name="common_weather_text_snow_showers_light">हल्की बर्फ़बारी</string>
<string name="common_weather_text_drizzle_freezing_light">हल्की बर्फ़ीली बूंदाबांदी</string>
<string name="unit_kgfpsqcm_voice">प्रति वर्ग सेंटीमीटर किलोग्राम बल</string>
<string name="common_weather_text_clear_sky">साफ़ आकाश</string>
<string name="common_weather_text_rain_snow_mixed_light">हल्की बारिश और बर्फबारी मिश्रित</string>
<string name="common_weather_text_snow">हिम</string>
@ -613,7 +612,6 @@
<string name="widget_clock_font_sans_serif_black">सैंस सेरिफ ब्लैक</string>
<string name="settings_weather_source_portal">पोर्टल</string>
<string name="settings_main_summary">कार्ड क्रम, प्रदर्शित आइटम, और एनिमेशन</string>
<string name="unit_kgfpsqcm">किलोग्राम-बल/सेंटीमीटर² (kgf/cm²)</string>
<string name="unit_h"></string>
<string name="unit_ppcm">प्रति मीटर³ (/m³)</string>
<string name="message_server_unavailable_title">सर्वर अनुपलब्ध</string>

View file

@ -492,7 +492,6 @@
<string name="weather_kind_wind">Vjetar</string>
<string name="notification_channel_background_services">Pozadinske usluge</string>
<string name="unit_cmph_voice">Centimetara po satu</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="notification_style_native">Izvorni</string>
<string name="unit_mgpcum_voice">Miligrama po kubnom metru</string>
<string name="unit_bft_voice">na Beaufort ljestvici</string>
@ -520,7 +519,6 @@
<string name="common_weather_text_rain_snow_mixed_showers_heavy">Jaki pljuskovi sa susnježicom</string>
<string name="unit_lpsqm">L/m²</string>
<string name="common_weather_text_rain_showers">Pljuskovi</string>
<string name="unit_kgfpsqcm_voice">Kilograma sile po centimetru kvadratnom</string>
<string name="notification_update_error">%d ažuriranje/a neuspjelo</string>
<string name="unit_h">h</string>
<string name="notification_channel_widget">Widget</string>

View file

@ -432,8 +432,6 @@
<string name="settings_color_day_night">Nappali / Éjszakai</string>
<string name="settings_none">Nincs</string>
<string name="unit_mb_voice">Millibar</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Kilogramm erő per négyzetcentiméter</string>
<string name="unit_mb">mb</string>
<string name="about_contact">Kapcsolat</string>
<string name="common_weather_text_partly_cloudy">Részben felhős</string>

View file

@ -411,7 +411,6 @@
<string name="settings_debug_summary">Catatan kemogokan</string>
<string name="about_privacy_policy">Kebijakan privasi</string>
<string name="unit_cmph_voice">Sentimeter per jam</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="notification_style_native">Asli</string>
<string name="settings_none">Tidak ada</string>
<string name="common_weather_text_partly_cloudy">Sebagian berawan</string>
@ -540,7 +539,6 @@
<string name="settings_main_cards_fade_in_switch">Kartu memudar</string>
<string name="common_weather_text_rain_snow_mixed_showers_heavy">Campuran hujan dan salju bergerimis lebat</string>
<string name="weather_api_key_required_missing_content">Untuk menggunakan sumber ini, Anda perlu menyediakan kunci API.</string>
<string name="unit_kgfpsqcm_voice">Gaya kilogram per sentimeter persegi</string>
<string name="settings_location_access_permission_already_granted">Izin sudah diberikan</string>
<string name="notification_update_error">%d pembaruan gagal</string>
<string name="settings_location_access_precise_summaryOn">Diaktifkan. Penyedia jaringan akan digunakan sepanjang waktu dan sebagai prioritas, tetapi GPS dapat digunakan sebagai cadangan.</string>

View file

@ -272,7 +272,6 @@
<string name="unit_atm_voice">Atmosfere</string>
<string name="unit_mmhg_voice">Millimetri di mercurio</string>
<string name="unit_inhg_voice">Pollici di mercurio</string>
<string name="unit_kgfpsqcm_voice">Chilogrammo forza per centimetro quadrato</string>
<string name="unit_mugpcum_voice">Microgrammi per metro cubo</string>
<string name="unit_mgpcum_voice">Milligrammi per metro cubo</string>
<string name="unit_h_voice">ore</string>
@ -425,7 +424,6 @@
<string name="unit_ft">ft</string>
<string name="unit_mb">mb</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_h">h</string>

View file

@ -437,8 +437,6 @@
<string name="temperature_normals">温度標準値</string>
<string name="air_quality_co_full">一酸化炭素(%s</string>
<string name="location_search_no_results">%1$s が %2$s を見つけられません</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">キログラム力毎平方センチメートル</string>
<string name="message_network_unavailable">ネットワークが利用できません</string>
<string name="unit_atm_voice">標準気圧</string>
<string name="unit_mmhg">mmHg</string>

View file

@ -292,7 +292,6 @@
<string name="unit_mb_voice">밀리바</string>
<string name="unit_kpa">kPa</string>
<string name="unit_inhg_voice">수은주 인치</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mi_voice">마일</string>
<string name="unit_nmi">nmi</string>
<string name="unit_nmi_voice">해리</string>

View file

@ -385,8 +385,6 @@
<string name="unit_ppcm">/m³</string>
<string name="unit_inhg_voice">Gyvsidabrio coliai</string>
<string name="unit_ppcm_voice">Vienam kubiniam metrui</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Kilogramo jėga kvadratiniam centimetrui</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="notification_channel_forecast">Prognozė</string>
<string name="notification_channel_widget">Valdiklis</string>

View file

@ -392,7 +392,6 @@
<string name="unit_ft_voice">Pēda</string>
<string name="unit_mb">mb</string>
<string name="unit_kpa">kPa</string>
<string name="unit_kgfpsqcm_voice">Kilograms spēka uz kvadrātcentimetru</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Mikrogrami uz kubikmetru</string>
<string name="notification_style_cities">Pilsētas</string>
@ -425,7 +424,6 @@
<string name="unit_mmhg_voice">Dzīvsudraba milimetri</string>
<string name="unit_inhg">dz. st. in</string>
<string name="unit_inhg_voice">Dzīvsudraba collas</string>
<string name="unit_kgfpsqcm">at - kgf/cm²</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_mgpcum_voice">Miligrami uz kubikmetru</string>
<string name="unit_h">h</string>

View file

@ -332,7 +332,6 @@
<string name="unit_atm">атм</string>
<string name="unit_atm_voice">Атмосфери</string>
<string name="unit_mmhg">мм. жива</string>
<string name="unit_kgfpsqcm">кгс/cм²</string>
<string name="unit_h">ч</string>
<string name="unit_h_voice">часови</string>
<string name="notification_updating_weather_data">Се ажурираат временските податоци (%1$d/%2$d)</string>
@ -445,7 +444,6 @@
<string name="unit_mmhg_voice">Милиметри жива</string>
<string name="unit_inhg">во Hg</string>
<string name="unit_inhg_voice">Инчи жива</string>
<string name="unit_kgfpsqcm_voice">Килограм сила на квадратен сантиметар</string>
<string name="unit_mugpcum_voice">Микрограми на кубен метар</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_mgpcum_voice">Милиграми на кубен метар</string>

View file

@ -181,8 +181,6 @@
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_mugpcum_voice">Mikrogram per kubikkmeter</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_kgfpsqcm_voice">Kilogramkraft per kvadratcentimeter</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="openmeteo_weather_text_depositing_rime_fog">Rimtåke</string>
<string name="common_weather_text_snow_grains">Snøkorn</string>
<string name="unit_atm">atm</string>

View file

@ -492,9 +492,7 @@
<string name="unit_atm_voice">Atmosferen</string>
<string name="notification_channel_alerts">Waarschuwingen</string>
<string name="unit_mugpcum_voice">Microgram per kubieke meter</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mmhg_voice">Millimeters kwik</string>
<string name="unit_kgfpsqcm_voice">Kilogram kracht per vierkante centimeter</string>
<string name="about_source_code">Broncode</string>
<string name="about_contributors">Bijdragers</string>
<string name="common_weather_text_mostly_clear">Overwegend helder</string>

View file

@ -346,7 +346,6 @@
<string name="unit_kpa_voice">Kilopaskale</string>
<string name="unit_atm">atm</string>
<string name="unit_hpa_voice">Hektopaskale</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="settings_main_section_options">Opcje</string>
@ -477,7 +476,6 @@
<string name="unit_kn_voice">Węzłów</string>
<string name="unit_mph_voice">Mil na godzinę</string>
<string name="unit_ftps_voice">Stóp na sekundę</string>
<string name="unit_kgfpsqcm_voice">Kilogramów siły na centymetr kwadratowy</string>
<string name="common_weather_text_mostly_clear">Przeważnie bezchmurnie</string>
<string name="openmeteo_weather_text_thunderstorm_slight_or_moderate">Lekka lub umiarkowana burza z piorunami</string>
<string name="openmeteo_weather_text_thunderstorm_with_heavy_hail">Silna burza z gradem</string>

View file

@ -275,7 +275,6 @@
<string name="unit_atm_voice">Atmosferas</string>
<string name="unit_mmhg_voice">Milímetros de mercúrio</string>
<string name="unit_inhg_voice">Polegadas de mercúrio</string>
<string name="unit_kgfpsqcm_voice">Quilograma-força por centímetro quadrado</string>
<string name="unit_mugpcum_voice">Microgramas por metro cúbico</string>
<string name="unit_mgpcum_voice">Miligramas por metro cúbico</string>
<string name="unit_h_voice">horas</string>
@ -458,7 +457,6 @@
<string name="air_quality_pm10">PM10</string>
<string name="unit_lpsqm">L/m²</string>
<string name="unit_mb">mb</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_cmph">cm/h</string>
<string name="unit_celsius">°C</string>

View file

@ -178,7 +178,6 @@
<string name="unit_lpsqmph">L/m²/h</string>
<string name="unit_kelvin">K</string>
<string name="unit_kpa">kPa</string>
<string name="unit_kgfpsqcm_voice">Quilograma força por centímetro quadrado</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_ppcm">/m³</string>
<string name="unit_ppcm_voice">Por metro cúbico</string>
@ -373,7 +372,6 @@
<string name="unit_atm">atm</string>
<string name="unit_atm_voice">Atmosferas</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum_voice">Microgramas por metro cúbico</string>
<string name="settings_icon_packs_weather_icon_light">Ícone claro</string>
<string name="settings_icon_packs_weather_icon_dark">Ícone escuro</string>

View file

@ -248,7 +248,6 @@
<string name="common_weather_text_snow_grains">Ninsoare Fină</string>
<string name="settings_icon_packs_weather_icon_grey">Pictogramă gri</string>
<string name="settings_icon_packs_weather_icon_dark">Pictogramă întunecată</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="location_message_search_failed">Căutarea locației a eșuat</string>
<string name="action_more">Mai mult</string>
@ -278,7 +277,6 @@
<string name="unit_mmhg">mmHg</string>
<string name="unit_mmhg_voice">Milimetri coloană de mercur</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm_voice">Kilogram forță pe centimetru pătrat</string>
<string name="unit_mugpcum_voice">Micrograme pe metru cub</string>
<string name="unit_mgpcum">mg/m³</string>
<string name="unit_h">h</string>

View file

@ -236,7 +236,6 @@
<string name="unit_atm">атм</string>
<string name="unit_mmhg">мм рт. ст.</string>
<string name="unit_inhg">дюйм рт. ст.</string>
<string name="unit_kgfpsqcm">кгс/cм²</string>
<string name="unit_mugpcum">мкг/м³</string>
<string name="unit_h">ч</string>
<string name="unit_ppcm">/м³</string>
@ -354,7 +353,6 @@
<string name="unit_in_voice">Дюймов</string>
<string name="unit_celsius_short">°</string>
<string name="unit_ft_voice">Футы</string>
<string name="unit_kgfpsqcm_voice">Килограммовая сила на квадратный сантиметр</string>
<string name="unit_mgpcum_voice">Миллиграммы на кубический метр</string>
<string name="notification_channel_background_services">Фоновые сервисы</string>
<string name="location_results_by">Результаты местоположения по %s</string>

View file

@ -432,13 +432,11 @@
<string name="settings_location_access_switch_title">Prístup k polohe</string>
<string name="settings_weather_sources_default_source">Predvolený zdroj nového miesta</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm_voice">Kilogram sily na centimeter štvorcový</string>
<string name="settings_location_service">Služba určovania polohy</string>
<string name="widget_text">Text</string>
<string name="unit_mmhg">mmHg</string>
<string name="settings_weather_sources">Zdroje pre počasie</string>
<string name="unit_inhg_voice">Palce ortuti</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="message_source_not_installed_error_title">Zdroj už nie je dostupný</string>
<string name="settings_background_updates_refresh_never_warning1">Vypnutím aktualizácii na pozadí už nebudete dostávať notifikácie o počasí. Widgety sa nebudú obnovovať, dokým neotvoríte aplikáciu.</string>
<string name="settings_location_access_permission_already_granted">Povolenie už bolo udelené</string>

View file

@ -202,7 +202,6 @@
<string name="unit_celsius_short">°</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Инчи живе</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="settings_section_general">Опште</string>
<string name="weather_source_accu_preference_hours_120">120 сати</string>
<string name="location_results_by">Резултати за локације од %s</string>
@ -280,7 +279,6 @@
<string name="widget_material_you_current">Material You Тренутно</string>
<string name="widget_clock_day_details">Сат + Дневно (Детаљи)</string>
<string name="unit_kpa">kPa</string>
<string name="unit_kgfpsqcm_voice">Килограм-сила по квадратном центиметру</string>
<string name="temperature_average_short">Просек</string>
<string name="temperature_normal_short">Нормала</string>
<string name="precipitation_rain">Киша</string>

View file

@ -467,7 +467,6 @@
<string name="settings_icon_packs_weather_icon_grey">Grå ikon</string>
<string name="weather_message_unsupported_feature">Källan stöder inte en av de begärda funktionerna</string>
<string name="settings_debug_dump_crash_logs_title">Dela kraschloggar</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="settings_location_service">Platstjänst</string>
<string name="widget_custom_subtitle_keyword_xnwd_description">Vind nattetid för i dag, i morgon, …, 4 dagar senare</string>
<string name="unit_bft_voice">på Beaufortskalan</string>
@ -493,7 +492,6 @@
<string name="settings_disabled">Inaktiverad</string>
<string name="common_weather_text_rain_snow_mixed_showers_heavy">Kraftiga snöblandade regnskurar</string>
<string name="common_weather_text_rain_showers">Regnskurar</string>
<string name="unit_kgfpsqcm_voice">Kilogram kraft per kvadratcentimeter</string>
<string name="settings_location_access_permission_already_granted">Behörighet redan beviljad</string>
<string name="notification_update_error">%d uppdatering(ar) misslyckades</string>
<string name="settings_location_access_switch_title">Platsåtkomst</string>

View file

@ -555,10 +555,8 @@
<string name="settings_notifications">அறிவிப்புகள்</string>
<string name="settings_enabled">இயக்கப்பட்டது</string>
<string name="settings_disabled">முடக்கப்பட்டது</string>
<string name="unit_kgfpsqcm">கிலோஅடி/செ.மீ²</string>
<string name="unit_inhg">inhg</string>
<string name="unit_inhg_voice">பாதரசத்தின் அங்குலங்கள்</string>
<string name="unit_kgfpsqcm_voice">சதுர சென்டிமீட்டருக்கு கிலோகிராம் ஆற்றல்</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">ஒரு கன மீட்டருக்கு மைக்ரோகிராம்</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -650,8 +650,6 @@
<string name="unit_mgpcum">มก./ลบ.ม.</string>
<string name="unit_mugpcum">มค.ก./ลบ.ม.</string>
<string name="unit_inhg_voice">นิ้วปรอท</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">กิโลกรัมแรงต่อตารางเซนติเมตร</string>
<string name="notification_updating_weather_data">กำลังอัปเดตข้อมูลสภาพอากาศ (%1$d/%2$d)</string>
<string name="unit_mgpcum_voice">มิลลิกรัมต่อลูกบาศก์เมตร</string>
<string name="unit_h">ชม.</string>

View file

@ -350,7 +350,6 @@
<string name="unit_bft_voice">Beaufort ölçeğinde</string>
<string name="unit_mm_voice">Milimetre</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm_voice">Kilogram kuvvet bölü santimetre kare</string>
<string name="about_source_code">Kaynak kodu</string>
<string name="common_weather_text_rain_showers_heavy">Şiddetli sağanak yağış</string>
<string name="common_weather_text_rain_showers_moderate">Orta şiddetli sağanak yağış</string>
@ -487,7 +486,6 @@
<string name="unit_mi">mi</string>
<string name="unit_nmi">nmi</string>
<string name="unit_nmi_voice">Deniz mili</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_mugpcum_voice">Metreküp başına mikrogram</string>
<string name="unit_ft">ft</string>
<string name="unit_mb">mb</string>

View file

@ -486,8 +486,6 @@
<string name="unit_atm">атм</string>
<string name="unit_atm_voice">Атмосфер</string>
<string name="unit_mmhg">мм рт. ст.</string>
<string name="unit_kgfpsqcm">кгс/cм²</string>
<string name="unit_kgfpsqcm_voice">Кілограм сили на квадратний сантиметр</string>
<string name="unit_mugpcum">мкг/м³</string>
<string name="unit_mugpcum_voice">Мікрограмів на кубічний метр</string>
<string name="unit_mgpcum">мг/м³</string>

View file

@ -343,7 +343,6 @@
<string name="unit_mm_voice">Milimét</string>
<string name="unit_inph_voice">Inch trên giờ</string>
<string name="unit_mmhg_voice">Milimét thủy ngân</string>
<string name="unit_kgfpsqcm_voice">Kilôgam lực trên xăngtimét vuông</string>
<string name="unit_mugpcum_voice">Microgram trên mét khối</string>
<string name="notification_refreshed_at">Được làm mới vào lúc</string>
<string name="notification_channel_alerts">Cảnh báo</string>
@ -455,7 +454,6 @@
<string name="unit_mb">mb</string>
<string name="unit_hpa">hPa</string>
<string name="unit_inhg">inHg</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_atm">atm</string>
<string name="unit_mmhg">mmHg</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -339,8 +339,6 @@
<string name="unit_mmhg_voice">毫米汞柱</string>
<string name="unit_inhg">英寸汞柱</string>
<string name="unit_inhg_voice">英寸汞柱</string>
<string name="unit_kgfpsqcm">千克力/厘米²</string>
<string name="unit_kgfpsqcm_voice">千克力每平方厘米</string>
<string name="unit_mugpcum">微克/米³</string>
<string name="unit_mugpcum_voice">微克每立方米</string>
<string name="unit_mgpcum">毫克/米³</string>

View file

@ -546,8 +546,6 @@
<string name="unit_mmhg_voice">毫米汞柱</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">英寸汞柱</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">公斤力每平方厘米</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">微克每立方米</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -294,8 +294,6 @@
<string name="unit_mmhg_voice">毫米汞柱</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">英寸汞柱</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">公斤力每平方公分</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">微克每立方公尺</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -567,38 +567,6 @@
<item>ft</item>
</string-array>
<!-- pressure unit. -->
<string-array name="pressure_units">
<item>@string/settings_follow_system</item>
<item>@string/unit_mb</item>
<item>@string/unit_kpa</item>
<item>@string/unit_hpa</item>
<item>@string/unit_atm</item>
<item>@string/unit_mmhg</item>
<item>@string/unit_inhg</item>
<item>@string/unit_kgfpsqcm</item>
</string-array>
<string-array name="pressure_unit_voices">
<item>@string/settings_follow_system</item>
<item>@string/unit_mb_voice</item>
<item>@string/unit_kpa_voice</item>
<item>@string/unit_hpa_voice</item>
<item>@string/unit_atm_voice</item>
<item>@string/unit_mmhg_voice</item>
<item>@string/unit_inhg_voice</item>
<item>@string/unit_kgfpsqcm_voice</item>
</string-array>
<string-array name="pressure_unit_values">
<item>auto</item>
<item>mb</item>
<item>kpa</item>
<item>hpa</item>
<item>atm</item>
<item>mmhg</item>
<item>inhg</item>
<item>kgfpsqcm</item>
</string-array>
<!-- air quality unit. -->
<string-array name="air_quality_units">
<item>@string/unit_mugpcum</item>

View file

@ -920,20 +920,18 @@
<string name="unit_nmi_voice">Nautical miles</string>
<string name="unit_ft">ft</string>
<string name="unit_ft_voice">Feet</string>
<string name="unit_mb">mb</string>
<string name="unit_mb_voice">Millibars</string>
<string name="unit_kpa">kPa</string>
<string name="unit_kpa_voice">Kilopascals</string>
<string name="unit_hpa">hPa</string>
<string name="unit_hpa_voice">Hectopascals</string>
<string name="unit_atm">atm</string>
<string name="unit_atm_voice">Atmospheres</string>
<string name="unit_mmhg">mmHg</string>
<string name="unit_mmhg_voice">Millimeters of mercury</string>
<string name="unit_inhg">inHg</string>
<string name="unit_inhg_voice">Inches of mercury</string>
<string name="unit_kgfpsqcm">kgf/cm²</string>
<string name="unit_kgfpsqcm_voice">Kilogram force per square centimeter</string>
<string name="unit_mb" translatable="false">mb</string>
<string name="unit_mb_voice" translatable="false">Millibars</string>
<string name="unit_kpa" translatable="false">kPa</string>
<string name="unit_kpa_voice" translatable="false">Kilopascals</string>
<string name="unit_hpa" translatable="false">hPa</string>
<string name="unit_hpa_voice" translatable="false">Hectopascals</string>
<string name="unit_atm" translatable="false">atm</string>
<string name="unit_atm_voice" translatable="false">Atmospheres</string>
<string name="unit_mmhg" translatable="false">mmHg</string>
<string name="unit_mmhg_voice" translatable="false">Millimeters of mercury</string>
<string name="unit_inhg" translatable="false">inHg</string>
<string name="unit_inhg_voice" translatable="false">Inches of mercury</string>
<string name="unit_mugpcum">μg/m³</string>
<string name="unit_mugpcum_voice">Micrograms per cubic meter</string>
<string name="unit_mgpcum">mg/m³</string>

View file

@ -86,6 +86,7 @@ import org.breezyweather.sources.accu.preferences.AccuDaysPreference
import org.breezyweather.sources.accu.preferences.AccuHoursPreference
import org.breezyweather.sources.accu.preferences.AccuPortalPreference
import org.breezyweather.sources.openmeteo.OpenMeteoService.Companion.COPERNICUS_POLLEN_BBOX
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Calendar
import java.util.Date
@ -415,7 +416,7 @@ class AccuService @Inject constructor(
uV = UV(index = currentResult.UVIndex?.toDouble()),
relativeHumidity = currentResult.RelativeHumidity?.toDouble(),
dewPoint = currentResult.DewPoint?.Metric?.Value,
pressure = currentResult.Pressure?.Metric?.Value,
pressure = currentResult.Pressure?.Metric?.Value?.hectopascals,
cloudCover = currentResult.CloudCover,
visibility = currentResult.Visibility?.Metric?.Value?.times(1000),
ceiling = currentResult.Ceiling?.Metric?.Value,

View file

@ -61,6 +61,7 @@ import org.breezyweather.sources.aemet.json.AemetHourlyResult
import org.breezyweather.sources.aemet.json.AemetNormalsResult
import org.breezyweather.sources.aemet.json.AemetStationsResult
import org.breezyweather.sources.getWindDegree
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Date
@ -271,7 +272,7 @@ class AemetService @Inject constructor(
),
relativeHumidity = it.hr,
dewPoint = it.tpr,
pressure = it.pres,
pressure = it.pres?.hectopascals,
visibility = it.vis
)
}

View file

@ -59,6 +59,7 @@ import org.breezyweather.sources.china.json.ChinaForecastHourly
import org.breezyweather.sources.china.json.ChinaForecastResult
import org.breezyweather.sources.china.json.ChinaLocationResult
import org.breezyweather.sources.china.json.ChinaMinutelyResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Calendar
import java.util.Date
@ -279,7 +280,7 @@ class ChinaService @Inject constructor(
null
},
pressure = if (!current.pressure?.value.isNullOrEmpty()) {
current.pressure.value.toDoubleOrNull()
current.pressure.value.toDoubleOrNull()?.hectopascals
} else {
null
},

View file

@ -77,6 +77,7 @@ import org.breezyweather.sources.nlsc.NlscService.Companion.MATSU_BBOX
import org.breezyweather.sources.nlsc.NlscService.Companion.PENGHU_BBOX
import org.breezyweather.sources.nlsc.NlscService.Companion.TAIWAN_BBOX
import org.breezyweather.sources.nlsc.NlscService.Companion.WUQIU_BBOX
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Calendar
@ -463,7 +464,7 @@ class CwaService @Inject constructor(
temperature = temperature,
humidity = relativeHumidity,
latitude = latitude
),
)?.hectopascals,
dailyForecast = dailyForecast
)
}

View file

@ -48,6 +48,7 @@ import org.breezyweather.sources.dmi.json.DmiResult
import org.breezyweather.sources.dmi.json.DmiTimeserie
import org.breezyweather.sources.dmi.json.DmiWarning
import org.breezyweather.sources.dmi.json.DmiWarningResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Objects
import javax.inject.Inject
@ -210,7 +211,7 @@ class DmiService @Inject constructor(
gusts = result.windGust
),
relativeHumidity = result.humidity,
pressure = result.pressure,
pressure = result.pressure?.hectopascals,
visibility = result.visibility
)
}

View file

@ -57,6 +57,7 @@ import org.breezyweather.sources.eccc.json.EcccRegionalNormalsMetric
import org.breezyweather.sources.eccc.json.EcccResult
import org.breezyweather.sources.eccc.json.EcccUnit
import org.breezyweather.sources.getWindDegree
import org.breezyweather.unit.pressure.Pressure.Companion.kilopascals
import retrofit2.Retrofit
import java.util.Calendar
import java.util.Date
@ -200,7 +201,7 @@ class EcccService @Inject constructor(
),
relativeHumidity = result.humidity?.toDoubleOrNull(),
dewPoint = getNonEmptyMetric(result.dewpoint),
pressure = getNonEmptyMetric(result.pressure)?.times(10),
pressure = getNonEmptyMetric(result.pressure)?.kilopascals,
visibility = getNonEmptyMetric(result.visibility)?.times(1000)
)
}

View file

@ -51,6 +51,7 @@ import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_HIGHEST
import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_NONE
import org.breezyweather.sources.geosphereat.json.GeoSphereAtTimeseriesResult
import org.breezyweather.sources.geosphereat.json.GeoSphereAtWarningsResult
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import retrofit2.Retrofit
import java.util.Date
import javax.inject.Inject
@ -354,7 +355,7 @@ class GeoSphereAtService @Inject constructor(
null
},
relativeHumidity = hourlyResult.features[0].properties!!.parameters!!.rh2m?.data?.getOrNull(i),
pressure = hourlyResult.features[0].properties!!.parameters!!.sp?.data?.getOrNull(i)?.div(100),
pressure = hourlyResult.features[0].properties!!.parameters!!.sp?.data?.getOrNull(i)?.pascals,
cloudCover = hourlyResult.features[0].properties!!.parameters!!.tcc?.data?.getOrNull(i)?.times(100)
?.roundToInt()
)

View file

@ -51,6 +51,7 @@ import org.breezyweather.common.source.WeatherSource
import org.breezyweather.domain.settings.SourceConfigStore
import org.breezyweather.sources.here.json.HereGeocodingData
import org.breezyweather.sources.here.json.HereWeatherData
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import javax.inject.Inject
import javax.inject.Named
@ -178,7 +179,7 @@ class HereService @Inject constructor(
uV = UV(index = result.uvIndex?.toDouble()),
relativeHumidity = result.humidity?.toDouble(),
dewPoint = result.dewPoint,
pressure = result.barometerPressure,
pressure = result.barometerPressure?.hectopascals,
visibility = result.visibility?.times(1000)
)
}
@ -255,7 +256,7 @@ class HereService @Inject constructor(
uV = UV(index = result.uvIndex?.toDouble()),
relativeHumidity = result.humidity?.toDouble(),
dewPoint = result.dewPoint,
pressure = result.barometerPressure,
pressure = result.barometerPressure?.hectopascals,
visibility = result.visibility?.times(1000)
)
}

View file

@ -62,6 +62,7 @@ import org.breezyweather.sources.hko.json.HkoHourlyWeatherForecast
import org.breezyweather.sources.hko.json.HkoNormalsResult
import org.breezyweather.sources.hko.json.HkoOneJsonResult
import org.breezyweather.sources.hko.json.HkoWarningResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import org.json.JSONObject
import retrofit2.Retrofit
import java.text.SimpleDateFormat
@ -335,7 +336,7 @@ class HkoService @Inject constructor(
index = oneJson.RHRREAD?.UVIndex?.toDoubleOrNull()
),
relativeHumidity = regionalWeather?.RH?.Value?.toDoubleOrNull(),
pressure = regionalWeather?.Pressure?.Value?.toDoubleOrNull(),
pressure = regionalWeather?.Pressure?.Value?.toDoubleOrNull()?.hectopascals,
dailyForecast = oneJson.F9D?.WeatherForecast?.getOrElse(0) { null }?.ForecastWeather
)
}

View file

@ -41,6 +41,7 @@ import org.breezyweather.common.source.WeatherSource
import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_HIGHEST
import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_NONE
import org.breezyweather.sources.ilmateenistus.json.IlmateenistusForecastResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Locale
@ -165,7 +166,7 @@ class IlmateenistusService @Inject constructor(
degree = it.windDirection?.attributes?.deg?.toDoubleOrNull(),
speed = it.windSpeed?.attributes?.mps?.toDoubleOrNull()
),
pressure = it.pressure?.attributes?.value?.toDoubleOrNull()
pressure = it.pressure?.attributes?.value?.toDoubleOrNull()?.hectopascals
)
)
}

View file

@ -67,6 +67,7 @@ import org.breezyweather.sources.jma.json.JmaDailyResult
import org.breezyweather.sources.jma.json.JmaForecastAreaResult
import org.breezyweather.sources.jma.json.JmaHourlyResult
import org.breezyweather.sources.jma.json.JmaWeekAreaResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import org.json.JSONObject
import retrofit2.Retrofit
import java.text.SimpleDateFormat
@ -314,7 +315,7 @@ class JmaService @Inject constructor(
speed = it.wind?.getOrNull(0)
),
relativeHumidity = it.humidity?.getOrNull(0),
pressure = it.normalPressure?.getOrNull(0),
pressure = it.normalPressure?.getOrNull(0)?.hectopascals,
visibility = it.visibility?.getOrNull(0),
dailyForecast = dailyForecast
)

View file

@ -49,6 +49,7 @@ import org.breezyweather.sources.lhmt.json.LhmtAlertText
import org.breezyweather.sources.lhmt.json.LhmtAlertsResult
import org.breezyweather.sources.lhmt.json.LhmtLocationsResult
import org.breezyweather.sources.lhmt.json.LhmtWeatherResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Locale
@ -206,7 +207,7 @@ class LhmtService @Inject constructor(
gusts = it.windGust
),
relativeHumidity = it.relativeHumidity,
pressure = it.seaLevelPressure,
pressure = it.seaLevelPressure?.hectopascals,
cloudCover = it.cloudCover?.toInt()
)
}
@ -253,7 +254,7 @@ class LhmtService @Inject constructor(
gusts = it.windGust
),
relativeHumidity = it.relativeHumidity,
pressure = it.seaLevelPressure,
pressure = it.seaLevelPressure?.hectopascals,
cloudCover = it.cloudCover?.toInt()
)
)

View file

@ -52,6 +52,7 @@ import org.breezyweather.sources.lvgmc.json.LvgmcAirQualityResult
import org.breezyweather.sources.lvgmc.json.LvgmcCurrentLocation
import org.breezyweather.sources.lvgmc.json.LvgmcCurrentResult
import org.breezyweather.sources.lvgmc.json.LvgmcForecastResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Date
@ -237,7 +238,7 @@ class LvgmcService @Inject constructor(
index = it.uvIndex?.toDoubleOrNull()
),
relativeHumidity = it.relativeHumidity?.toDoubleOrNull(),
pressure = it.pressure?.toDoubleOrNull(),
pressure = it.pressure?.toDoubleOrNull()?.hectopascals,
visibility = it.visibility?.toDoubleOrNull()
)
}
@ -361,7 +362,7 @@ class LvgmcService @Inject constructor(
index = it.uvIndex?.toDoubleOrNull()
),
relativeHumidity = it.relativeHumidity?.toDoubleOrNull(),
pressure = it.pressure?.toDoubleOrNull(),
pressure = it.pressure?.toDoubleOrNull()?.hectopascals,
cloudCover = it.cloudCover?.toIntOrNull()
)
}

View file

@ -46,6 +46,7 @@ import org.breezyweather.sources.meteoam.json.MeteoAmForecastStats
import org.breezyweather.sources.meteoam.json.MeteoAmObservationResult
import org.breezyweather.sources.meteoam.json.MeteoAmReverseLocation
import org.breezyweather.sources.meteoam.json.MeteoAmReverseLocationResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Date
import javax.inject.Inject
@ -183,7 +184,8 @@ class MeteoAmService @Inject constructor(
),
relativeHumidity = currentResult.getOrElse(keys["r"].toString()) { null }
?.getOrElse("0") { null } as? Double,
pressure = currentResult.getOrElse(keys["pmsl"].toString()) { null }?.getOrElse("0") { null } as? Double
pressure = (currentResult.getOrElse(keys["pmsl"].toString()) { null }?.getOrElse("0") { null } as? Double)
?.hectopascals
)
}
@ -245,8 +247,9 @@ class MeteoAmService @Inject constructor(
),
relativeHumidity = data.getOrElse(keys["r"].toString()) { null }
?.getOrElse(i.toString()) { null } as? Double,
pressure = data.getOrElse(keys["pmsl"].toString()) { null }
?.getOrElse(i.toString()) { null } as? Double
pressure = (
data.getOrElse(keys["pmsl"].toString()) { null }?.getOrElse(i.toString()) { null } as? Double
)?.hectopascals
)
}
}

View file

@ -48,6 +48,7 @@ import org.breezyweather.sources.metie.json.MetIeHourly
import org.breezyweather.sources.metie.json.MetIeLocationResult
import org.breezyweather.sources.metie.json.MetIeWarning
import org.breezyweather.sources.metie.json.MetIeWarningResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Locale
@ -207,7 +208,7 @@ class MetIeService @Inject constructor(
speed = result.windSpeed?.div(3.6)
),
relativeHumidity = result.humidity?.toDoubleOrNull(),
pressure = result.pressure?.toDoubleOrNull()
pressure = result.pressure?.toDoubleOrNull()?.hectopascals
)
}
}

View file

@ -53,6 +53,7 @@ import org.breezyweather.sources.metno.json.MetNoAlertResult
import org.breezyweather.sources.metno.json.MetNoForecastResult
import org.breezyweather.sources.metno.json.MetNoForecastTimeseries
import org.breezyweather.sources.metno.json.MetNoNowcastResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Date
import javax.inject.Inject
@ -291,7 +292,7 @@ class MetNoService @Inject constructor(
},
relativeHumidity = currentTimeseries.instant?.details?.relativeHumidity,
dewPoint = currentTimeseries.instant?.details?.dewPointTemperature,
pressure = currentTimeseries.instant?.details?.airPressureAtSeaLevel,
pressure = currentTimeseries.instant?.details?.airPressureAtSeaLevel?.hectopascals,
cloudCover = currentTimeseries.instant?.details?.cloudAreaFraction?.roundToInt()
)
} else {
@ -336,7 +337,7 @@ class MetNoService @Inject constructor(
uV = UV(index = hourlyForecast.data?.instant?.details?.ultravioletIndexClearSky),
relativeHumidity = hourlyForecast.data?.instant?.details?.relativeHumidity,
dewPoint = hourlyForecast.data?.instant?.details?.dewPointTemperature,
pressure = hourlyForecast.data?.instant?.details?.airPressureAtSeaLevel,
pressure = hourlyForecast.data?.instant?.details?.airPressureAtSeaLevel?.hectopascals,
cloudCover = hourlyForecast.data?.instant?.details?.cloudAreaFraction?.roundToInt()
)
}

View file

@ -48,6 +48,7 @@ import org.breezyweather.domain.settings.SourceConfigStore
import org.breezyweather.sources.metoffice.json.MetOfficeDaily
import org.breezyweather.sources.metoffice.json.MetOfficeForecast
import org.breezyweather.sources.metoffice.json.MetOfficeHourly
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import retrofit2.Retrofit
import javax.inject.Inject
import javax.inject.Named
@ -191,7 +192,7 @@ class MetOfficeService @Inject constructor(
),
relativeHumidity = result.screenRelativeHumidity,
dewPoint = result.screenDewPointTemperature,
pressure = result.mslp?.toDouble()?.div(100), // pa -> mb
pressure = result.mslp?.toDouble()?.pascals,
visibility = result.visibility?.toDouble()
)
}

View file

@ -73,6 +73,7 @@ import org.breezyweather.sources.mf.json.MfRainResult
import org.breezyweather.sources.mf.json.MfWarningDictionaryResult
import org.breezyweather.sources.mf.json.MfWarningsOverseasResult
import org.breezyweather.sources.mf.json.MfWarningsResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.nio.charset.StandardCharsets
import java.util.Calendar
@ -480,7 +481,7 @@ class MfService @Inject constructor(
gusts = hourlyForecast.windSpeedGust?.toDouble()
),
relativeHumidity = hourlyForecast.relativeHumidity?.toDouble(),
pressure = hourlyForecast.pSea,
pressure = hourlyForecast.pSea?.hectopascals,
cloudCover = hourlyForecast.totalCloudCover
)
}

View file

@ -53,6 +53,7 @@ import org.breezyweather.sources.mgm.json.MgmHourlyForecast
import org.breezyweather.sources.mgm.json.MgmHourlyForecastResult
import org.breezyweather.sources.mgm.json.MgmLocationResult
import org.breezyweather.sources.mgm.json.MgmNormalsResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Calendar
@ -247,7 +248,7 @@ class MgmService @Inject constructor(
speed = getValid(currentResult?.windSpeed)?.div(3.6)
),
relativeHumidity = getValid(currentResult?.humidity),
pressure = getValid(currentResult?.pressure)
pressure = getValid(currentResult?.pressure)?.hectopascals
)
}

View file

@ -58,6 +58,7 @@ import org.breezyweather.sources.namem.json.NamemDailyResult
import org.breezyweather.sources.namem.json.NamemHourlyResult
import org.breezyweather.sources.namem.json.NamemNormalsResult
import org.breezyweather.sources.namem.json.NamemStation
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Date
import javax.inject.Inject
@ -248,7 +249,7 @@ class NamemService @Inject constructor(
speed = current?.windSpeed
),
relativeHumidity = current?.ff,
pressure = current?.pslp
pressure = current?.pslp?.hectopascals
)
}

View file

@ -64,6 +64,9 @@ import org.breezyweather.sources.nws.json.NwsValueDoubleContainer
import org.breezyweather.sources.nws.json.NwsValueIntContainer
import org.breezyweather.sources.nws.json.NwsValueWeatherContainer
import org.breezyweather.sources.nws.json.NwsValueWeatherValue
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import org.breezyweather.unit.pressure.Pressure.Companion.inchesOfMercury
import org.breezyweather.unit.pressure.Pressure.Companion.pascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Calendar
@ -276,7 +279,7 @@ class NwsService @Inject constructor(
relativeHumidity = it.relativeHumidity?.value,
dewPoint = it.dewpoint?.value,
pressure = if (it.seaLevelPressure != null) {
it.seaLevelPressure.value?.div(100.0)
it.seaLevelPressure.value?.pascals
} else {
computeMeanSeaLevelPressure(
barometricPressure = it.barometricPressure?.value?.div(100.0),
@ -284,7 +287,7 @@ class NwsService @Inject constructor(
temperature = it.temperature?.value,
humidity = it.relativeHumidity?.value,
latitude = currentResult.geometry?.coordinates?.getOrNull(1)
)
)?.hectopascals
},
visibility = it.visibility?.value
)
@ -451,8 +454,7 @@ class NwsService @Inject constructor(
),
relativeHumidity = relativeHumidityList.getOrElse(it) { null }?.toDouble(),
dewPoint = dewpointForecastList.getOrElse(it) { null },
// Pressure is given in inHg - convert to hPa with conventional multiple
pressure = pressureForecastList.getOrElse(it) { null }?.times(33.86389),
pressure = pressureForecastList.getOrElse(it) { null }?.inchesOfMercury,
cloudCover = skyCoverForecastList.getOrElse(it) { null },
visibility = visibilityForecastList.getOrElse(it) { null }
)

View file

@ -51,6 +51,7 @@ import org.breezyweather.sources.openweather.json.OpenWeatherAirPollution
import org.breezyweather.sources.openweather.json.OpenWeatherAirPollutionResult
import org.breezyweather.sources.openweather.json.OpenWeatherForecast
import org.breezyweather.sources.openweather.json.OpenWeatherForecastResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.util.Date
import javax.inject.Inject
@ -182,7 +183,7 @@ class OpenWeatherService @Inject constructor(
gusts = currentResult.wind?.gust
),
relativeHumidity = currentResult.main?.humidity?.toDouble(),
pressure = currentResult.main?.pressure?.toDouble(),
pressure = currentResult.main?.pressure?.hectopascals,
cloudCover = currentResult.clouds?.all,
visibility = currentResult.visibility?.toDouble()
)
@ -235,7 +236,7 @@ class OpenWeatherService @Inject constructor(
gusts = result.wind?.gust
),
relativeHumidity = result.main?.humidity?.toDouble(),
pressure = result.main?.pressure?.toDouble(),
pressure = result.main?.pressure?.hectopascals,
cloudCover = result.clouds?.all,
visibility = result.visibility?.toDouble()
)

View file

@ -47,6 +47,7 @@ import org.breezyweather.sources.getWindDegree
import org.breezyweather.sources.pagasa.json.PagasaCurrentResult
import org.breezyweather.sources.pagasa.json.PagasaHourlyResult
import org.breezyweather.sources.pagasa.json.PagasaLocationResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Date
@ -202,7 +203,7 @@ class PagasaService @Inject constructor(
speed = it.windSpeed?.substringBefore(" ")?.toDoubleOrNull()?.div(3.6)
),
relativeHumidity = it.humidity?.substringBefore(" ")?.toDoubleOrNull(),
pressure = it.pressure?.toDoubleOrNull()
pressure = it.pressure?.toDoubleOrNull()?.hectopascals
)
}
}

View file

@ -52,6 +52,7 @@ import org.breezyweather.sources.smg.json.SmgCurrentResult
import org.breezyweather.sources.smg.json.SmgForecastResult
import org.breezyweather.sources.smg.json.SmgUvResult
import org.breezyweather.sources.smg.json.SmgWarningResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import java.text.SimpleDateFormat
import java.util.Calendar
@ -324,7 +325,8 @@ class SmgService @Inject constructor(
),
relativeHumidity = it.Humidity?.getOrNull(0)?.dValue?.getOrNull(0)?.toDoubleOrNull(),
dewPoint = it.DewPoint?.getOrNull(0)?.dValue?.getOrNull(0)?.toDoubleOrNull(),
pressure = it.MeanSeaLevelPressure?.getOrNull(0)?.dValue?.getOrNull(0)?.toDoubleOrNull(),
pressure = it.MeanSeaLevelPressure?.getOrNull(0)?.dValue?.getOrNull(0)?.toDoubleOrNull()
?.hectopascals,
dailyForecast = bulletinResult.Forecast?.Custom?.getOrNull(0)?.TodaySituation?.getOrNull(0)
)
}

View file

@ -40,6 +40,7 @@ import org.breezyweather.common.source.WeatherSource
import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_HIGHEST
import org.breezyweather.common.source.WeatherSource.Companion.PRIORITY_NONE
import org.breezyweather.sources.smhi.json.SmhiTimeSeries
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import retrofit2.Retrofit
import javax.inject.Inject
import javax.inject.Named
@ -156,7 +157,7 @@ class SmhiService @Inject constructor(
gusts = result.parameters.firstOrNull { it.name == "gust" }?.values?.getOrNull(0)
),
relativeHumidity = result.parameters.firstOrNull { it.name == "r" }?.values?.getOrNull(0),
pressure = result.parameters.firstOrNull { it.name == "msl" }?.values?.getOrNull(0),
pressure = result.parameters.firstOrNull { it.name == "msl" }?.values?.getOrNull(0)?.hectopascals,
visibility = result.parameters.firstOrNull { it.name == "vis" }?.values?.getOrNull(0)?.times(1000)
)
}

View file

@ -40,6 +40,7 @@ import org.breezyweather.sources.veduris.json.VedurIsLatestObservation
import org.breezyweather.sources.veduris.json.VedurIsResult
import org.breezyweather.sources.veduris.json.VedurIsStationForecast
import org.breezyweather.sources.veduris.json.VedurIsStationResult
import org.breezyweather.unit.pressure.Pressure.Companion.hectopascals
import org.json.JSONObject
import retrofit2.Retrofit
import java.text.SimpleDateFormat
@ -275,7 +276,7 @@ class VedurIsService @Inject constructor(
),
relativeHumidity = if (it.humidity != 0.0) it.humidity else null,
dewPoint = it.dewPoint,
pressure = it.pressure,
pressure = it.pressure?.hectopascals,
cloudCover = it.cloudCover?.toInt()
)
} ?: CurrentWrapper()

Some files were not shown because too many files have changed in this diff Show more