<table><tr><td style="">ahmadsamir updated this revision to Diff 50486.<br />ahmadsamir retitled this revision from "Don't fail if defaultLanguage dictionary can't be loaded" to "Display an error message if loading a dictionary fails".<br />ahmadsamir edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-pcuxtjzwjh7w4gf/">(Show Details)</a><br />ahmadsamir edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-jbvrnjv6myzh2v6/">(Show Details)</a><br />ahmadsamir removed a reviewer: loh.tar.<br />ahmadsamir removed a subscriber: pino.<br />ahmadsamir added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D18317">View Revision</a></tr></table><br /><div><div><p>Rework the patch:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">so as not to change the config file without the user's intervention</li>
<li class="remarkup-list-item">core libs shouldn't depend on Gui bits</li>
</ul></div></div><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">If the files of the the dictionary set in defaultLanguage= can't be</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Make Loader emit a signal when loading a dictionary fails; this way<br />
Ui parts can receive that signal and display an appropriate message box.<br />
At the moment DictionaryCombobox, listens to that signal, (the combobox<br />
is used in configWidget, which is embedded in configuration dialogs of</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">loaded</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">apps using Sonnet</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">instead of failing silently,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">e.g.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">try to load</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Kate (both in</span> the <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">locale language</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">config dialog and in the</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">dictionary</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">spellcheck bar)</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and display a message informing the user of what's been done</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Calligrawords)</span>.<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div> file under the home dir<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">)</span>, and set defaultLanguage= to something invalid/unavailable,<div style="padding: 8px 0;">...</div>- Start e.g. kate and <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">try to spell check something; note that doesn't work</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">open the settings dialog or spell check a document</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and this error log is</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">(via the Tools -> Spelling -></span> spe<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">wed to the terminal:</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">lling menu), an error message about</span><br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">"sonnet.core: No languag</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the unavailabl</span>e dictionar<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ies for the language: "de_AT_ost""<br />
- Apply th</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">y should b</span>e di<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">ff and try again</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">splayed.</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R246 Sonnet</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D18317?vs=49714&id=50486">https://phabricator.kde.org/D18317?vs=49714&id=50486</a></div></div><br /><div><strong>BRANCH</strong><div><div>invalid-defaultLanguage (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18317">https://phabricator.kde.org/D18317</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/core/loader.cpp<br />
src/core/loader_p.h<br />
src/ui/dictionarycombobox.cpp<br />
src/ui/dictionarycombobox.h</div></div></div><br /><div><strong>To: </strong>ahmadsamir, sandsmark, loh.tar<br /><strong>Cc: </strong>kde-frameworks-devel, michaelh, ngraham, bruns, pino<br /></div>