diff --git a/package-lock.json b/package-lock.json index 25dc0fef8..89e12a636 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7332,9 +7332,9 @@ } }, "nextcloud-vue": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.12.2.tgz", - "integrity": "sha512-FMyDZ4PcXF2T0SQNXV13bncH/1v0bSe0t6dTwIOSaxiONknWjJEbuJSqwh1ZlcqzWSxFlIKvJn1/Jk2e/UO6aA==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/nextcloud-vue/-/nextcloud-vue-0.12.3.tgz", + "integrity": "sha512-qH0s1A9jgsbd9LU+icOIkQIcu9HoY8IW+ELUmP+HJvOdLAjAh3TtEz9ifsy+RcnUUOqASTveSEqxVmXDckwWeQ==", "requires": { "@babel/polyfill": "^7.4.4", "escape-html": "^1.0.3", diff --git a/package.json b/package.json index 56842a8fa..9698b9a77 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "nextcloud-dialogs": "0.0.3", "nextcloud-l10n": "0.1.0", "nextcloud-router": "0.0.9", - "nextcloud-vue": "^0.12.2", + "nextcloud-vue": "^0.12.3", "p-limit": "^2.2.1", "p-queue": "^6.1.1", "qr-image": "^3.2.0", diff --git a/src/components/Properties/PropertyDateTime.vue b/src/components/Properties/PropertyDateTime.vue index 83b1a314b..f93d10928 100644 --- a/src/components/Properties/PropertyDateTime.vue +++ b/src/components/Properties/PropertyDateTime.vue @@ -136,22 +136,26 @@ export default { let locale = getLocale().replace('_', '-').toLowerCase() // default load e.g. fr-fr - import('moment/locale/' + this.locale) + console.debug('Importing locale', locale) + import('moment/locale/' + locale) .then(e => { // force locale change to update // the component once done loading this.locale = locale }) .catch(e => { - // failure: fallback to fr - import('moment/locale/' + locale.split('-')[0]) - .then(e => { - this.locale = locale.split('-')[0] - }) - .catch(e => { - // failure, fallback to english - this.locale = 'en' - }) + // failure: fallback to fr + locale = locale.split('-')[0] + console.debug('Fallback to locale', locale) + import('moment/locale/' + locale) + .then(e => { + this.locale = locale + }) + .catch(e => { + console.debug('Fallback to locale', 'en') + // failure, fallback to english + this.locale = 'en' + }) }) },