we can now the language we want for speller. Just use speller_language advanced
option to define it.
This commit is contained in:
parent
6e5ce765d9
commit
dc9bf86184
|
@ -157,7 +157,10 @@ class ChatControlBase(MessageControl):
|
|||
# Attach speller
|
||||
if gajim.config.get('use_speller') and HAS_GTK_SPELL:
|
||||
try:
|
||||
gtkspell.Spell(self.msg_textview)
|
||||
spell = gtkspell.Spell(self.msg_textview)
|
||||
lang = gajim.config.get('speller_language')
|
||||
if lang:
|
||||
spell.set_language(lang)
|
||||
except gobject.GError, msg:
|
||||
#FIXME: add a ui for this use spell.set_language()
|
||||
dialogs.ErrorDialog(unicode(msg), _('If that is not your language '
|
||||
|
|
|
@ -80,6 +80,7 @@ class Config:
|
|||
'mergeaccounts': [ opt_bool, False, '', True ],
|
||||
'sort_by_show': [ opt_bool, True, '', True ],
|
||||
'use_speller': [ opt_bool, False, ],
|
||||
'speller_language': [ opt_str, '', _('Language used by speller')],
|
||||
'print_time': [ opt_str, 'always', _('\'always\' - print time for every message.\n\'sometimes\' - print time every print_ichat_every_foo_minutes minute.\n\'never\' - never print time.')],
|
||||
'print_time_fuzzy': [ opt_int, 0, _('Value of fuzziness from 1 to 4 or 0 to disable fuzzyclock. 1 is the most precise clock, 4 the less precise one.') ],
|
||||
'emoticons_theme': [opt_str, 'static', '', True ],
|
||||
|
|
|
@ -1298,10 +1298,13 @@ class SingleMessageWindow:
|
|||
|
||||
if gajim.config.get('use_speller') and HAS_GTK_SPELL and action == 'send':
|
||||
try:
|
||||
gtkspell.Spell(self.conversation_textview.tv)
|
||||
gtkspell.Spell(self.message_textview)
|
||||
spell1 = gtkspell.Spell(self.conversation_textview.tv)
|
||||
spell2 = gtkspell.Spell(self.message_textview)
|
||||
lang = gajim.config.get('speller_language')
|
||||
if lang:
|
||||
spell1.set_language(lang)
|
||||
spell2.set_language(lang)
|
||||
except gobject.GError, msg:
|
||||
#FIXME: add a ui for this use spell.set_language()
|
||||
ErrorDialog(unicode(msg), _('If that is not your language for which you want to highlight misspelled words, then please set your $LANG as appropriate. Eg. for French do export LANG=fr_FR or export LANG=fr_FR.UTF-8 in ~/.bash_profile or to make it global in /etc/profile.\n\nHighlighting misspelled words feature will not be used'))
|
||||
gajim.config.set('use_speller', False)
|
||||
|
||||
|
|
Loading…
Reference in New Issue