Cleanup and fix an i18n bug

This commit is contained in:
root
2022-02-08 00:21:47 +05:30
parent 3eff080189
commit 9b035ce58b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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'