D28406: Fix sonnet autodetect test failure

2020-04-11 Thread Waqar Ahmed
waqar added a comment. In D28406#644383 , @dfaure wrote: > @waqar ping? What do you think about my suggestion? If you agree, can you update the patch? Sorry I have been really busy at work, and overlooked the last email. I did plan to wo

D28406: Fix sonnet autodetect test failure

2020-03-29 Thread Waqar Ahmed
waqar added a comment. In D28406#637359 , @dfaure wrote: > I'm no expert in this stuff, but here's my feedback > > 1. on my own system (!= CI), all three tests were failing before, due to finding en_AU-variant_1, en_AU-variant_1 and "". > 2

D28406: Fix sonnet autodetect test failure

2020-03-29 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > dfaure wrote in test_autodetect.cpp:51 > This will have an effect on *other* instances of the Speller class? Yes, behind the scenes it is saved in the Settings. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D28406 To: waq

D25495: Fix Sonnet autodetect failing on Indian langs

2020-03-29 Thread Waqar Ahmed
waqar added a comment. > Please have a look and submit fixes. Patch sent at: D28406 REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig, cullmann, apol Cc: dfaure, apol, ognarb, kde-frameworks-devel, LeGas

D28406: "Fix sonnet autodetect test failure"

2020-03-29 Thread Waqar Ahmed
waqar created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. waqar requested review of this revision. REPOSITORY R246 Sonnet BRANCH fix-autodetect-test (branched from master) REVISION DETAIL https://phabricator.kde.org/D28406 AFFECTED F

D25495: Fix Sonnet autodetect failing on Indian langs

2020-03-29 Thread Waqar Ahmed
waqar added a comment. INLINE COMMENTS > dfaure wrote in test_autodetect.cpp:39 > Is there an explicit way to check whether a dictionary is installed? > The test row should be skipped, if not. On it. I will fix and send the patch REPOSITORY R246 Sonnet REVISION DETAIL https://phabricat

D25495: Fix Sonnet autodetect failing on Indian langs

2020-03-24 Thread Waqar Ahmed
waqar added a comment. I tried but I don't have the access. So I guess you guys would have land. REPOSITORY R246 Sonnet BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig, cullmann, apol Cc: apol, ognarb, kde-frameworks-

D25495: Fix Sonnet autodetect failing on Indian langs

2020-03-24 Thread Waqar Ahmed
waqar added a comment. In D25495#633551 , @apol wrote: > Whatever, let's go with this and we can learn along the way. > > Sorry it took so long. I am excited. Thanks! I will be sure to keep checking in if anything goes amiss in

D25495: Fix Sonnet autodetect failing on Indian langs

2020-03-24 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > apol wrote in guesslanguage.cpp:586 > Why did you handle it here rather than in identify then? is it a problem > doing it there? I see that identify is being used elsewhere too. It will be > wrong there. Initially I handled it in identify () but t

D25495: Fix Sonnet autodetect failing on Indian langs

2020-02-09 Thread Waqar Ahmed
waqar added a comment. In D25495#608582 , @apol wrote: > This patch makes it do all the languages identified by identify + all the languages supported by the script. This could mean lots of languages for some scripts... `s_scriptLanguage

D25495: Fix Sonnet autodetect failing on Indian langs

2020-02-09 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > apol wrote in guesslanguage.cpp:586 > Shouldn't identify be taking care of the scripts already? `identify()` fails if a certain language is not present in the trigrams. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495

D25495: Fix Sonnet autodetect failing on Indian langs

2020-02-07 Thread Waqar Ahmed
waqar added a comment. ping REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig, cullmann Cc: ognarb, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns

D26346: Sonnet: Fix returning from GuessLanguagePrivate::guessFromTrigrams

