From f054365a4644cbee2030cefcc2987a66e17cbffb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 11 Jun 2018 09:37:29 -0400 Subject: [PATCH] cache tag --- src/app/services/services.module.ts | 1 - src/services/i18n.service.ts | 3 ++- webpack.config.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index a002c1dcbf..aee029c98f 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -119,7 +119,6 @@ export function initFactory(): Function { await i18nService.init(locale); await authService.init(); const htmlEl = window.document.documentElement; - htmlEl.classList.add('os_' + platformUtilsService.getDeviceString()); htmlEl.classList.add('locale_' + i18nService.translationLocale); let theme = await storageService.get(ConstantsService.themeKey); if (theme == null) { diff --git a/src/services/i18n.service.ts b/src/services/i18n.service.ts index b94183473d..6043cf3bad 100644 --- a/src/services/i18n.service.ts +++ b/src/services/i18n.service.ts @@ -3,7 +3,8 @@ import { I18nService as BaseI18nService } from 'jslib/services/i18n.service'; export class I18nService extends BaseI18nService { constructor(systemLanguage: string, localesDirectory: string) { super(systemLanguage, localesDirectory, async (formattedLocale: string) => { - const filePath = this.localesDirectory + '/' + formattedLocale + '/messages.json'; + const filePath = this.localesDirectory + '/' + formattedLocale + '/messages.json?cache=' + + process.env.CACHE_TAG; const localesResult = await fetch(filePath); const locales = await localesResult.json(); return locales; diff --git a/webpack.config.js b/webpack.config.js index 7ae42be275..15679d50af 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -105,6 +105,7 @@ const plugins = [ 'process.env': { 'ENV': JSON.stringify(ENV), 'APPLICATION_VERSION': JSON.stringify(pjson.version), + 'CACHE_TAG': JSON.stringify(Math.random().toString(36).substring(7)), } }), ];