From 93f5f94698d9bd833bff854920a24313e57c0145 Mon Sep 17 00:00:00 2001 From: Aditoo17 Date: Sat, 2 Mar 2019 18:25:49 +0100 Subject: I18n: Add Czech translation --- src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index 2844194e..a3265e3a 100644 --- a/src/main.js +++ b/src/main.js @@ -30,8 +30,9 @@ const currentLocale = (window.navigator.language || 'en').split('-')[0] Vue.use(Vuex) Vue.use(VueRouter) Vue.use(VueTimeago, { - locale: currentLocale === 'ja' ? 'ja' : 'en', + locale: currentLocale === 'cs' ? 'cs' : currentLocale === 'ja' ? 'ja' : 'en', locales: { + 'cs': require('../static/timeago-cs.json'), 'en': require('../static/timeago-en.json'), 'ja': require('../static/timeago-ja.json') } -- cgit v1.2.3-70-g09d2 From 1387dfb889f8b59d7790cf794cb6498a0f308607 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 13 Mar 2019 11:29:45 +0100 Subject: Load persistedStated with async/await. --- src/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index a3265e3a..9ffc3727 100644 --- a/src/main.js +++ b/src/main.js @@ -53,9 +53,10 @@ const persistedStateOptions = { 'users.lastLoginName', 'oauth' ] -} +}; -createPersistedState(persistedStateOptions).then((persistedState) => { +(async () => { + const persistedState = await createPersistedState(persistedStateOptions) const store = new Vuex.Store({ modules: { interface: interfaceModule, @@ -75,7 +76,7 @@ createPersistedState(persistedStateOptions).then((persistedState) => { }) afterStoreSetup({ store, i18n }) -}) +})() // These are inlined by webpack's DefinePlugin /* eslint-disable */ -- cgit v1.2.3-70-g09d2