fix showing "30 day" instead of "30 days" and giving our translators the chance to differentiate between them

This commit is contained in:
Frank Elsinga 2026-01-05 22:05:34 +01:00
parent f4f8019202
commit f230aecebd
3 changed files with 9 additions and 11 deletions

View File

@ -85,12 +85,12 @@ export default {
title() { title() {
if (this.type === "1y") { if (this.type === "1y") {
return `1${this.$t("-year")}`; return `1 ${this.$tc("year", 1)}`;
} }
if (this.type === "720") { if (this.type === "720") {
return `30${this.$t("-day")}`; return `30 ${this.$tc("day", 30)}`;
} }
return `24${this.$t("-hour")}`; return `24 ${this.$tc("hour", 24)}`;
} }
}, },
}; };

View File

@ -52,10 +52,8 @@
"now": "now", "now": "now",
"time ago": "{0} ago", "time ago": "{0} ago",
"day": "day | days", "day": "day | days",
"-day": "-day", "hour": "hour | hours",
"hour": "hour", "year": "year | years",
"-hour": "-hour",
"-year": "-year",
"Response": "Response", "Response": "Response",
"Ping": "Ping", "Ping": "Ping",
"Monitor Type": "Monitor Type", "Monitor Type": "Monitor Type",

View File

@ -237,7 +237,7 @@
> >
<h4 class="col-4 col-sm-12">{{ pingTitle(true) }}</h4> <h4 class="col-4 col-sm-12">{{ pingTitle(true) }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2"> <p class="col-4 col-sm-12 mb-0 mb-sm-2">
(24{{ $t("-hour") }}) ({{ 24 }} {{ $tc("hour", 24) }})
</p> </p>
<span class="col-4 col-sm-12 num"> <span class="col-4 col-sm-12 num">
<CountUp :value="avgPing" /> <CountUp :value="avgPing" />
@ -250,7 +250,7 @@
> >
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4> <h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2"> <p class="col-4 col-sm-12 mb-0 mb-sm-2">
(24{{ $t("-hour") }}) ({{ 24 }} {{ $tc("hour", 24) }})
</p> </p>
<span class="col-4 col-sm-12 num"> <span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="24" /> <Uptime :monitor="monitor" type="24" />
@ -263,7 +263,7 @@
> >
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4> <h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2"> <p class="col-4 col-sm-12 mb-0 mb-sm-2">
(30{{ $t("-day") }}) ({{ 30 }} {{ $tc("day", 30) }})
</p> </p>
<span class="col-4 col-sm-12 num"> <span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="720" /> <Uptime :monitor="monitor" type="720" />
@ -276,7 +276,7 @@
> >
<h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4> <h4 class="col-4 col-sm-12">{{ $t("Uptime") }}</h4>
<p class="col-4 col-sm-12 mb-0 mb-sm-2"> <p class="col-4 col-sm-12 mb-0 mb-sm-2">
(1{{ $t("-year") }}) ({{ 1 }} {{ $tc("year", 1) }})
</p> </p>
<span class="col-4 col-sm-12 num"> <span class="col-4 col-sm-12 num">
<Uptime :monitor="monitor" type="1y" /> <Uptime :monitor="monitor" type="1y" />