mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: relative-time-picker should use pluralized strings (#12086)
This commit is contained in:
parent
467b075ef7
commit
f71ff2c34b
@ -36,13 +36,27 @@ export default Component.extend({
|
||||
}
|
||||
},
|
||||
|
||||
@discourseComputed
|
||||
intervals() {
|
||||
@discourseComputed("duration")
|
||||
intervals(duration) {
|
||||
const count = duration ? parseFloat(duration) : 0;
|
||||
|
||||
return [
|
||||
{ id: "mins", name: I18n.t("relative_time_picker.minutes") },
|
||||
{ id: "hours", name: I18n.t("relative_time_picker.hours") },
|
||||
{ id: "days", name: I18n.t("relative_time_picker.days") },
|
||||
{ id: "months", name: I18n.t("relative_time_picker.months") },
|
||||
{
|
||||
id: "mins",
|
||||
name: I18n.t("relative_time_picker.minutes", { count }),
|
||||
},
|
||||
{
|
||||
id: "hours",
|
||||
name: I18n.t("relative_time_picker.hours", { count }),
|
||||
},
|
||||
{
|
||||
id: "days",
|
||||
name: I18n.t("relative_time_picker.days", { count }),
|
||||
},
|
||||
{
|
||||
id: "months",
|
||||
name: I18n.t("relative_time_picker.months", { count }),
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
|
@ -576,10 +576,18 @@ en:
|
||||
send_email: "Send rejection email"
|
||||
|
||||
relative_time_picker:
|
||||
minutes: "minute(s)"
|
||||
hours: "hour(s)"
|
||||
days: "day(s)"
|
||||
months: "month(s)"
|
||||
minutes:
|
||||
one: "minute"
|
||||
other: "minutes"
|
||||
hours:
|
||||
one: "hour"
|
||||
other: "hours"
|
||||
days:
|
||||
one: "day"
|
||||
other: "days"
|
||||
months:
|
||||
one: "month"
|
||||
other: "months"
|
||||
|
||||
time_shortcut:
|
||||
later_today: "Later today"
|
||||
|
Loading…
Reference in New Issue
Block a user