From 9b035ce58be9f15d51c675b5f762a004f720dbde Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Feb 2022 00:21:47 +0530 Subject: [PATCH] Cleanup and fix an i18n bug --- src/plugins/i18n.js | 2 +- src/store/i18n-store.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/i18n.js b/src/plugins/i18n.js index 2600750..8845b45 100644 --- a/src/plugins/i18n.js +++ b/src/plugins/i18n.js @@ -97,7 +97,7 @@ async function loadFormatting (locale) { const tal = TIME_AGO_EXCEPTIONS[locale] || locale const data = await import(/* webpackChunkName: "timeago-[request]" */ `javascript-time-ago/locale/${tal}.json`) TimeAgo.addLocale(data) - const timeAgo = new TimeAgo(locale) + const timeAgo = new TimeAgo(tal) store.commit('i18n/updateState', { intlLocale: locale, diff --git a/src/store/i18n-store.js b/src/store/i18n-store.js index fe1c04d..2367ed6 100644 --- a/src/store/i18n-store.js +++ b/src/store/i18n-store.js @@ -8,7 +8,7 @@ export const i18nStore = { }), mutations: { - updateState (state, { intlLocale, NF, timeAgo }) { + updateState (state, { intlLocale, timeAgo }) { state.fullFormatter = new Intl.DateTimeFormat(window.localStorage.getItem('DTF_OVERRIDE') || intlLocale, { dateStyle: 'full', timeStyle: 'full'