aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/settings/EditSettingsScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r--src/containers/settings/EditSettingsScreen.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js
index f1706a721..992c49b09 100644
--- a/src/containers/settings/EditSettingsScreen.js
+++ b/src/containers/settings/EditSettingsScreen.js
@@ -14,10 +14,11 @@ import { config as spellcheckerConfig } from '../../features/spellchecker';
14 14
15import { getSelectOptions } from '../../helpers/i18n-helpers'; 15import { getSelectOptions } from '../../helpers/i18n-helpers';
16 16
17
18import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; 17import EditSettingsForm from '../../components/settings/settings/EditSettingsForm';
19import ErrorBoundary from '../../components/util/ErrorBoundary'; 18import ErrorBoundary from '../../components/util/ErrorBoundary';
20 19
20import globalMessages from '../../i18n/globalMessages';
21
21const messages = defineMessages({ 22const messages = defineMessages({
22 autoLaunchOnStart: { 23 autoLaunchOnStart: {
23 id: 'settings.app.form.autoLaunchOnStart', 24 id: 'settings.app.form.autoLaunchOnStart',
@@ -63,10 +64,6 @@ const messages = defineMessages({
63 id: 'settings.app.form.enableGPUAcceleration', 64 id: 'settings.app.form.enableGPUAcceleration',
64 defaultMessage: '!!!Enable GPU Acceleration', 65 defaultMessage: '!!!Enable GPU Acceleration',
65 }, 66 },
66 spellcheckerLanguage: {
67 id: 'settings.app.form.spellcheckerLanguage',
68 defaultMessage: '!!!Language for spell checking',
69 },
70 beta: { 67 beta: {
71 id: 'settings.app.form.beta', 68 id: 'settings.app.form.beta',
72 defaultMessage: '!!!Include beta versions', 69 defaultMessage: '!!!Include beta versions',
@@ -125,6 +122,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
125 122
126 const spellcheckingLanguages = getSelectOptions({ 123 const spellcheckingLanguages = getSelectOptions({
127 locales: SPELLCHECKER_LOCALES, 124 locales: SPELLCHECKER_LOCALES,
125 automaticDetectionText: this.context.intl.formatMessage(globalMessages.spellcheckerAutomaticDetection),
128 }); 126 });
129 127
130 const config = { 128 const config = {
@@ -166,11 +164,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
166 }, 164 },
167 enableSpellchecking: { 165 enableSpellchecking: {
168 label: intl.formatMessage(messages.enableSpellchecking), 166 label: intl.formatMessage(messages.enableSpellchecking),
169 value: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremiumFeature ? false : settings.all.app.enableSpellchecking, 167 value: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremium ? false : settings.all.app.enableSpellchecking,
170 default: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremiumFeature ? false : DEFAULT_APP_SETTINGS.enableSpellchecking, 168 default: !this.props.stores.user.data.isPremium && spellcheckerConfig.isPremium ? false : DEFAULT_APP_SETTINGS.enableSpellchecking,
171 }, 169 },
172 spellcheckerLanguage: { 170 spellcheckerLanguage: {
173 label: intl.formatMessage(messages.spellcheckerLanguage), 171 label: intl.formatMessage(globalMessages.spellcheckerLanguage),
174 value: settings.all.app.spellcheckerLanguage, 172 value: settings.all.app.spellcheckerLanguage,
175 options: spellcheckingLanguages, 173 options: spellcheckingLanguages,
176 default: DEFAULT_APP_SETTINGS.spellcheckerLanguage, 174 default: DEFAULT_APP_SETTINGS.spellcheckerLanguage,
@@ -230,7 +228,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
230 cacheSize={cacheSize} 228 cacheSize={cacheSize}
231 isClearingAllCache={isClearingAllCache} 229 isClearingAllCache={isClearingAllCache}
232 onClearAllCache={clearAllCache} 230 onClearAllCache={clearAllCache}
233 isSpellcheckerPremiumFeature={spellcheckerConfig.isPremiumFeature} 231 isSpellcheckerPremiumFeature={spellcheckerConfig.isPremium}
234 /> 232 />
235 </ErrorBoundary> 233 </ErrorBoundary>
236 ); 234 );