aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-12-11 10:40:08 +0100
committerLibravatar GitHub <noreply@github.com>2017-12-11 10:40:08 +0100
commit2624fa16900651665a4e62315985c08c52dcf147 (patch)
treefb6599dbceec795dbf8fafde804f422e2ee95631 /src
parentfix missing webview wrapper class (diff)
parentfix(Translations): Re-add Spanish to available languages. (diff)
downloadferdium-app-2624fa16900651665a4e62315985c08c52dcf147.tar.gz
ferdium-app-2624fa16900651665a4e62315985c08c52dcf147.tar.zst
ferdium-app-2624fa16900651665a4e62315985c08c52dcf147.zip
Merge pull request #421 from meetfranz/feature/bugfixing
[PR] General bugfixing
Diffstat (limited to 'src')
-rw-r--r--src/config.js3
-rw-r--r--src/i18n/languages.js1
-rw-r--r--src/stores/AppStore.js8
-rw-r--r--src/styles/services.scss1
4 files changed, 11 insertions, 2 deletions
diff --git a/src/config.js b/src/config.js
index e6d8958e6..e66594c59 100644
--- a/src/config.js
+++ b/src/config.js
@@ -14,7 +14,8 @@ export const DEFAULT_APP_SETTINGS = {
14 showMessageBadgeWhenMuted: true, 14 showMessageBadgeWhenMuted: true,
15 enableSpellchecking: true, 15 enableSpellchecking: true,
16 // spellcheckingLanguage: 'auto', 16 // spellcheckingLanguage: 'auto',
17 locale: 'en-US', 17 locale: '',
18 fallbackLocale: 'en-US',
18 beta: false, 19 beta: false,
19 isAppMuted: false, 20 isAppMuted: false,
20}; 21};
diff --git a/src/i18n/languages.js b/src/i18n/languages.js
index 677b09405..f32c345af 100644
--- a/src/i18n/languages.js
+++ b/src/i18n/languages.js
@@ -4,6 +4,7 @@ export const APP_LOCALES = {
4 'zh-HANT': 'Chinese (Traditional)', 4 'zh-HANT': 'Chinese (Traditional)',
5 cs: 'Czech', 5 cs: 'Czech',
6 nl: 'Dutch', 6 nl: 'Dutch',
7 es: 'Spanish',
7 fr: 'French', 8 fr: 'French',
8 ka: 'Georgian', 9 ka: 'Georgian',
9 de: 'German', 10 de: 'German',
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 3e6d4d288..5a6c12ee1 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -263,8 +263,10 @@ export default class AppStore extends Store {
263 _setLocale() { 263 _setLocale() {
264 const locale = this.stores.settings.all.locale; 264 const locale = this.stores.settings.all.locale;
265 265
266 if (locale && locale !== this.locale) { 266 if (locale && Object.prototype.hasOwnProperty.call(locales, locale) && locale !== this.locale) {
267 this.locale = locale; 267 this.locale = locale;
268 } else if (!locale) {
269 this.locale = this._getDefaultLocale();
268 } 270 }
269 } 271 }
270 272
@@ -289,6 +291,10 @@ export default class AppStore extends Store {
289 locale = defaultLocale; 291 locale = defaultLocale;
290 } 292 }
291 293
294 if (!locale) {
295 locale = DEFAULT_APP_SETTINGS.fallbackLocale;
296 }
297
292 return locale; 298 return locale;
293 } 299 }
294 300
diff --git a/src/styles/services.scss b/src/styles/services.scss
index 282c15121..9f6cfc772 100644
--- a/src/styles/services.scss
+++ b/src/styles/services.scss
@@ -24,6 +24,7 @@
24 display: inline-flex; 24 display: inline-flex;
25 width: 0px; 25 width: 0px;
26 height: 0px; 26 height: 0px;
27 background: $theme-gray-lighter;
27 } 28 }
28 29
29 &.is-active { 30 &.is-active {