Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2021-12-09 10:48:03 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-12-10 12:47:35 +0300
commitac5385101cb780e7ac0938e433513e87afb46be3 (patch)
treeee5202e78df4811ef5a1c1f5c99087ed761e1e55 /apps/files_sharing
parent1fc27e771c05009a2066d4e82a41a951b6974117 (diff)
Properly format sharing datepicker locale
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/mixins/SharesMixin.js23
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js
index b4da09c1b1c..8fe6388e45b 100644
--- a/apps/files_sharing/src/mixins/SharesMixin.js
+++ b/apps/files_sharing/src/mixins/SharesMixin.js
@@ -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'),
},
}
},