mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 09:12:45 +08:00
UX: Use i18n for date picker
This commit is contained in:
parent
89add4a4a2
commit
f7eb7f25bd
|
@ -17,6 +17,14 @@ export default Em.Component.extend({
|
||||||
format: "YYYY-MM-DD",
|
format: "YYYY-MM-DD",
|
||||||
defaultDate: moment().add(1, "day").toDate(),
|
defaultDate: moment().add(1, "day").toDate(),
|
||||||
minDate: new Date(),
|
minDate: new Date(),
|
||||||
|
firstDay: moment.localeData().firstDayOfWeek(),
|
||||||
|
i18n: {
|
||||||
|
previousMonth: I18n.t('dates.previous_month'),
|
||||||
|
nextMonth: I18n.t('dates.next_month'),
|
||||||
|
months: moment.months(),
|
||||||
|
weekdays: moment.weekdays(),
|
||||||
|
weekdaysShort: moment.weekdaysShort()
|
||||||
|
},
|
||||||
onSelect: date => this.set("value", moment(date).format("YYYY-MM-DD"))
|
onSelect: date => this.set("value", moment(date).format("YYYY-MM-DD"))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -109,6 +109,8 @@ en:
|
||||||
x_years:
|
x_years:
|
||||||
one: "1 year later"
|
one: "1 year later"
|
||||||
other: "%{count} years later"
|
other: "%{count} years later"
|
||||||
|
previous_month: 'Previous Month'
|
||||||
|
next_month: 'Next Month'
|
||||||
share:
|
share:
|
||||||
topic: 'share a link to this topic'
|
topic: 'share a link to this topic'
|
||||||
post: 'post #%{postNumber}'
|
post: 'post #%{postNumber}'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user