diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 9899731a2..02c23cbb8 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1616,6 +1616,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_formatting_link_url" = "URL"; "lng_formatting_link_create" = "Create"; +"lng_spellchecker_submenu" = "Spelling"; "lng_spellchecker_add" = "Add to Dictionary"; "lng_spellchecker_remove" = "Remove from Dictionary"; "lng_spellchecker_ignore" = "Ignore word"; diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index 1bd0b447b..215932831 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -282,7 +282,11 @@ void InitSpellchecker( #ifndef TDESKTOP_DISABLE_SPELLCHECK const auto s = Ui::CreateChild( field.get(), - session->settings().spellcheckerEnabledValue()); + session->settings().spellcheckerEnabledValue(), + Spellchecker::SpellingHighlighter::CustomContextMenuItem{ + tr::lng_settings_manage_dictionaries(tr::now), + [=] { Ui::show(Box(session)); } + }); field->setExtendedContextMenu(s->contextMenuCreated()); #endif // TDESKTOP_DISABLE_SPELLCHECK } diff --git a/Telegram/SourceFiles/chat_helpers/message_field.h b/Telegram/SourceFiles/chat_helpers/message_field.h index 8f95a9323..812ca859b 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.h +++ b/Telegram/SourceFiles/chat_helpers/message_field.h @@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/qt_connection.h" #ifndef TDESKTOP_DISABLE_SPELLCHECK +#include "boxes/dictionaries_manager.h" #include "spellcheck/spelling_highlighter.h" #endif // TDESKTOP_DISABLE_SPELLCHECK diff --git a/Telegram/SourceFiles/chat_helpers/spellchecker_common.cpp b/Telegram/SourceFiles/chat_helpers/spellchecker_common.cpp index 70f5aac44..ee4b0d7c6 100644 --- a/Telegram/SourceFiles/chat_helpers/spellchecker_common.cpp +++ b/Telegram/SourceFiles/chat_helpers/spellchecker_common.cpp @@ -355,6 +355,7 @@ std::vector DefaultLanguages() { void Start(not_null session) { Spellchecker::SetPhrases({ { + { &ph::lng_spellchecker_submenu, tr::lng_spellchecker_submenu() }, { &ph::lng_spellchecker_add, tr::lng_spellchecker_add() }, { &ph::lng_spellchecker_remove, tr::lng_spellchecker_remove() }, { &ph::lng_spellchecker_ignore, tr::lng_spellchecker_ignore() },