mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Properly format sharing datepicker locale
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
a1d68c0fd6
commit
2239047927
3 changed files with 17 additions and 10 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -122,17 +122,24 @@ export default {
|
|||
? window.firstDay
|
||||
: 0 // sunday as default
|
||||
},
|
||||
|
||||
// Datepicker language
|
||||
lang() {
|
||||
// fallback to default in case of unavailable data
|
||||
const weekdaysShort = window.dayNamesShort
|
||||
? window.dayNamesShort // provided by nextcloud
|
||||
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.']
|
||||
const monthsShort = window.monthNamesShort
|
||||
? window.monthNamesShort // provided by nextcloud
|
||||
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.']
|
||||
|
||||
return {
|
||||
days: window.dayNamesShort
|
||||
? window.dayNamesShort // provided by nextcloud
|
||||
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
|
||||
months: window.monthNamesShort
|
||||
? window.monthNamesShort // provided by nextcloud
|
||||
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'],
|
||||
formatLocale: {
|
||||
weekdaysMin: weekdaysShort,
|
||||
weekdaysShort,
|
||||
monthsShort,
|
||||
},
|
||||
placeholder: {
|
||||
date: 'Select Date', // TODO: Translate
|
||||
date: t('files_sharing', 'Select Date'),
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue