Hello community, here is the log from the commit of package sonnet for openSUSE:Factory checked in at 2020-05-11 13:31:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sonnet (Old) and /work/SRC/openSUSE:Factory/.sonnet.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sonnet" Mon May 11 13:31:41 2020 rev:80 rq:802133 version:5.70.0 Changes: -------- --- /work/SRC/openSUSE:Factory/sonnet/sonnet.changes 2020-04-15 20:05:54.922081468 +0200 +++ /work/SRC/openSUSE:Factory/.sonnet.new.2738/sonnet.changes 2020-05-11 13:34:24.272243537 +0200 @@ -1,0 +2,10 @@ +Sun May 3 09:40:21 UTC 2020 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.70.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/kde-frameworks-5.70.0 +- Changes since 5.69.0: + * Fix sonnet autodetect test failure + +------------------------------------------------------------------- Old: ---- sonnet-5.69.0.tar.xz sonnet-5.69.0.tar.xz.sig New: ---- sonnet-5.70.0.tar.xz sonnet-5.70.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sonnet.spec ++++++ --- /var/tmp/diff_new_pack.UkpRTD/_old 2020-05-11 13:34:25.484246077 +0200 +++ /var/tmp/diff_new_pack.UkpRTD/_new 2020-05-11 13:34:25.488246086 +0200 @@ -17,14 +17,14 @@ %define sonum 5 -%define _tar_path 5.69 +%define _tar_path 5.70 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %bcond_without lang Name: sonnet -Version: 5.69.0 +Version: 5.70.0 Release: 0 Summary: KDE spell checking library License: LGPL-2.1-or-later ++++++ sonnet-5.69.0.tar.xz -> sonnet-5.70.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.69.0/CMakeLists.txt new/sonnet-5.70.0/CMakeLists.txt --- old/sonnet-5.69.0/CMakeLists.txt 2020-04-05 01:07:54.000000000 +0200 +++ new/sonnet-5.70.0/CMakeLists.txt 2020-05-03 00:25:43.000000000 +0200 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.5) -set(KF5_VERSION "5.69.0") # handled by release scripts +set(KF5_VERSION "5.70.0") # handled by release scripts project(Sonnet VERSION ${KF5_VERSION}) include(FeatureSummary) -find_package(ECM 5.69.0 NO_MODULE) +find_package(ECM 5.70.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.69.0/autotests/test_autodetect.cpp new/sonnet-5.70.0/autotests/test_autodetect.cpp --- old/sonnet-5.69.0/autotests/test_autodetect.cpp 2020-04-05 01:07:54.000000000 +0200 +++ new/sonnet-5.70.0/autotests/test_autodetect.cpp 2020-05-03 00:25:43.000000000 +0200 @@ -16,33 +16,50 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ +#include "guesslanguage.h" +#include "speller.h" #include <QObject> #include <qtest.h> -#include "guesslanguage.h" +#include <QStandardPaths> class SonnetAutoDetectTest : public QObject { Q_OBJECT private Q_SLOTS: - + void initTestCase(); void autodetect_data(); void autodetect(); }; +using namespace Sonnet; + +void SonnetAutoDetectTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); + + Speller speller(QStringLiteral("en_US")); + + if (speller.availableBackends().empty()) { + QSKIP("No backends available"); + } + + if (!speller.availableBackends().contains(QLatin1String("Hunspell"))) { + QSKIP("Hunspell not available"); + } + + speller.setDefaultClient(QStringLiteral("Hunspell")); + speller.setAttribute(Speller::AutoDetectLanguage, true); +} + void SonnetAutoDetectTest::autodetect_data() { QTest::addColumn<QString>("sentence"); QTest::addColumn<QString>("correct_lang"); QTest::addColumn<QStringList>("suggested_langs"); - - /* These tests will fail if you dont have the respective dictionary installed. - * They will also fail if the dictionary file name is different from 'correct_lang' - */ - QTest::newRow("English") << QStringLiteral("This is an English sentence.") << QStringLiteral("en_US-large") << QStringList{QLatin1String("en_US-large"), QLatin1String("de_DE"), QLatin1String("ur_PK")}; - - QTest::newRow("German") << QStringLiteral("Dies ist ein deutscher Satz.") << QStringLiteral("de_DE_frami") << QStringList{QLatin1String("hi_IN"), QLatin1String("pl_PL"), QLatin1String("de_DE_frami")}; - + + QTest::newRow("English") << QStringLiteral("This is an English sentence.") << QStringLiteral("en_US") << QStringList{QLatin1String("en_US"), QLatin1String("de_DE"), QLatin1String("ur_PK")}; + QTest::newRow("German") << QStringLiteral("Dies ist ein deutscher Satz.") << QStringLiteral("de_DE") << QStringList{QLatin1String("hi_IN"), QLatin1String("pl_PL"), QLatin1String("de_DE_frami")}; QTest::newRow("Malayam") << QStringLiteral("ഇന്ത്യയുടെ തെക്കു ഭാഗത്തു സ്ഥിതി ചെയ്യുന്ന ഒരു സംസ്ഥാനമാണ് കേരളം.") << QStringLiteral("ml_IN") << QStringList{QLatin1String("ml_IN"), QLatin1String("ur_PK"), QLatin1String("en_US-large")}; } @@ -51,11 +68,28 @@ QFETCH(QString, sentence); QFETCH(QString, correct_lang); QFETCH(QStringList, suggested_langs); - + + //skip if the language is not available + Speller speller; + if (!speller.availableLanguages().contains(correct_lang)) { + const QString msg = correct_lang + QStringLiteral(" not available"); + QSKIP(msg.toLocal8Bit().constData()); + } + Sonnet::GuessLanguage gl; QString actual_lang = gl.identify(sentence, suggested_langs); - - QCOMPARE(actual_lang, correct_lang); + + //get chars till _, get the language code + int us = correct_lang.indexOf(QLatin1Char('_')); + const QStringRef correctLangCode = correct_lang.leftRef(us); + + us = actual_lang.indexOf(QLatin1Char('_')); + const QStringRef actualLangCode = actual_lang.leftRef(us); + + qDebug() << "Actual: " << actual_lang; + qDebug() << "Expected: " << correct_lang; + + QCOMPARE(actualLangCode, correctLangCode); } QTEST_GUILESS_MAIN(SonnetAutoDetectTest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.69.0/po/en_GB/sonnet5_qt.po new/sonnet-5.70.0/po/en_GB/sonnet5_qt.po --- old/sonnet-5.69.0/po/en_GB/sonnet5_qt.po 2020-04-05 01:07:54.000000000 +0200 +++ new/sonnet-5.70.0/po/en_GB/sonnet5_qt.po 2020-05-03 00:25:43.000000000 +0200 @@ -10,7 +10,7 @@ "POT-Creation-Date: 2014-03-23 01:50+0000\n" "PO-Revision-Date: 2019-03-24 19:22+0000\n" "Last-Translator: Steve Allewell <steve.allew...@gmail.com>\n" -"Language-Team: British English <kde-i18n-...@kde.org>\n" +"Language-Team: British English <kde-l10n-en...@kde.org>\n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.69.0/po/ko/sonnet5_qt.po new/sonnet-5.70.0/po/ko/sonnet5_qt.po --- old/sonnet-5.69.0/po/ko/sonnet5_qt.po 2020-04-05 01:07:54.000000000 +0200 +++ new/sonnet-5.70.0/po/ko/sonnet5_qt.po 2020-05-03 00:25:43.000000000 +0200 @@ -1,14 +1,14 @@ # Korean messages for kdelibs. # Copyright (C) Free Software Foundation, Inc. # Cho Sung Jae <cho.sung...@gmail.com>, 2007. -# Shinjo Park <k...@peremen.name>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019. +# Shinjo Park <k...@peremen.name>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2020. # msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-03-23 01:50+0000\n" -"PO-Revision-Date: 2019-04-12 00:57+0100\n" +"PO-Revision-Date: 2020-04-05 01:58+0200\n" "Last-Translator: Shinjo Park <k...@peremen.name>\n" "Language-Team: Korean <kde...@kde.org>\n" "Language: ko\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Lokalize 2.0\n" +"X-Generator: Lokalize 19.04.3\n" "X-Qt-Contexts: true\n" #: core/loader.cpp:176 @@ -305,7 +305,7 @@ #: ui/sonnetui.ui:85 msgctxt "SonnetUi|" msgid "Text excerpt showing the unknown word in its context." -msgstr "이 문맥에서 알 수 없는 단어를 포함하는 문단의 일부분입니다." +msgstr "이 문맥에서 알 수 없는 단어가 들어 있는 문단의 일부분입니다." #: ui/sonnetui.ui:88 msgctxt "SonnetUi|" @@ -318,10 +318,10 @@ "</qt>" msgstr "" "<qt>\n" -"<p>여기에서 알 수 없는 단어를 포함하는 문단의 일부분을 볼 수 있습니다. 만약 " +"<p>여기에서 알 수 없는 단어가 들어 있는 문단의 일부분을 볼 수 있습니다. 만약 " "이 정보만 가지고 알 수 없는 단어의 적합한 대체 단어를 선택할 수 없다면, 검사" -"하고 있는 문서를 누른 다음 문단의 더 많은 부분을 읽으신 후, 이곳으로 되돌아" -"와 검사를 계속할 수 있습니다.</p>\n" +"하고 있는 문서를 누른 다음 문단의 더 많은 부분을 읽은 후, 여기로 되돌아와 검" +"사를 계속할 수 있습니다.</p>\n" "</qt>" #: ui/sonnetui.ui:96