Added phrases for spellchecker.

This commit is contained in:
23rd 2019-10-18 18:13:51 +03:00 committed by John Preston
parent 4be178c75f
commit aa9dc2bee2
2 changed files with 9 additions and 0 deletions

View file

@ -1594,6 +1594,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_formatting_link_url" = "URL"; "lng_formatting_link_url" = "URL";
"lng_formatting_link_create" = "Create"; "lng_formatting_link_create" = "Create";
"lng_spellchecker_add" = "Add to Dictionary";
"lng_spellchecker_remove" = "Remove from Dictionary";
"lng_spellchecker_ignore" = "Ignore word";
"lng_full_name" = "{first_name} {last_name}"; "lng_full_name" = "{first_name} {last_name}";
"lng_confirm_phone_link_invalid" = "This link is broken or has expired."; "lng_confirm_phone_link_invalid" = "This link is broken or has expired.";

View file

@ -282,6 +282,11 @@ base::unique_qptr<Spellchecker::SpellingHighlighter> InitSpellchecker(
field->rawTextEdit(), field->rawTextEdit(),
session->settings().spellcheckerEnabledValue(), session->settings().spellcheckerEnabledValue(),
field->documentContentsChanges()); field->documentContentsChanges());
Spellchecker::SetPhrases({ {
{ &ph::lng_spellchecker_add, tr::lng_spellchecker_add() },
{ &ph::lng_spellchecker_remove, tr::lng_spellchecker_remove() },
{ &ph::lng_spellchecker_ignore, tr::lng_spellchecker_ignore() },
} });
field->setExtendedContextMenu(s->contextMenuCreated()); field->setExtendedContextMenu(s->contextMenuCreated());
return s; return s;
} }