mirror of
https://github.com/breezy-weather/breezy-weather.git
synced 2025-12-07 13:50:05 +00:00
Fix #2395 - Rename "Normal" pressure as "Standard"
This commit is contained in:
parent
4a18f24cd6
commit
1644228571
5 changed files with 13 additions and 11 deletions
|
|
@ -233,13 +233,13 @@ private fun PressureChart(
|
|||
val chartStep = pressureUnit.chartStep
|
||||
val maxY = remember(mappedValues) {
|
||||
max(
|
||||
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) + chartStep.times(1.6),
|
||||
PressureUnit.STANDARD.pascals.toDouble(pressureUnit) + chartStep.times(1.6),
|
||||
mappedValues.values.maxOf { it.toDouble(pressureUnit) }
|
||||
).roundUpToNearestMultiplier(chartStep)
|
||||
}
|
||||
val minY = remember(mappedValues) {
|
||||
min(
|
||||
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) - chartStep.times(1.6),
|
||||
PressureUnit.STANDARD.pascals.toDouble(pressureUnit) - chartStep.times(1.6),
|
||||
mappedValues.values.minOf { it.toDouble(pressureUnit) }
|
||||
).roundDownToNearestMultiplier(chartStep)
|
||||
}
|
||||
|
|
@ -291,8 +291,8 @@ private fun PressureChart(
|
|||
)
|
||||
},
|
||||
trendHorizontalLines = persistentMapOf(
|
||||
PressureUnit.NORMAL.pascals.toDouble(pressureUnit) to
|
||||
context.getString(R.string.temperature_normal_short)
|
||||
PressureUnit.STANDARD.pascals.toDouble(pressureUnit) to
|
||||
context.getString(R.string.pressure_standard)
|
||||
),
|
||||
minY = minY,
|
||||
topAxisValueFormatter = { _, value, _ ->
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ class HourlyPressureAdapter(
|
|||
i += 2
|
||||
}
|
||||
}
|
||||
mHighestPressure = PressureUnit.NORMAL.toFloat()
|
||||
mLowestPressure = PressureUnit.NORMAL.toFloat()
|
||||
mHighestPressure = PressureUnit.STANDARD.toFloat()
|
||||
mLowestPressure = PressureUnit.STANDARD.toFloat()
|
||||
weather.nextHourlyForecast
|
||||
.forEach { hourly ->
|
||||
hourly.pressure?.value?.let {
|
||||
|
|
@ -185,7 +185,7 @@ class HourlyPressureAdapter(
|
|||
override fun isValid(location: Location): Boolean {
|
||||
return mHighestPressure != null &&
|
||||
mLowestPressure != null &&
|
||||
(mHighestPressure != PressureUnit.NORMAL.toFloat() || mLowestPressure != PressureUnit.NORMAL.toFloat())
|
||||
(mHighestPressure != PressureUnit.STANDARD.toFloat() || mLowestPressure != PressureUnit.STANDARD.toFloat())
|
||||
}
|
||||
|
||||
override fun getDisplayName(context: Context) = context.getString(R.string.tag_pressure)
|
||||
|
|
@ -194,9 +194,9 @@ class HourlyPressureAdapter(
|
|||
val keyLineList = mutableListOf<TrendRecyclerView.KeyLine>()
|
||||
keyLineList.add(
|
||||
TrendRecyclerView.KeyLine(
|
||||
PressureUnit.NORMAL.toFloat(),
|
||||
PressureUnit.NORMAL.pascals.formatValue(activity, UnitWidth.NARROW),
|
||||
activity.getString(R.string.temperature_normal_short),
|
||||
PressureUnit.STANDARD.toFloat(),
|
||||
PressureUnit.STANDARD.pascals.formatValue(activity, UnitWidth.NARROW),
|
||||
activity.getString(R.string.pressure_standard),
|
||||
TrendRecyclerView.KeyLine.ContentPosition.ABOVE_LINE
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@
|
|||
<string name="pressure_rising">En hausse</string>
|
||||
<string name="pressure_steady">Stable</string>
|
||||
<string name="pressure_falling">En baisse</string>
|
||||
<string name="pressure_standard">Normale</string>
|
||||
<string name="pressure_about">À propos de la pression</string>
|
||||
<string name="pressure_about_description1">La pression atmosphérique est la pression exercée par l’atmosphère terrestre. Cette appli utilise la pression moyenne au niveau de la mer pour faciliter la comparaison de pression d’emplacements situés à des altitudes différentes.</string>
|
||||
<string name="pressure_about_description2">Les variations importantes et rapides de la pression sont utilisées pour prévoir les changements météorologiques. Par exemple, une baisse de pression peut signifier que de la pluie ou de la neige se prépare, et une hausse de pression peut signifier que le temps va s’améliorer. Une pression atmosphérique anormale peut provoquer, entre autres, des maux de tête, des douleurs articulaires et de la fatigue.</string>
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@
|
|||
<string name="pressure_average" translatable="false">@string/chart_average</string>
|
||||
<string name="pressure_rising">Rising</string>
|
||||
<string name="pressure_steady">Steady</string>
|
||||
<string name="pressure_standard">Standard</string>
|
||||
<string name="pressure_falling">Falling</string>
|
||||
<string name="pressure_about">About pressure</string>
|
||||
<!-- If there is no acronym MSLP in your language, just skip the parenthesis in the translation -->
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ enum class PressureUnit(
|
|||
|
||||
companion object {
|
||||
|
||||
const val NORMAL = 101325
|
||||
const val STANDARD = 101325
|
||||
|
||||
/**
|
||||
* Copyright © 1991-Present Unicode, Inc.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue