[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:
NoelClick
2025-10-31 18:48:06 -07:00
committed by jeanbaptisteC
parent 83256c4895
commit 5b4fa55e83
2 changed files with 5 additions and 1 deletions

View File

@@ -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;

View File

@@ -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" -->