Skip to content

Commit a7f4d54

Browse files
committed
Show first day of the week in correct language
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent 459e716 commit a7f4d54

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ module.exports = {
66
$: true,
77
moment: true,
88
escapeHTML: true,
9-
oc_userconfig: true
9+
oc_userconfig: true,
10+
dayNames: true,
11+
firstDay: true
1012
},
1113
extends: ['nextcloud']
1214
}

apps/settings/js/settings/personalInfo.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,9 @@ $(document).ready(function () {
369369
});
370370

371371
window.setInterval(function() {
372-
$('#localeexample-time').text(moment().format('LTS'));
373-
$('#localeexample-date').text(moment().format('L'));
374-
$('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}',
375-
{fdow: moment().weekday(0).format('dddd')}));
376-
377-
}, 1000);
372+
$('#localeexample-time').text(moment().format('LTS'))
373+
$('#localeexample-date').text(moment().format('L'))
374+
$('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}', { fdow: dayNames[firstDay] }))
375+
}, 1000)
378376

379377
OC.Settings.updateAvatar = updateAvatar;

0 commit comments

Comments
 (0)