diff --git a/yagf/src/spellchecker.cpp b/yagf/src/spellchecker.cpp index 7ddcd22..d2c6dff 100644 --- a/yagf/src/spellchecker.cpp +++ b/yagf/src/spellchecker.cpp @@ -116,6 +116,7 @@ void SpellChecker::setLanguage(const QString &lang) delete_aspell_speller(spell_checker1); delete_aspell_speller(spell_checker2); + bad_language.clear(); m_lang2 = "en"; m_lang1 = m_map->value(lang, QString("en")); @@ -143,6 +144,13 @@ void SpellChecker::setLanguage(const QString &lang) spell_checker2 = to_aspell_speller(possible_err); else delete_aspell_can_have_error(possible_err); + + // Check absent dictionary + if (spell_checker1 == 0) + bad_language = m_lang1; + if (spell_checker2 == 0) + bad_language = m_lang2; + } bool SpellChecker::spellCheck() @@ -150,7 +158,7 @@ bool SpellChecker::spellCheck() if ((spell_checker1 == 0) || (spell_checker2 == 0)) { QPixmap icon; icon.load(":/warning.png"); - QMessageBox messageBox(QMessageBox::NoIcon, "YAGF", QObject::trUtf8("Required spelling dictionary is not found. Spell-checking is disabled.\n Try to install an appropriate aspell dictionary."), + QMessageBox messageBox(QMessageBox::NoIcon, "YAGF", QObject::trUtf8("Required spelling dictionary (%1) is not found.\nSpell-checking is disabled.\nTry to install an appropriate aspell dictionary.").arg(bad_language), QMessageBox::Ok, 0); messageBox.setIconPixmap(icon); messageBox.exec(); diff --git a/yagf/src/spellchecker.h b/yagf/src/spellchecker.h index c254400..1dfbe47 100644 --- a/yagf/src/spellchecker.h +++ b/yagf/src/spellchecker.h @@ -54,6 +54,7 @@ private: AspellSpeller *spell_checker1; AspellSpeller *spell_checker2; QStringList *dictList; + QString bad_language; }; #endif // SPELLCHECKER_H diff --git a/yagf/src/yagf_de.ts b/yagf/src/yagf_de.ts index 878b9b9..b934876 100644 --- a/yagf/src/yagf_de.ts +++ b/yagf/src/yagf_de.ts @@ -656,9 +656,10 @@ - - Required spelling dictionary is not found. Spell-checking is disabled. - Try to install an appropriate aspell dictionary. + + Required spelling dictionary (%1) is not found. +Spell-checking is disabled. +Try to install an appropriate aspell dictionary. diff --git a/yagf/src/yagf_lt.ts b/yagf/src/yagf_lt.ts index f78709b..3fab18c 100644 --- a/yagf/src/yagf_lt.ts +++ b/yagf/src/yagf_lt.ts @@ -656,9 +656,10 @@ - - Required spelling dictionary is not found. Spell-checking is disabled. - Try to install an appropriate aspell dictionary. + + Required spelling dictionary (%1) is not found. +Spell-checking is disabled. +Try to install an appropriate aspell dictionary. diff --git a/yagf/src/yagf_pl.ts b/yagf/src/yagf_pl.ts index a9ba955..ca47374 100644 --- a/yagf/src/yagf_pl.ts +++ b/yagf/src/yagf_pl.ts @@ -656,9 +656,10 @@ - - Required spelling dictionary is not found. Spell-checking is disabled. - Try to install an appropriate aspell dictionary. + + Required spelling dictionary (%1) is not found. +Spell-checking is disabled. +Try to install an appropriate aspell dictionary. diff --git a/yagf/src/yagf_ru.ts b/yagf/src/yagf_ru.ts index bc3a236..202d1fb 100644 --- a/yagf/src/yagf_ru.ts +++ b/yagf/src/yagf_ru.ts @@ -656,10 +656,12 @@ Не удалось сохранить файл - - Required spelling dictionary is not found. Spell-checking is disabled. - Try to install an appropriate aspell dictionary. - Требуемый орфогррафический словарь не найден. Проверка орфографии будет отключена. + + Required spelling dictionary (%1) is not found. +Spell-checking is disabled. +Try to install an appropriate aspell dictionary. + Требуемый орфографический словарь (%1) не найден. +Проверка орфографии будет отключена. Попробуйте установить соответствующий словарь aspell. diff --git a/yagf/src/yagf_uk.ts b/yagf/src/yagf_uk.ts index 1f70d65..bdb6f1f 100644 --- a/yagf/src/yagf_uk.ts +++ b/yagf/src/yagf_uk.ts @@ -657,9 +657,10 @@ Не вдалось зберегти зображення - - Required spelling dictionary is not found. Spell-checking is disabled. - Try to install an appropriate aspell dictionary. + + Required spelling dictionary (%1) is not found. +Spell-checking is disabled. +Try to install an appropriate aspell dictionary.