2020-01-26 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > guesslanguage.cpp:745 > > -while (it.hasNext() && counter < m_maxItems && confidence < > m_minConfidence) { > +while (it.hasNext() && counter < m_maxItems && (m_minConfidence == 0.0 > || confidence < m_minConfidence)) { > it.next

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-03 Thread Waqar Ahmed
waqar marked an inline comment as done. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig, cullmann Cc: ognarb, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-03 Thread Waqar Ahmed
waqar marked an inline comment as done. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig, cullmann Cc: ognarb, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-03 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > mludwig wrote in guesslanguage.cpp:589 > Couldn't this if-statement can be dropped? I guess one can argue that > sometimes there may be a language without trigrams that would even be a > better language guess? Yeah, I think so too REPOSITORY R2

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-03 Thread Waqar Ahmed
waqar updated this revision to Diff 72684. waqar added a comment. Apply requested changes REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=72545&id=72684 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25495

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-01 Thread Waqar Ahmed
waqar updated this revision to Diff 72545. waqar added a comment. Apply requested changes REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70291&id=72545 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25495

D25495: Fix Sonnet autodetect failing on Indian langs

2020-01-01 Thread Waqar Ahmed
waqar added a comment. Hi, First of all thanks for reviewing. > I'd suggest to move your changes to GuessLanguage::identify(const QString &text, const QStringList &suggestionsListIn) after the call to d->identify(text, d->findRuns(text)); Okay. I will do that, but I will have to m

D25530: Sonnet: Add locales that are missing in QLocale

2019-12-16 Thread Waqar Ahmed
waqar abandoned this revision. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25530 To: waqar Cc: cullmann, aspotashev, aacid, yurchor, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25495: Fix Sonnet autodetect failing on Indian langs

2019-12-16 Thread Waqar Ahmed
waqar added a comment. ping REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-30 Thread Waqar Ahmed
waqar added a comment. > I honestly would prefer if you abandon this, but maybe let it open for a few days in case someone else disagrees. Alright. > Please shout if you need help with improving QLocale I sure do! :) REPOSITORY R246 Sonnet REVISION DETAIL https://phabricat

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-29 Thread Waqar Ahmed
waqar added a comment. Yes, I think so too. @aacid thank you for your patience and guidance. Should I withdraw this or wait for further review? REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25530 To: waqar Cc: cullmann, aspotashev, aacid, yurchor, kde-fram

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-27 Thread Waqar Ahmed
waqar added a comment. > With no respect for your lack of being subtle I meant no disrespect to anyone. If you felt offended I apologize > we need to maintain this for 20 years in the future, you making a quick hack here doesn't make this any better, the user will still see cv_RU in

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-27 Thread Waqar Ahmed
waqar updated this revision to Diff 70399. waqar added a comment. Add test for iso code to language names REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25530?vs=70310&id=70399 BRANCH add-missing-locales (branched from master) REVISION DETAIL https://p

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-26 Thread Waqar Ahmed
waqar added a comment. > Sorry but i don't think this is an acceptable solution, With all due respect, the end user doesn't give a crap whether it was a problem in QLocale, or whether it needed to be done in many places in KDE code and that nobody did it. The end user opens the menu, see

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-26 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > aspotashev wrote in loader.cpp:255 > There may be different consistent approaches to capitalization: > > 1. Use the spelling like if the language name comes in the middle of a > sentence. This implies all-lowercase spelling for many Cyrillic-based

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-25 Thread Waqar Ahmed
waqar added inline comments. INLINE COMMENTS > aspotashev wrote in loader.cpp:255 > Is there any rule behind your decision to spell some language names > capitalized and some others not capitalized? > > Examples: > > - Чӑвашла - first letter is capital > - коми - all letters in lowercase > >

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-25 Thread Waqar Ahmed
waqar marked 3 inline comments as done. waqar added a comment. In D25530#567472 , @aacid wrote: > Any reason we particularly need this here instead of improving Qt? Improving Qt is definitely the better and correct way. But in the meanwhil

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-25 Thread Waqar Ahmed
waqar updated this revision to Diff 70310. waqar added a comment. Remove accent from Росси́я REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25530?vs=70306&id=70310 BRANCH add-missing-locales (branched from master) REVISION DETAIL https://phabricator.kd

D25530: Sonnet: Add locales that are missing in QLocale

2019-11-25 Thread Waqar Ahmed
waqar created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. waqar requested review of this revision. REVISION SUMMARY QLocale is missing some locales and as a result the file name of the dictionaries of these locales are used in menus instea

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-25 Thread Waqar Ahmed
waqar updated this revision to Diff 70291. waqar added a comment. Remove unused includes REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70290&id=70291 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25495

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-25 Thread Waqar Ahmed
waqar updated this revision to Diff 70290. waqar added a comment. Update copyright REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70289&id=70290 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25495 AFFEC

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-25 Thread Waqar Ahmed
waqar updated this revision to Diff 70289. waqar added a comment. Add Test for autodetection REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70288&id=70289 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-25 Thread Waqar Ahmed
waqar updated this revision to Diff 70288. waqar added a comment. Add test for autodetection REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70262&id=70288 BRANCH fix-176537 (branched from master) REVISION DETAIL https://phabricator.kde.org/D25

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-24 Thread Waqar Ahmed
waqar updated this revision to Diff 70262. waqar added a comment. Revert a change, as autodetection fails for languages with similar scripts REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70238&id=70262 BRANCH fix-176537 (branched from master) R

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-23 Thread Waqar Ahmed
waqar edited the summary of this revision. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar, mludwig Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-23 Thread Waqar Ahmed
waqar updated this revision to Diff 70238. waqar edited the summary of this revision. waqar added a comment. Fix Sonnet autodetect completely failing when no trigrams found REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D25495?vs=70237&id=70238 BRANCH fix-

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-23 Thread Waqar Ahmed
waqar edited the summary of this revision. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D25495 To: waqar Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D25495: Fix Sonnet autodetect failing on Indian langs

2019-11-23 Thread Waqar Ahmed
waqar created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. waqar requested review of this revision. REVISION SUMMARY Fixes Bug 176537. Sonnet fails to autodetect a language if there are no trigrams available for the language. In some cases,

D25492: Remove a redundant check

2019-11-23 Thread Waqar Ahmed
waqar created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. waqar requested review of this revision. REVISION SUMMARY Removed a redundant check from textbreaks.cpp REPOSITORY R246 Sonnet BRANCH perf (branched from master) REVISION DETA