From a7f4d54d0f3651c756d627de7ccbf9c0d74b6e8b Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sat, 26 Oct 2019 14:31:38 +0200 Subject: [PATCH] Show first day of the week in correct language Signed-off-by: Daniel Kesselberg --- .eslintrc.js | 4 +++- apps/settings/js/settings/personalInfo.js | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index b86372955e4..be6da20033a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,9 @@ module.exports = { $: true, moment: true, escapeHTML: true, - oc_userconfig: true + oc_userconfig: true, + dayNames: true, + firstDay: true }, extends: ['nextcloud'] } diff --git a/apps/settings/js/settings/personalInfo.js b/apps/settings/js/settings/personalInfo.js index 454374b303d..9a683b30c00 100644 --- a/apps/settings/js/settings/personalInfo.js +++ b/apps/settings/js/settings/personalInfo.js @@ -369,11 +369,9 @@ $(document).ready(function () { }); window.setInterval(function() { - $('#localeexample-time').text(moment().format('LTS')); - $('#localeexample-date').text(moment().format('L')); - $('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}', - {fdow: moment().weekday(0).format('dddd')})); - -}, 1000); + $('#localeexample-time').text(moment().format('LTS')) + $('#localeexample-date').text(moment().format('L')) + $('#localeexample-fdow').text(t('settings', 'Week starts on {fdow}', { fdow: dayNames[firstDay] })) +}, 1000) OC.Settings.updateAvatar = updateAvatar; -- 2.39.5