Hello community,
here is the log from the commit of package sonnet for openSUSE:Factory checked in at 2016-03-16 10:32:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sonnet (Old)
and /work/SRC/openSUSE:Factory/.sonnet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sonnet"
Changes:
--------
--- /work/SRC/openSUSE:Factory/sonnet/sonnet.changes 2016-02-24 18:58:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.sonnet.new/sonnet.changes 2016-03-16 10:32:49.000000000 +0100
@@ -1,0 +2,12 @@
+Sun Mar 6 10:05:07 UTC 2016 - hrvoje.senjan@gmail.com
+
+- Update to 5.20.0 (boo#970856)
+ * Don't disable language detection just because a language is set
+ * Disable automatic disabling of automatic spelling by default
+ * Fix TextBreaks
+ * Fix Hunspell dictionary search paths missing '/' (kde#359866)
+ * Add <app dir>/../share/hunspell to dictionary search path
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.20.0.php
+
+-------------------------------------------------------------------
Old:
----
sonnet-5.19.0.tar.xz
New:
----
sonnet-5.20.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sonnet.spec ++++++
--- /var/tmp/diff_new_pack.9SZBVD/_old 2016-03-16 10:32:50.000000000 +0100
+++ /var/tmp/diff_new_pack.9SZBVD/_new 2016-03-16 10:32:50.000000000 +0100
@@ -18,9 +18,9 @@
%bcond_without lang
%define sonum 5
-%define _tar_path 5.19
+%define _tar_path 5.20
Name: sonnet
-Version: 5.19.0
+Version: 5.20.0
Release: 0
#BuildRequires: aspell-devel
BuildRequires: cmake >= 2.8.12
++++++ sonnet-5.19.0.tar.xz -> sonnet-5.20.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/CMakeLists.txt new/sonnet-5.20.0/CMakeLists.txt
--- old/sonnet-5.19.0/CMakeLists.txt 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/CMakeLists.txt 2016-03-05 20:15:12.000000000 +0100
@@ -4,7 +4,7 @@
project(Sonnet)
include(FeatureSummary)
-find_package(ECM 5.19.0 NO_MODULE)
+find_package(ECM 5.20.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -26,7 +26,7 @@
include(ECMPoQmTools)
-set(KF5_VERSION "5.19.0") # handled by release scripts
+set(KF5_VERSION "5.20.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX SONNET
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/sonnet_version.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/autotests/CMakeLists.txt new/sonnet-5.20.0/autotests/CMakeLists.txt
--- old/sonnet-5.19.0/autotests/CMakeLists.txt 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/autotests/CMakeLists.txt 2016-03-05 20:15:12.000000000 +0100
@@ -14,7 +14,7 @@
endmacro(SONNET_UNIT_TESTS)
sonnet_unit_tests(
- # test_filter
+ test_filter
test_core
test_suggest
test_settings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/autotests/test_filter.cpp new/sonnet-5.20.0/autotests/test_filter.cpp
--- old/sonnet-5.19.0/autotests/test_filter.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/autotests/test_filter.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -20,7 +20,7 @@
*/
#include "test_filter.h"
-#include "filter_p.h"
+#include "tokenizer_p.h"
#include
#include <QTextBoundaryFinder>
@@ -37,72 +37,34 @@
int start;
};
-void SonnetFilterTest::testFilter()
+void SonnetFilterTest::testLatin()
{
- QString buffer("This is a sample thing. Please test me . He's don't Le'Clerk.");
+ QString buffer(" This is a sample thing. Please test me ... He's don't Le'Clerk.");
QList<Hit> hits;
- hits.append(Hit("This", 0));
- hits.append(Hit("is", 5));
- hits.append(Hit("a", 12));
- hits.append(Hit("sample", 14));
- hits.append(Hit("thing", 21));
- hits.append(Hit("Please", 28));
- hits.append(Hit("test", 35));
- hits.append(Hit("me", 40));
- hits.append(Hit("He's", 49));
- hits.append(Hit("don't", 54));
- hits.append(Hit("Le'Clerk", 60));
+ hits.append(Hit("This", 2));
+ hits.append(Hit("is", 7));
+ hits.append(Hit("a", 14));
+ hits.append(Hit("sample", 16));
+ hits.append(Hit("thing", 23));
+ hits.append(Hit("Please", 30));
+ hits.append(Hit("test", 37));
+ hits.append(Hit("me", 42));
+ hits.append(Hit("He's", 53));
+ hits.append(Hit("don't", 58));
+ hits.append(Hit("Le'Clerk", 64));
- Filter filter;
- filter.setBuffer(buffer);
+ WordTokenizer tokenizer;
+ tokenizer.setBuffer(buffer);
- Word w;
+ QStringRef w;
int hitNumber = 0;
- while (!(w = filter.nextWord()).end) {
- //qDebug()<< "Found word \""<< w.word << "\" which starts at position " << w.start;
- QCOMPARE(w.word, hits[hitNumber].word);
- QCOMPARE(w.start, hits[hitNumber].start);
+ while (tokenizer.hasNext()) {
+ w = tokenizer.next();
+ QCOMPARE(w.toString(), hits[hitNumber].word);
+ QCOMPARE(w.position(), hits[hitNumber].start);
++hitNumber;
}
QCOMPARE(hitNumber, hits.count());
-
- // ? filter.setBuffer( buffer );
-}
-
-void SonnetFilterTest::testWordAt()
-{
- QString buffer("This is a sample thing. Please test me . He's don't Le'Clerk.");
- QList<Hit> hits;
- hits.append(Hit("This", 0));
- hits.append(Hit("is", 5));
- hits.append(Hit("a", 12));
- hits.append(Hit("Please", 28));
- hits.append(Hit("me", 40));
-
- Filter filter;
- filter.setBuffer(buffer);
- Word word;
-
- word = filter.wordAtPosition(3);
- QCOMPARE(word.word, hits[0].word);
- QCOMPARE(word.start, hits[0].start);
-
- word = filter.wordAtPosition(5);
- QCOMPARE(word.word, hits[1].word);
- QCOMPARE(word.start, hits[1].start);
-
- word = filter.wordAtPosition(12);
- QCOMPARE(word.word, hits[2].word);
- QCOMPARE(word.start, hits[2].start);
-
- word = filter.wordAtPosition(29);
- QCOMPARE(word.word, hits[3].word);
- QCOMPARE(word.start, hits[3].start);
-
- word = filter.wordAtPosition(42);
- QCOMPARE(word.word, hits[4].word);
- QCOMPARE(word.start, hits[4].start);
-
}
static QVector<ushort>
@@ -128,7 +90,7 @@
hits.append(Hit(QString::fromUtf8("राजभाषा"), 38));
hits.append(Hit(QString::fromUtf8("असून"), 46));
hits.append(Hit(QString::fromUtf8("सुमारे"), 51));
- //hits.append( Hit( QString::fromUtf8("९"), 58 ) ); // This is the number 9, so we don't spell-check it
+ hits.append(Hit( QString::fromUtf8("९"), 58 ) ); // This is the number 9, so we don't spell-check it
hits.append(Hit(QString::fromUtf8("कोटी"), 60));
hits.append(Hit(QString::fromUtf8("लोकांची"), 65));
hits.append(Hit(QString::fromUtf8("मातृभाषा"), 73));
@@ -137,22 +99,44 @@
hits.append(Hit(QString::fromUtf8("भाषा"), 93));
hits.append(Hit(QString::fromUtf8("कमीत"), 98));
hits.append(Hit(QString::fromUtf8("कमी"), 103));
- //hits.append( Hit( QString::fromUtf8("१०००"), 107 ) ); // just a number
+ hits.append( Hit( QString::fromUtf8("१०००"), 107 ) ); // just a number
hits.append(Hit(QString::fromUtf8("वर्षापासून"), 112));
hits.append(Hit(QString::fromUtf8("अस्तित्वात"), 123));
hits.append(Hit(QString::fromUtf8("आहे"), 134));
buffer = QString::fromUtf8("मराठी भाषा महाराष्ट्र व गोवा राज्याची राजभाषा असून सुमारे ९ कोटी लोकांची मातृभाषा आहे. मराठी भाषा कमीत कमी १००० वर्षापासून अस्तित्वात आहे.");
- Filter filter;
- filter.setBuffer(buffer);
- Word w;
+ WordTokenizer tokenizer;
+ tokenizer.setBuffer(buffer);
+ QStringRef w;
+ int hitNumber = 0;
+ while (tokenizer.hasNext()) {
+ w = tokenizer.next();
+ QVector<ushort> unicode = convertToUnicode(w.toString());
+ QCOMPARE(w.toString(), hits[hitNumber].word);
+ QCOMPARE(w.position(), hits[hitNumber].start);
+ ++hitNumber;
+ }
+ QCOMPARE(hitNumber, hits.count());
+}
+
+void SonnetFilterTest::testSentence()
+{
+ QString buffer("This is a sample thing. Please test me ... He's don't Le'Clerk.");
+ QList<Hit> hits;
+ hits.append(Hit("This is a sample thing. ", 0));
+ hits.append(Hit("Please test me ... ", 28));
+ hits.append(Hit("He's don't Le'Clerk.", 51));
+
+ SentenceTokenizer tokenizer;
+ tokenizer.setBuffer(buffer);
+
+ QStringRef w;
int hitNumber = 0;
- while (!(w = filter.nextWord()).end) {
- QVector<ushort> unicode = convertToUnicode(w.word);
- //qDebug()<< "Found word \""<< unicode << "\" which starts at position " << w.start <<", len = "<, 2015, 2016.
+# enolp. , 2015, 2016.
msgid ""
msgstr ""
"Project-Id-Version: kdelibs4-1\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2014-03-23 01:50+0000\n"
-"PO-Revision-Date: 2016-02-04 13:22+0100\n"
+"PO-Revision-Date: 2016-02-06 23:22+0100\n"
"Last-Translator: enolp \n"
"Language-Team: Asturian <>\n"
"Language: ast\n"
@@ -35,113 +35,71 @@
msgstr "80"
#: core/loader.cpp:176
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ise suffixes"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ise suffixes"
msgstr "sufixos -ise"
#: core/loader.cpp:177
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ize suffixes"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ize suffixes"
msgstr "sufixos -ize"
#: core/loader.cpp:178
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ise suffixes and with accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ise suffixes and with accents"
msgstr "sufixos -ise y con acentos"
#: core/loader.cpp:179
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ise suffixes and without accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ise suffixes and without accents"
msgstr "sufixos -ise y ensin acentos"
#: core/loader.cpp:180
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ize suffixes and with accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ize suffixes and with accents"
msgstr "sufixos -ize y con acentos"
#: core/loader.cpp:181
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "-ize suffixes and without accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "-ize suffixes and without accents"
msgstr "sufixos -ize y ensin acentos"
#: core/loader.cpp:182
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "large"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "large"
msgstr "grande"
#: core/loader.cpp:183
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "medium"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "medium"
-msgstr "mediu"
+msgstr "media"
#: core/loader.cpp:184
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "small"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "small"
-msgstr "pequeñu"
+msgstr "pequeña"
#: core/loader.cpp:185
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "variant 0"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "variant 0"
msgstr "variante 0"
#: core/loader.cpp:186
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "variant 1"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "variant 1"
msgstr "variante 1"
#: core/loader.cpp:187
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "variant 2"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "variant 2"
msgstr "variante 2"
#: core/loader.cpp:188
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "without accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "without accents"
msgstr "ensin acentos"
#: core/loader.cpp:189
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "with accents"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "with accents"
msgstr "con acentos"
@@ -149,30 +107,25 @@
#: core/loader.cpp:190
msgctxt "Sonnet::Loader|dictionary variant"
msgid "with ye, modern russian"
-msgstr ""
+msgstr "con «ye», rusu modernu"
#: core/loader.cpp:191
msgctxt "Sonnet::Loader|dictionary variant"
msgid "with yeyo, modern and old russian"
-msgstr ""
+msgstr "con «yeyo», rusu modernu y antiguu"
#: core/loader.cpp:192
msgctxt "Sonnet::Loader|dictionary variant"
msgid "with yo, old russian"
-msgstr ""
+msgstr "con «yo», rusu antiguu"
#: core/loader.cpp:193
-#, fuzzy
-#| msgctxt "dictionary variant"
-#| msgid "extended"
msgctxt "Sonnet::Loader|dictionary variant"
msgid "extended"
-msgstr "espardíu"
+msgstr "espardida"
#: core/loader.cpp:227
-#, fuzzy, qt-format
-#| msgctxt "dictionary name. %1-language, %2-country and %3 variant name"
-#| msgid "%1 (%2) [%3]"
+#, qt-format
msgctxt ""
"Sonnet::Loader|dictionary name; %1 = language name, %2 = country name and %3 "
"= language variant name"
@@ -180,23 +133,17 @@
msgstr "%1 (%2) [%3]"
#: core/loader.cpp:230
-#, fuzzy, qt-format
-#| msgctxt "name of digit set with digit string, e.g. 'Arabic (0123456789)'"
-#| msgid "%1 (%2)"
+#, qt-format
msgctxt "Sonnet::Loader|dictionary name; %1 = language name, %2 = country name"
msgid "%1 (%2)"
msgstr "%1 (%2)"
#: ui/configdialog.cpp:50
-#, fuzzy
-#| msgid "Send Confirmation"
msgctxt "Sonnet::ConfigDialog|"
msgid "Spell Checking Configuration"
-msgstr "Unviar confirmación"
+msgstr "Configuración de comprobación ortográfica"
#: ui/configui.ui:41
-#, fuzzy
-#| msgid "Options"
msgctxt "SonnetConfigUI|"
msgid "Options"
msgstr "Opciones"
@@ -207,46 +154,34 @@
msgstr "Habilitar auto-deteición de &llingua"
#: ui/configui.ui:54
-#, fuzzy
-#| msgid "Enable &background spellchecking"
msgctxt "SonnetConfigUI|"
msgid "Enable &background spellchecking"
-msgstr "Activar la igua ortográfica en segun&du planu"
+msgstr "Habilitar la comprobación ortográfica de &fondu"
#: ui/configui.ui:61
-#, fuzzy
-#| msgid "As-you-type spell checking enabled."
msgctxt "SonnetConfigUI|"
msgid "&Automatic spell checking enabled by default"
-msgstr "Correición ortográfica sobre la marcha activada."
+msgstr "Comprobación ortográfica &automática habilitada por defeutu"
#: ui/configui.ui:68
-#, fuzzy
-#| msgid "Skip all &uppercase words"
msgctxt "SonnetConfigUI|"
msgid "Skip all &uppercase words"
-msgstr "Saltar toles pallabres en mayúsc&ulas"
+msgstr "Saltar toles pallabres mayúsc&ules"
#: ui/configui.ui:75
-#, fuzzy
-#| msgid "S&kip run-together words"
msgctxt "SonnetConfigUI|"
msgid "S&kip run-together words"
msgstr "Saltar toles palla&bres compuestes"
#: ui/configui.ui:85
-#, fuzzy
-#| msgid "Default language:"
msgctxt "SonnetConfigUI|"
msgid "Default language:"
-msgstr "Llingua predeterminada:"
+msgstr "Llingua por defeutu:"
#: ui/configui.ui:95
-#, fuzzy
-#| msgid "Ignored Words"
msgctxt "SonnetConfigUI|"
msgid "Ignored Words:"
-msgstr "Pallabres inoraes"
+msgstr "Pallabres inoraes:"
#: ui/configui.ui:109
msgctxt "SonnetConfigUI|"
@@ -259,85 +194,53 @@
msgstr "&Desaniciar"
#: ui/configui.ui:160
-#, fuzzy
-#| msgid "Enable &background spellchecking"
msgctxt "SonnetConfigUI|"
msgid "No backend found for spell checking"
-msgstr "Activar la igua ortográfica en segun&du planu"
+msgstr "Nun s'alcontró backend dalu pa la comprobación ortográfica"
#: ui/dialog.cpp:100 ui/dialog.cpp:224 ui/dialog.cpp:433
-#, fuzzy
-#| msgid "Check Spelling"
msgctxt "Sonnet::Dialog|@title:window"
msgid "Check Spelling"
msgstr "Comprobar ortografía"
#: ui/dialog.cpp:223
-#, fuzzy
-#| msgctxt "progress label"
-#| msgid "Spell checking in progress..."
msgctxt "Sonnet::Dialog|progress label"
msgid "Spell checking in progress..."
-msgstr "Comprobación d'ortografía en cursu..."
+msgstr "Comprobación ortografica en cursu..."
#: ui/dialog.cpp:244
-#, fuzzy
-#| msgid "Spell check stopped."
msgctxt "Sonnet::Dialog|"
msgid "Spell check stopped."
-msgstr "Correición ortográfica parada."
+msgstr "Paróse la correición ortográfica"
#: ui/dialog.cpp:254
-#, fuzzy
-#| msgid "Spell check canceled."
msgctxt "Sonnet::Dialog|"
msgid "Spell check canceled."
-msgstr "Correición ortográfica encaboxada."
+msgstr "Encaboxóse la correición ortográfica"
#: ui/dialog.cpp:430 ui/dialog.cpp:433
-#, fuzzy
-#| msgid "Spell check complete."
msgctxt "Sonnet::Dialog|"
msgid "Spell check complete."
-msgstr "Correición ortográfica completada."
+msgstr "Completóse correición ortográfica"
#: ui/highlighter.cpp:229 ui/highlighter.cpp:251
-#, fuzzy
-#| msgid "As-you-type spell checking enabled."
msgctxt "Sonnet::Highlighter|"
msgid "As-you-type spell checking enabled."
-msgstr "Correición ortográfica sobre la marcha activada."
+msgstr "Habilitóse la correición ortográfica sobre la marcha."
#: ui/highlighter.cpp:232
-#, fuzzy
-#| msgid "Too many misspelled words. As-you-type spell checking disabled."
msgctxt "Sonnet::Highlighter|"
msgid "Too many misspelled words. As-you-type spell checking disabled."
msgstr ""
-"Abondes pallabres mal escrites. Igua ortográfica sobre la marcha desactivada."
+"Milenta pallabres mal escrites. Deshabilitóse la comprobación ortográfica "
+"sobre la marcha."
#: ui/highlighter.cpp:253
-#, fuzzy
-#| msgid "As-you-type spell checking disabled."
msgctxt "Sonnet::Highlighter|"
msgid "As-you-type spell checking disabled."
-msgstr "Correición ortográfica sobre la marcha desactivada."
+msgstr "Deshabilitóse la correición ortográfica sobre la marcha."
#: ui/sonnetui.ui:30 ui/sonnetui.ui:46
-#, fuzzy
-#| msgid ""
-#| "<qt><p>This word was considered to be an \"unknown word\" because it does "
-#| "not match any entry in the dictionary currently in use. It may also be a "
-#| "word in a foreign language.</p>\n"
-#| "<p>If the word is not misspelled, you may add it to the dictionary by "
-#| "clicking <b>Add to Dictionary</b>. If you do not want to add the unknown "
-#| "word to the dictionary, but you want to leave it unchanged, click "
-#| "<b>Ignore</b> or <b>Ignore All</b>.</p>\n"
-#| "<p>However, if the word is misspelled, you can try to find the correct "
-#| "replacement in the list below. If you cannot find a replacement there, "
-#| "you may type it in the text box below, and click <b>Replace</b> or "
-#| "<b>Replace All</b>.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt><p>This word was considered to be an \"unknown word\" because it does "
@@ -353,17 +256,17 @@
"All</b>.</p>\n"
"</qt>"
msgstr ""
-"<qt><p>Esta pallabra considérase una «palabra desconocía» porque nun concasa "
-"con denguna entrada del diccionariu que ta usando. Puede que se trate d'una "
-"pallabra extranxera.</p>\n"
-"<p>Si la pallabra escrita correcho, puede amestala al diccionariu calcando "
-"<b>Amestar al diccionariu</b>. Si nun deseya amestar la pallabra al "
-"diccionariu pero quier dexala como ta, calque <b>Inorar</b> o <b>Inorar "
-"toes</b>.</p>\n"
-"<p>Sicasí, si la pallabra ye incorreuta puede tentar alcontrar la forma "
-"correuta na llista d'abaxo. Si nn alcuentra un reemplazu equí, puede "
-"introducilu nel cuadru de testu inferior, y calcar <b>Trocar</b> o <b>Trocar "
-"toes</b>.</p>\n"
+"<qt><p>Esta pallabra consideróse una «pallabra desconocida» porque nun "
+"concasa con entrada dala nel diccionariu anguaño n'usu. Quiciabes tamién sía "
+"una pallabría d'una llingua foriata.</p>\n"
+"<p>Si la pallabra nun ta mal escrita, podríes amestar la pallabra "
+"desconocida al diccionariu primiendo <b>Amestar al diccionariu</b>. Si nun "
+"quies amestar la pallabra desconocida pero quies dexala ensin camudar, primi "
+"<b>Inorar</b> o <b>Inorar too</b>.</p>\n"
+"<p>Por embagu, si la pallabra ta mal escrita, podríes probar a alcontrar el "
+"troquéu nel llistáu d'embaxo. Si nun pues alcontrar el troquéu ende, podríes "
+"teclexar na caxa de testu d'embaxo y primir <b>Trocar</b> o <b>Trocar too"
+"b>.</p>\n"
"</qt>"
#: ui/sonnetui.ui:36
@@ -374,21 +277,14 @@
#: ui/sonnetui.ui:43
msgctxt "SonnetUi|"
msgid "Unknown word"
-msgstr "Pallabra desconocía"
+msgstr "Pallabra desconocida"
#: ui/sonnetui.ui:52
-#, fuzzy
-#| msgid "<b>misspelled</b>"
msgctxt "SonnetUi|"
msgid "<b>misspelled</b>"
-msgstr "<b>fallu ortográficu</b>"
+msgstr "<b>mal escrito</b>"
#: ui/sonnetui.ui:59 ui/sonnetui.ui:174
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Select the language of the document you are proofing here.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -396,7 +292,7 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Esbille la llingua del documentu que ta verificando equí.</p>\n"
+"<p>Esbilla la llingua del documentu qu'equí tas corrixendo.</p>\n"
"</qt>"
#: ui/sonnetui.ui:64
@@ -405,22 +301,11 @@
msgstr "&Llingua:"
#: ui/sonnetui.ui:74
-#, fuzzy
-#| msgid "Text excerpt showing the unknown word in its context."
msgctxt "SonnetUi|"
msgid "Text excerpt showing the unknown word in its context."
-msgstr "Escoyeta de testu qu'amuesa la pallabra desconocida nel so contestu."
+msgstr "Estrautu de testu qu'amuesa la pallabra desconocida nel so contestu."
#: ui/sonnetui.ui:77
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Here you can see a text excerpt showing the unknown word in its "
-#| "context. If this information is not sufficient to choose the best "
-#| "replacement for the unknown word, you can click on the document you are "
-#| "proofing, read a larger part of the text and then return here to continue "
-#| "proofing.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -431,30 +316,18 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Equí pues ver una escoyeta del testu qu'amuesa la pallabra desconocida "
-"nel so contestu. Si esta información nun basta pa escoyer el meyor reemplazu "
-"pa la pallabra desconocida, pues calcar nel documentu que tas revisando, "
-"lleer una parte mayor del testu y tornar equí pa siguir cola revisión.</p>\n"
+"<p>Equí pues ver un estrautu de testu qu'amuesa la pallabra desconocida nel "
+"so contestu. Si esta información nun ye abonda pa escoyer el so meyor "
+"troquéu, pues primir nel documentu que tas corrixendo, lleer una parte más "
+"llarga del testu y dempués volver equí pa siguir corrixendo.</p>\n"
"</qt>"
#: ui/sonnetui.ui:85
-#, fuzzy
-#| msgid "... the <b>misspelled</b> word shown in context ..."
msgctxt "SonnetUi|"
msgid "... the <b>misspelled</b> word shown in context ..."
-msgstr "... la pallabra <b>tracamundiada</b> amosada nel contestu ..."
+msgstr "... la pallabra <b>mal escrita</b> amosada nel contestu ..."
#: ui/sonnetui.ui:95
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>The unknown word was detected and considered unknown because it is not "
-#| "included in the dictionary.<br>\n"
-#| "Click here if you consider that the unknown word is not misspelled and "
-#| "you want to avoid wrongly detecting it again in the future. If you want "
-#| "to let it remain as is, but not add it to the dictionary, then click "
-#| "<b>Ignore</b> or <b>Ignore All</b> instead.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -467,17 +340,15 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>La pallabra desconocida deteutóse y consideróse desconocida porque nun ta "
-"incluyía nel diccionariu.<br>\n"
-"Calca equí si consideres que la pallabra desconocida nun ta tracamundiada y "
-"quieres torgar que vuelva a deteutase nel futuru. Si quies dexala como ta, "
-"pero non amestala al diccionariu, calca <b>Inorar</b> o <b>Inorar toes</b>."
-"p>\n"
+"<p>Deteutóse la pallabra desconocida y consideróse desconocida porque nun ta "
+"incluyida nel diccionariu.<br>\n"
+"Primi equí si consideres que la pallabra desconocida nun ta mal escrita y "
+"quieres evitar la so deteición enquivocada nel futuru. Si quies dexala como "
+"ta pero non amestala al diccionariu, entós primi <b>Inorar</b> o <b>Inorar "
+"toes</b> nel so llugar.</p>\n"
"</qt>"
#: ui/sonnetui.ui:101
-#, fuzzy
-#| msgid "<< Add to Dictionary"
msgctxt "SonnetUi|"
msgid "<< Add to Dictionary"
msgstr "<< Amestar al diccionariu"
@@ -488,17 +359,6 @@
msgstr "Llistáu de suxerencies"
#: ui/sonnetui.ui:127
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>If the unknown word is misspelled, you should check if the correction "
-#| "for it is available and if it is, click on it. If none of the words in "
-#| "this list is a good replacement you may type the correct word in the edit "
-#| "box above.</p>\n"
-#| "<p>To correct this word click <b>Replace</b> if you want to correct only "
-#| "this occurrence or <b>Replace All</b> if you want to correct all "
-#| "occurrences.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -512,12 +372,12 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Si la pallabra desconocida ta tracamundiada, tendríes que comprobar si "
-"tien una correición disponible y, si la tien, calcar enriba d'ella. Si nun "
-"hai un reemplazu afayadizu na llista, pues escribir la pallabra correuta nel "
-"cuadru de testu d'arriba.</p>\n"
-"<p>Pa iguar la pallabra calce <b>Trocar</b> si pa iguar sólo esta ocurrencia "
-"de la pallabra o <b>Trocar toes</b> si quies iguar toles ocurrencies.</p>\n"
+"<p>Si la pallabra desconocida ta mal escrita, deberíes comprobar si ta "
+"disponible la so correición y si ta, primir nella. Si denguna de les "
+"pallabres nesti llistáu ye un troquéu afayadizu, podríes teclexar la "
+"pallabra correuta na caxa d'edición d'enriba.</p>\n"
+"<p>Pa correxir esta parllabra primi <b>Trocar</b> si quies correxir namái "
+"esta ocurrencia o <b>Trocar too</b> si quies correxiles toes.</p>\n"
"</qt>"
#: ui/sonnetui.ui:137
@@ -526,15 +386,6 @@
msgstr "Pallabres suxeríes"
#: ui/sonnetui.ui:145 ui/sonnetui.ui:161
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>If the unknown word is misspelled, you should type the correction for "
-#| "your misspelled word here or select it from the list below.</p>\n"
-#| "<p>You can then click <b>Replace</b> if you want to correct only this "
-#| "occurrence of the word or <b>Replace All</b> if you want to correct all "
-#| "occurrences.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -546,13 +397,10 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Si la pallabra desconocida ta tracamundiada, tendríes de comprobar si "
-"tien una correición disponible y, si la tien, calcar enriba d'ella. Si nun "
-"hai un reemplazu afayadizu na llista, pues escribir la pallabra correuta nel "
-"cuadru de testu d'arriba.</p>\n"
-"<p>Pa iguar la pallabra calque <b>Trocar</b> si pa iguar sólo esta "
-"ocurrencia de la pallabra o <b>Trocar toes</b> si quies iguar toles "
-"ocurrencies.</p>\n"
+"<p>Si la pallabra desconocida ta mal escrita, deberíes teclexar equí la so "
+"correición o esbillala dende'l llistáu d'embaxo.</p>\n"
+"<p>Dempués pues primir <b>Trocar</b> si quies correxir namái esta ocurrencia "
+"o <b>Trocar too</b> si quies correxiles toes.</p>\n"
"</qt>"
#: ui/sonnetui.ui:151
@@ -571,12 +419,6 @@
msgstr "S&uxerir"
#: ui/sonnetui.ui:198
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Click here to replace this occurrence of the unknown text with the "
-#| "text in the edit box above (to the left).</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -585,8 +427,8 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Calca equí pa trocar esti resultáu del testu desconocíu col testu del "
-"cuadru d'edición d'arriba (a manzorga).</p>\n"
+"<p>Primi equí pa trocar esta ocurrencia del testu desconocíu col testu na "
+"caxa d'edición d'enriba (a la esquierda).</p>\n"
"</qt>"
#: ui/sonnetui.ui:203
@@ -595,12 +437,6 @@
msgstr "&Trocar"
#: ui/sonnetui.ui:210
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Click here to replace all occurrences of the unknown text with the "
-#| "text in the edit box above (to the left).</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -609,8 +445,8 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Calca equí pa trocar tolos resultaos del testu desconocíu col testu del "
-"cuadru d'edición d'arriba (a manzorga).</p>\n"
+"<p>Primi equí pa trocar toles ocurrencies del testu desconocíu col testu na "
+"caxa d'edición d'enriba (a la esquierda).</p>\n"
"</qt>"
#: ui/sonnetui.ui:215
@@ -619,15 +455,6 @@
msgstr "T&rocar too"
#: ui/sonnetui.ui:222
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Click here to let this occurrence of the unknown word remain as is."
-#| "p>\n"
-#| "<p>This action is useful when the word is a name, an acronym, a foreign "
-#| "word or any other unknown word that you want to use but not add to the "
-#| "dictionary.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -638,10 +465,10 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Calca equí pa dexar qu'esti resultáu de la pallabra quede como ta.</p>\n"
-"<p>Esta aición ye afayadiza cuando la pallabra ye un nome propiu, un "
-"acrónimu, una pallabra estranxera o cualesquier otra pallabra que quies usar "
-"pero non añader al diccionariu.</p>\n"
+"<p>Primi equí pa dexar qu'esta ocurrencia de la pallabra quede como ta.</p>\n"
+"<p>Esta aición ye útil cuando la pallabra ye un nome, un acrónimu, una "
+"pallabra foriata o cualesquier otra que quieras usar pero nun amiestes al "
+"diccionariu.</p>\n"
"</qt>"
#: ui/sonnetui.ui:228
@@ -650,15 +477,6 @@
msgstr "&Inorar"
#: ui/sonnetui.ui:235 ui/sonnetui.ui:248
-#, fuzzy
-#| msgid ""
-#| "<qt>\n"
-#| "<p>Click here to let all occurrences of the unknown word remain as they "
-#| "are.</p>\n"
-#| "<p>This action is useful when the word is a name, an acronym, a foreign "
-#| "word or any other unknown word that you want to use but not add to the "
-#| "dictionary.</p>\n"
-#| "</qt>"
msgctxt "SonnetUi|"
msgid ""
"<qt>\n"
@@ -670,11 +488,11 @@
"</qt>"
msgstr ""
"<qt>\n"
-"<p>Calca equí pa dexar que tolos resultaos de la pallabra desconocida queden "
-"como tan.</p>\n"
-"<p>Esta aición ye afayadiza cuando la pallabra ye un nome propiu, un "
-"acrónimu, una pallabra estranxera o cualquier otra pallabra que quieras "
-"utilizar pero non añader al diccionariu.</p>\n"
+"<p>Primi equí pa dexar que toles ocurrencies de la pallabra desconocida "
+"queden como tán.</p>\n"
+"<p>Esta aición ye útil cuando'l nome de la pallabra ye un nome, un acrónimu, "
+"una pallabra foriata o cualesquier otra pallabra desconocida que quieras "
+"usar pero non amestala al diccionariu.</p>\n"
"</qt>"
#: ui/sonnetui.ui:241
@@ -683,8 +501,6 @@
msgstr "I&norar too"
#: ui/sonnetui.ui:254
-#, fuzzy
-#| msgid "Autocorrect"
msgctxt "SonnetUi|"
msgid "Autocorrect"
msgstr "Auto-correxir"
@@ -696,15 +512,11 @@
msgstr "Nun hai suxerencies pa %1"
#: ui/spellcheckdecorator.cpp:188
-#, fuzzy
-#| msgid "Ignore"
msgctxt "Sonnet::SpellCheckDecorator|"
msgid "Ignore"
msgstr "Inorar"
#: ui/spellcheckdecorator.cpp:189
-#, fuzzy
-#| msgid "Add to Dictionary"
msgctxt "Sonnet::SpellCheckDecorator|"
msgid "Add to Dictionary"
msgstr "Amestar al diccionariu"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/po/ko/sonnet5_qt.po new/sonnet-5.20.0/po/ko/sonnet5_qt.po
--- old/sonnet-5.19.0/po/ko/sonnet5_qt.po 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/po/ko/sonnet5_qt.po 2016-03-05 20:15:12.000000000 +0100
@@ -2,14 +2,14 @@
# Copyright (C) Free Software Foundation, Inc.
# Cho Sung Jae , 2007.
# Shinjo Park , 2007, 2008, 2009, 2010, 2011.
-# Shinjo Park , 2011, 2012, 2013, 2014, 2015.
+# Shinjo Park , 2011, 2012, 2013, 2014, 2015, 2016.
#
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: 2015-01-18 17:09+0900\n"
+"PO-Revision-Date: 2016-02-14 15:17+0100\n"
"Last-Translator: Shinjo Park \n"
"Language-Team: Korean \n"
"Language: ko\n"
@@ -17,7 +17,7 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Lokalize 1.5\n"
+"X-Generator: Lokalize 2.0\n"
"X-Qt-Contexts: true\n"
#: core/loader.cpp:173
@@ -195,12 +195,9 @@
msgstr "삭제(&R)"
#: ui/configui.ui:160
-#, fuzzy
-#| msgctxt "SonnetConfigUI|"
-#| msgid "Enable &background spellchecking"
msgctxt "SonnetConfigUI|"
msgid "No backend found for spell checking"
-msgstr "맞춤법 검사 사용하기(&B)"
+msgstr "맞춤법 검사 백엔드를 찾을 수 없음"
#: ui/dialog.cpp:100 ui/dialog.cpp:224 ui/dialog.cpp:433
msgctxt "Sonnet::Dialog|@title:window"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/po/ru/sonnet5_qt.po new/sonnet-5.20.0/po/ru/sonnet5_qt.po
--- old/sonnet-5.19.0/po/ru/sonnet5_qt.po 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/po/ru/sonnet5_qt.po 2016-03-05 20:15:12.000000000 +0100
@@ -8,7 +8,7 @@
# Andrey Cherepanov , 2005-2007, 2008, 2009, 2011.
# Nick Shaforostoff , 2004, 2006, 2007, 2008, 2009.
# Nick Shaforostoff , 2009.
-# Alexander Potashev , 2009, 2010, 2011, 2014.
+# Alexander Potashev , 2009, 2010, 2011, 2014, 2016.
# Yury G. Kudryashov , 2011.
# Yuri Efremov , 2012.
# Inga Barinova , 2012.
@@ -19,14 +19,14 @@
"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: 2014-06-21 19:46+0400\n"
+"PO-Revision-Date: 2016-02-22 01:01+0300\n"
"Last-Translator: Alexander Potashev \n"
"Language-Team: Russian \n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 1.5\n"
+"X-Generator: Lokalize 2.0\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Environment: kde\n"
@@ -210,12 +210,9 @@
msgstr "&Удалить"
#: ui/configui.ui:160
-#, fuzzy
-#| msgctxt "SonnetConfigUI|"
-#| msgid "Enable &background spellchecking"
msgctxt "SonnetConfigUI|"
msgid "No backend found for spell checking"
-msgstr "Включить &фоновую проверку орфографии"
+msgstr "Не найдено модулей, реализующих проверку орфографии."
#: ui/dialog.cpp:100 ui/dialog.cpp:224 ui/dialog.cpp:433
msgctxt "Sonnet::Dialog|@title:window"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/core/guesslanguage.cpp new/sonnet-5.20.0/src/core/guesslanguage.cpp
--- old/sonnet-5.19.0/src/core/guesslanguage.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/core/guesslanguage.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -278,6 +278,10 @@
{
QString triMapFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kf5/sonnet/trigrams.map"));
+ if (triMapFile.isEmpty()) {
+ triMapFile = QStringLiteral("%1/../share/kf5/sonnet/trigrams.map").arg(QCoreApplication::applicationDirPath());
+ }
+
QFile sin(triMapFile);
if (!sin.open(QIODevice::ReadOnly)) {
qWarning() << "Sonnet: Unable to load trigram models from file" << triMapFile;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/core/textbreaks.cpp new/sonnet-5.20.0/src/core/textbreaks.cpp
--- old/sonnet-5.19.0/src/core/textbreaks.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/core/textbreaks.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -21,6 +21,7 @@
#include
#include
#include
+#include <QTextBoundaryFinder>
#include "textbreaks_p.h"
@@ -57,11 +58,6 @@
d->text = text;
}
-static inline bool isWordSeparator(const QChar character)
-{
- return character.isSpace() || character.isMark() || character.isPunct() || character.isSymbol();
-}
-
TextBreaks::Positions TextBreaks::wordBreaks(const QString &text)
{
Positions breaks;
@@ -70,68 +66,58 @@
return breaks;
}
- int i=0;
- do {
- if (i == 0 || isWordSeparator(text[i])) {
- Position pos;
-
- // Seek past leading separators
- while (i < text.length() && isWordSeparator(text[i])) {
- i++;
- }
+ QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::Word, text);
- pos.start = i;
- while (i < text.length() && !isWordSeparator(text[i])) {
- i++;
+ while (boundaryFinder.position() < text.length()) {
+ if (!(boundaryFinder.boundaryReasons().testFlag(QTextBoundaryFinder::StartOfItem))) {
+ if (boundaryFinder.toNextBoundary() == -1) {
+ break;
}
- pos.length = i - pos.start;
+ continue;
+ }
- if (pos.length > 0) {
- breaks.append(pos);
- }
- } else {
- i++;
+ Position pos;
+ pos.start = boundaryFinder.position();
+ int end = boundaryFinder.toNextBoundary();
+ if (end == -1) {
+ break;
+ }
+ pos.length = end - pos.start;
+ if (pos.length < 1) {
+ continue;
}
- } while (i < text.length());
+ breaks.append(pos);
+ if (boundaryFinder.toNextBoundary() == -1) {
+ break;
+ }
+ }
return breaks;
}
-static inline bool isSentenceSeparator(const QChar &character)
-{
- return character.isMark() || character.isPunct() || character.category() == QChar::Separator_Paragraph;
-}
-
TextBreaks::Positions TextBreaks::sentenceBreaks(const QString & text)
{
Positions breaks;
- if (text.isEmpty())
+ if (text.isEmpty()) {
return breaks;
+ }
- int i=0;
- do {
- if (i == 0 || isSentenceSeparator(text[i])) {
- Position pos;
+ QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::Sentence, text);
- while (i < text.length() && !text[i].isLetter()) {
- i++;
- }
-
- pos.start = i;
- do {
- i++;
- } while (i < text.length() && !isSentenceSeparator(text[i]));
- pos.length = i - pos.start;
-
- // null-terminated, hence more than 1
- if (pos.length > 1)
- breaks.append(pos);
- } else {
- i++;
+ while (boundaryFinder.position() < text.length()) {
+ Position pos;
+ pos.start = boundaryFinder.position();
+ int end = boundaryFinder.toNextBoundary();
+ if (end == -1) {
+ break;
}
- } while (i < text.length());
-
+ pos.length = end - pos.start;
+ if (pos.length < 1) {
+ continue;
+ }
+ breaks.append(pos);
+ }
return breaks;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/plugins/hunspell/CMakeLists.txt new/sonnet-5.20.0/src/plugins/hunspell/CMakeLists.txt
--- old/sonnet-5.19.0/src/plugins/hunspell/CMakeLists.txt 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/plugins/hunspell/CMakeLists.txt 2016-03-05 20:15:12.000000000 +0100
@@ -2,9 +2,9 @@
########### next target ###############
if (EXISTS "/usr/share/hunspell/")
-add_definitions(-DHUNSPELL_MAIN_DICT_PATH="/usr/share/hunspell/")
+add_definitions(-DHUNSPELL_MAIN_DICT_PATH="/usr/share/hunspell")
elseif (EXISTS "/usr/share/myspell/")
-add_definitions(-DHUNSPELL_MAIN_DICT_PATH="/usr/share/myspell/")
+add_definitions(-DHUNSPELL_MAIN_DICT_PATH="/usr/share/myspell")
endif (EXISTS "/usr/share/hunspell/")
include_directories( ${HUNSPELL_INCLUDE_DIR} )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/plugins/hunspell/hunspellclient.cpp new/sonnet-5.20.0/src/plugins/hunspell/hunspellclient.cpp
--- old/sonnet-5.19.0/src/plugins/hunspell/hunspellclient.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/plugins/hunspell/hunspellclient.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -23,6 +23,8 @@
#include "hunspelldebug.h"
#include <QDir>
+#include <QString>
+#include <QCoreApplication>
#include <QDebug>
using namespace Sonnet;
@@ -68,6 +70,9 @@
#endif
QDir dir(QStringLiteral(HUNSPELL_MAIN_DICT_PATH));
+ if (!dir.exists()) {
+ dir.setPath(QStringLiteral("%1/../share/hunspell").arg(QCoreApplication::applicationDirPath()));
+ }
if (dir.exists()) {
foreach (const QString &dict, dir.entryList(QStringList(AFF_MASK), QDir::Files)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/plugins/hunspell/hunspelldict.cpp new/sonnet-5.20.0/src/plugins/hunspell/hunspelldict.cpp
--- old/sonnet-5.19.0/src/plugins/hunspell/hunspelldict.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/plugins/hunspell/hunspelldict.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -25,9 +25,15 @@
#include <QDebug>
#include <QTextCodec>
#include <QStringBuilder>
+#include <QCoreApplication>
using namespace Sonnet;
+static const QString composeDictName(const QByteArray &dirPath, const QString &lang)
+{
+ return QFile::decodeName(dirPath+'/') + lang + QStringLiteral(".dic");
+}
+
HunspellDict::HunspellDict(const QString &lang)
: SpellerPlugin(lang)
, m_speller(0)
@@ -36,27 +42,31 @@
qCDebug(SONNET_HUNSPELL) << " HunspellDict::HunspellDict( const QString& lang ):" << lang;
QByteArray dirPath = QByteArrayLiteral(HUNSPELL_MAIN_DICT_PATH);
- QString dic = QLatin1String(dirPath) % lang % QLatin1String(".dic");
+ QString dic = composeDictName(dirPath, lang);
+
+ if (!QFileInfo::exists(dic)) {
+ dirPath = QFile::encodeName(QCoreApplication::applicationDirPath()) + QByteArrayLiteral("/../share/hunspell");
+ dic = composeDictName(dirPath, lang);
+ }
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
- if (!QFileInfo(dic).exists()) {
+ if (!QFileInfo::exists(dic)) {
#ifdef Q_OS_MAC
dirPath = QByteArrayLiteral("/Applications/LibreOffice.app/Contents/Resources/extensions/dict-") + lang.leftRef(2).toLatin1();
#endif
#ifdef Q_OS_WIN
dirPath = QByteArrayLiteral("C:/Program Files (x86)/LibreOffice 5/share/extensions/dict-") + lang.leftRef(2).toLatin1();
#endif
- dic = QLatin1String(dirPath) % QLatin1Char('/') % lang % QLatin1String(".dic");
- if (lang.length()==5 && !QFileInfo(dic).exists()) {
+ dic = composeDictName(dirPath, lang);
+ if (lang.length()==5 && !QFileInfo::exists(dic)) {
dirPath += '-' + lang.midRef(3,2).toLatin1();
- dic = QLatin1String(dirPath) % QLatin1Char('/') % lang % QLatin1String(".dic");
+ dic = composeDictName(dirPath, lang);
}
- dirPath += '/';
}
#endif
- if (QFileInfo(dic).exists()) {
- m_speller = new Hunspell(QByteArray(dirPath + lang.toLatin1() + ".aff").constData(), dic.toLatin1().constData());
+ if (QFileInfo::exists(dic)) {
+ m_speller = new Hunspell(QByteArray(dirPath + "/" + lang.toLatin1() + ".aff").constData(), dic.toLatin1().constData());
m_codec = QTextCodec::codecForName(m_speller->get_dic_encoding());
if (!m_codec) {
qWarning() << "Failed to find a text codec for name" << m_speller->get_dic_encoding() << "defaulting to locale text codec";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/plugins/hunspell/hunspelldict.h new/sonnet-5.20.0/src/plugins/hunspell/hunspelldict.h
--- old/sonnet-5.19.0/src/plugins/hunspell/hunspelldict.h 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/plugins/hunspell/hunspelldict.h 2016-03-05 20:15:12.000000000 +0100
@@ -28,7 +28,7 @@
#ifdef Q_OS_MAC
#define HUNSPELL_MAIN_DICT_PATH "/System/Library/Spelling"
#else
-#define HUNSPELL_MAIN_DICT_PATH "/usr/share/hunspell/"
+#define HUNSPELL_MAIN_DICT_PATH "/usr/share/hunspell"
#endif
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/ui/highlighter.cpp new/sonnet-5.20.0/src/ui/highlighter.cpp
--- old/sonnet-5.19.0/src/ui/highlighter.cpp 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/ui/highlighter.cpp 2016-03-05 20:15:12.000000000 +0100
@@ -71,7 +71,7 @@
{
tokenizer = new WordTokenizer();
active = true;
- automatic = true;
+ automatic = false;
connected = false;
wordCount = 0;
errorCount = 0;
@@ -357,7 +357,6 @@
d->spellchecker->setLanguage(prevLang);
return;
}
- d->spellchecker->setAttribute(Speller::AutoDetectLanguage, false);
d->wordCount = 0;
d->errorCount = 0;
if (d->automatic) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/sonnet-5.19.0/src/ui/highlighter.h new/sonnet-5.20.0/src/ui/highlighter.h
--- old/sonnet-5.19.0/src/ui/highlighter.h 2016-02-06 15:03:16.000000000 +0100
+++ new/sonnet-5.20.0/src/ui/highlighter.h 2016-03-05 20:15:12.000000000 +0100
@@ -188,7 +188,6 @@
public Q_SLOTS:
/**
* Set language to use for spell checking.
- * Warning: this disables automatic language detection
*
* @param language the language code for the new language to use.
*/