Browse Source

Show first day of the week in correct language

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Daniel Kesselberg 4 years ago
parent
commit
a7f4d54d0f
2 changed files with 7 additions and 7 deletions
  1. 3 1
      .eslintrc.js
  2. 4 6
      apps/settings/js/settings/personalInfo.js

+ 3 - 1
.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']
 }

+ 4 - 6
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;