From 0ac87fe86d5251e6d9a378c66439eda1b9ddeeb0 Mon Sep 17 00:00:00 2001 From: Isaac Grynsztein Date: Fri, 20 Mar 2020 16:18:51 -0400 Subject: [PATCH] Updated spanish language string label to avoid confusion Fixed bug where if no locale was set, it would *not* default to English --- src/app/settings/locales_list.ts | 2 +- src/main.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/settings/locales_list.ts b/src/app/settings/locales_list.ts index 62ba078..cd69919 100644 --- a/src/app/settings/locales_list.ts +++ b/src/app/settings/locales_list.ts @@ -594,7 +594,7 @@ export const isoLangs = { }, 'es': { 'name': 'Spanish; Castilian', - 'nativeName': 'español, castellano' + 'nativeName': 'español' }, 'su': { 'name': 'Sundanese', diff --git a/src/main.ts b/src/main.ts index 77ff462..00f55c9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,6 +13,9 @@ if (environment.production) { } const locale = localStorage.getItem('locale'); +if (!locale) { + localStorage.setItem('locale', 'en'); +} if (locale && locale !== 'en') { getTranslations(`./assets/i18n/messages.${locale}.json`).then( (data: ParsedTranslationBundle) => {