aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/EditSettingsScreen.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-07 20:25:42 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-07 20:25:42 +0100
commitbaf7d60af40e9cc3ce5403c5e109331098d5e1d6 (patch)
tree1973e6304b04088dc6ff9324b7e73fb52c400c9e /src/containers/settings/EditSettingsScreen.js
parentUpdate package-lock.json (diff)
downloadferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.tar.gz
ferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.tar.zst
ferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.zip
feat(Service): Add option to change spellchecking language by service
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r--src/containers/settings/EditSettingsScreen.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index ea1d319d9..350bd9f8a 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -12,6 +12,8 @@ import { gaPage } from '../../lib/analytics';
12import { DEFAULT_APP_SETTINGS } from '../../config'; 12import { DEFAULT_APP_SETTINGS } from '../../config';
13import { config as spellcheckerConfig } from '../../features/spellchecker'; 13import { config as spellcheckerConfig } from '../../features/spellchecker';
14 14
15import { getSelectOptions } from '../../helpers/i18n-helpers';
16
15 17
16import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; 18import EditSettingsForm from '../../components/settings/settings/EditSettingsForm';
17 19
@@ -116,20 +118,12 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
116 const { app, settings, user } = this.props.stores; 118 const { app, settings, user } = this.props.stores;
117 const { intl } = this.context; 119 const { intl } = this.context;
118 120
119 const locales = []; 121 const locales = getSelectOptions({
120 Object.keys(APP_LOCALES).sort(Intl.Collator().compare).forEach((key) => { 122 locales: APP_LOCALES,
121 locales.push({
122 value: key,
123 label: APP_LOCALES[key],
124 });
125 }); 123 });
126 124
127 const spellcheckingLanguages = []; 125 const spellcheckingLanguages = getSelectOptions({
128 Object.keys(SPELLCHECKER_LOCALES).sort(Intl.Collator().compare).forEach((key) => { 126 locales: SPELLCHECKER_LOCALES,
129 spellcheckingLanguages.push({
130 value: key,
131 label: SPELLCHECKER_LOCALES[key],
132 });
133 }); 127 });
134 128
135 const config = { 129 const config = {