Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37809872
en ru br
Репозитории ALT
5.1: 0.8.6-alt2.M51.1
4.1: 0.8.1-alt0.M41.1
4.0: 0.8.1-alt0.M40.2
www.altlinux.org/Changes

Группа :: Графика
Пакет: yagf

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: yagf-show-absent-aspell-dictionary.patch
Скачать


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 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="spellchecker.cpp" line="153"/>
-        <source>Required spelling dictionary is not found. Spell-checking is disabled.
- Try to install an appropriate aspell dictionary.</source>
+        <location filename="spellchecker.cpp" line="161"/>
+        <source>Required spelling dictionary (%1) is not found.
+Spell-checking is disabled.
+Try to install an appropriate aspell dictionary.</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
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 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="spellchecker.cpp" line="153"/>
-        <source>Required spelling dictionary is not found. Spell-checking is disabled.
- Try to install an appropriate aspell dictionary.</source>
+        <location filename="spellchecker.cpp" line="161"/>
+        <source>Required spelling dictionary (%1) is not found.
+Spell-checking is disabled.
+Try to install an appropriate aspell dictionary.</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
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 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="spellchecker.cpp" line="153"/>
-        <source>Required spelling dictionary is not found. Spell-checking is disabled.
- Try to install an appropriate aspell dictionary.</source>
+        <location filename="spellchecker.cpp" line="161"/>
+        <source>Required spelling dictionary (%1) is not found.
+Spell-checking is disabled.
+Try to install an appropriate aspell dictionary.</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
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 @@
         <translation>п²п╣ я┐п╢п╟п╩п╬я│я▄ я│п╬я┘я─п╟п╫п╦я┌я▄ я└п╟п╧п╩</translation>
     </message>
     <message>
-        <location filename="spellchecker.cpp" line="153"/>
-        <source>Required spelling dictionary is not found. Spell-checking is disabled.
- Try to install an appropriate aspell dictionary.</source>
-        <translation>п╒я─п╣п╠я┐п╣п╪я▀п╧ п╬я─я└п╬пЁя─я─п╟я└п╦я┤п╣я│п╨п╦п╧ я│п╩п╬п╡п╟я─я▄ п╫п╣ п╫п╟п╧п╢п╣п╫. п÷я─п╬п╡п╣я─п╨п╟ п╬я─я└п╬пЁя─п╟я└п╦п╦ п╠я┐п╢п╣я┌ п╬я┌п╨п╩я▌я┤п╣п╫п╟.
+        <location filename="spellchecker.cpp" line="161"/>
+        <source>Required spelling dictionary (%1) is not found.
+Spell-checking is disabled.
+Try to install an appropriate aspell dictionary.</source>
+	<translation>п╒я─п╣п╠я┐п╣п╪я▀п╧ п╬я─я└п╬пЁя─п╟я└п╦я┤п╣я│п╨п╦п╧ я│п╩п╬п╡п╟я─я▄ (%1) п╫п╣ п╫п╟п╧п╢п╣п╫.
+п÷я─п╬п╡п╣я─п╨п╟ п╬я─я└п╬пЁя─п╟я└п╦п╦ п╠я┐п╢п╣я┌ п╬я┌п╨п╩я▌я┤п╣п╫п╟.
 п÷п╬п©я─п╬п╠я┐п╧я┌п╣ я┐я│я┌п╟п╫п╬п╡п╦я┌я▄ я│п╬п╬я┌п╡п╣я┌я│я┌п╡я┐я▌я┴п╦п╧ я│п╩п╬п╡п╟я─я▄ aspell.</translation>
     </message>
 </context>
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 @@
         <translation>п²п╣ п╡п╢п╟п╩п╬я│я▄ п╥п╠п╣я─п╣пЁя┌п╦ п╥п╬п╠я─п╟п╤п╣п╫п╫я▐</translation>
     </message>
     <message>
-        <location filename="spellchecker.cpp" line="153"/>
-        <source>Required spelling dictionary is not found. Spell-checking is disabled.
- Try to install an appropriate aspell dictionary.</source>
+        <location filename="spellchecker.cpp" line="161"/>
+        <source>Required spelling dictionary (%1) is not found.
+Spell-checking is disabled.
+Try to install an appropriate aspell dictionary.</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin