mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android] Use compact min unit for short opening-hours label
* Replace "minutes" plural with new "minutes_short" (`%d min`) for concise display on the place page. Signed-off-by: NoelClick <dev@noel.click> (cherry picked from commit 5468927a285466a5c5614328a4400abb5182d302) Signed-off-by: NoelClick <dev@noel.click>
This commit is contained in:
@@ -840,7 +840,7 @@ public class PlacePageView extends Fragment
|
|||||||
if (minsToNextState <= 60 && minsToNextState >= 0) // POI Opens/Closes in 60 mins • at 18:00
|
if (minsToNextState <= 60 && minsToNextState >= 0) // POI Opens/Closes in 60 mins • at 18:00
|
||||||
{
|
{
|
||||||
final String minsToChangeStr = getResources().getQuantityString(
|
final String minsToChangeStr = getResources().getQuantityString(
|
||||||
R.plurals.minutes, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||||
final String nextChangeFormatted = getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
final String nextChangeFormatted = getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||||
final ForegroundColorSpan nextChangeColor = isOpen ? colorYellow : colorRed;
|
final ForegroundColorSpan nextChangeColor = isOpen ? colorYellow : colorRed;
|
||||||
|
|
||||||
|
|||||||
@@ -449,6 +449,10 @@
|
|||||||
<item quantity="one">%d minute</item>
|
<item quantity="one">%d minute</item>
|
||||||
<item quantity="other">%d minutes</item>
|
<item quantity="other">%d minutes</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
<plurals name="minutes_short">
|
||||||
|
<item quantity="one">%d min</item>
|
||||||
|
<item quantity="other">%d min</item>
|
||||||
|
</plurals>
|
||||||
<!-- Used in the opening_hours fragment for the last checked date, eg. "Confirmed two weeks ago" -->
|
<!-- Used in the opening_hours fragment for the last checked date, eg. "Confirmed two weeks ago" -->
|
||||||
<string name="hours_confirmed_time_ago">Confirmed %s</string>
|
<string name="hours_confirmed_time_ago">Confirmed %s</string>
|
||||||
<!-- Used on the place page for the last checked date, eg. "Existence confirmed two weeks ago" -->
|
<!-- Used on the place page for the last checked date, eg. "Existence confirmed two weeks ago" -->
|
||||||
|
|||||||
Reference in New Issue
Block a user