Commit ed205a64 authored by Simon Depiets's avatar Simon Depiets
Browse files

Disable sonnet auto language detection

parent 2135b2b3
......@@ -10,7 +10,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(lokalize VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.65.0")
set(KF5_MIN_VERSION "5.71.0")
# search packages used
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
......
......@@ -504,6 +504,7 @@ void EditorTab::spellcheck()
if (!m_sonnetDialog) {
m_sonnetChecker = new Sonnet::BackgroundChecker(this);
m_sonnetChecker->changeLanguage(enhanceLangCode(Project::instance()->langCode()));
m_sonnetChecker->setAutoDetectLanguageDisabled(true);
m_sonnetDialog = new Sonnet::Dialog(m_sonnetChecker, this);
connect(m_sonnetDialog, &Sonnet::Dialog::spellCheckDone, this, &EditorTab::spellcheckNext);
connect(m_sonnetDialog, &Sonnet::Dialog::replace, this, &EditorTab::spellcheckReplace);
......
......@@ -170,7 +170,7 @@ void TranslationUnitTextEdit::fileLoaded()
QLocale langLocale(langCode);
// First try to use a locale name derived from the language code
m_highlighter->setCurrentLanguage(langLocale.name());
m_highlighter->setCurrentLanguage(langLocale.name());
//qCWarning(LOKALIZE_LOG) << "Attempting to set highlighting for " << m_part << " as " << langLocale.name();
// If that fails, try to use the language code directly
if (m_highlighter->currentLanguage() != langLocale.name() || m_highlighter->currentLanguage().isEmpty()) {
......@@ -181,6 +181,7 @@ void TranslationUnitTextEdit::fileLoaded()
//qCWarning(LOKALIZE_LOG) << "Attempting to set highlighting for " << m_part << " as " << langCode.left(2);
}
}
m_highlighter->setAutoDetectLanguageDisabled(m_highlighter->spellCheckerFound());
//qCWarning(LOKALIZE_LOG) << "Spellchecker found "<<m_highlighter->spellCheckerFound()<< " as "<<m_highlighter->currentLanguage();
//setSpellCheckingLanguage(m_highlighter->currentLanguage());
//"i use an english locale while translating kde pot files from english to hebrew" Bug #181989
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment