@@ -7,7 +7,7 @@ import AppStore from '../../stores/AppStore';
77import SettingsStore from '../../stores/SettingsStore' ;
88import UserStore from '../../stores/UserStore' ;
99import Form from '../../lib/Form' ;
10- import { APP_LOCALES } from '../../i18n/languages' ;
10+ import { APP_LOCALES , SPELLCHECKER_LOCALES } from '../../i18n/languages' ;
1111import { gaPage } from '../../lib/analytics' ;
1212import { DEFAULT_APP_SETTINGS } from '../../config' ;
1313import { config as spellcheckerConfig } from '../../features/spellchecker' ;
@@ -60,8 +60,8 @@ const messages = defineMessages({
6060 id : 'settings.app.form.enableGPUAcceleration' ,
6161 defaultMessage : '!!!Enable GPU Acceleration' ,
6262 } ,
63- spellcheckingLanguage : {
64- id : 'settings.app.form.spellcheckingLanguage ' ,
63+ spellcheckerLanguage : {
64+ id : 'settings.app.form.spellcheckerLanguage ' ,
6565 defaultMessage : '!!!Language for spell checking' ,
6666 } ,
6767 beta : {
@@ -98,6 +98,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
9898 darkMode : settingsData . darkMode ,
9999 showMessageBadgeWhenMuted : settingsData . showMessageBadgeWhenMuted ,
100100 enableSpellchecking : settingsData . enableSpellchecking ,
101+ spellcheckerLanguage : settingsData . spellcheckerLanguage ,
101102 beta : settingsData . beta , // we need this info in the main process as well
102103 locale : settingsData . locale , // we need this info in the main process as well
103104 } ,
@@ -123,6 +124,14 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
123124 } ) ;
124125 } ) ;
125126
127+ const spellcheckingLanguages = [ ] ;
128+ Object . keys ( SPELLCHECKER_LOCALES ) . sort ( Intl . Collator ( ) . compare ) . forEach ( ( key ) => {
129+ spellcheckingLanguages . push ( {
130+ value : key ,
131+ label : SPELLCHECKER_LOCALES [ key ] ,
132+ } ) ;
133+ } ) ;
134+
126135 const config = {
127136 fields : {
128137 autoLaunchOnStart : {
@@ -165,6 +174,12 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e
165174 value : ! this . props . stores . user . data . isPremium && spellcheckerConfig . isPremiumFeature ? false : settings . all . app . enableSpellchecking ,
166175 default : ! this . props . stores . user . data . isPremium && spellcheckerConfig . isPremiumFeature ? false : DEFAULT_APP_SETTINGS . enableSpellchecking ,
167176 } ,
177+ spellcheckerLanguage : {
178+ label : intl . formatMessage ( messages . spellcheckerLanguage ) ,
179+ value : settings . all . app . spellcheckerLanguage ,
180+ options : spellcheckingLanguages ,
181+ default : DEFAULT_APP_SETTINGS . spellcheckerLanguage ,
182+ } ,
168183 darkMode : {
169184 label : intl . formatMessage ( messages . darkMode ) ,
170185 value : settings . all . app . darkMode ,
0 commit comments