Configuration capabilities for online dictionaries
Needs RevisionPublic

Authored by dkardarakos on Dec 18 2017, 12:41 PM.

Details

Reviewers
tcanabrava
Group Reviewers
KDE Edu
Summary

On-line dictionaries, until now, were hard coded to browser widget class. Instead of this, a new section has been added to configuration: Dictionaries. This section consists of a list of dictionaries and as a set of three buttons: Add, Edit, Remove. Initially, the list is loaded with the previously-hard coded dictionary entries, which are now configuration defaults. User may select an existing dictionary and edit or remove it. In case of editing, a dialog opens that enables the user to edit name, url, source language and target language. Moreover, user may press Add button so as to add a new dictionary entry. Finally, a set of error handling rules have been added, preventing the user from adding an entry with empty name or url.

Test Plan

Check that in Settings, Dictionaries section has been added, containing a set of on-line dictionaries

Add Dictionary

  • In Settings->Dictionaries, click Add. An editor opens. Add a new dictionary entry. Click OK.

A new dictionary is added to the list.

Update Dictionary

  • In Settings->Dictionaries, select a dictionary, click Add. An editor opens. Edit an existing dictionary entry. Click OK.

Dictionary has been updated.

Remove Dictionary

  • In Settings->Dictionaries, select a dictionary, click Remove.

Dictionary is removed from the list.

Check buttons

  • In Settings->Dictionaries, ensure that no dictionary is selected.

Edit, Remove buttons are not available.

Apply

  • In Settings->Dictionaries, Add, Edit, Remove some dictionaries. Press OK/Apply.

In Browser Widget, dictionary list displays the updated dictionary list.

Diff Detail

Repository
R340 Parley
Lint
Lint Skipped
Unit
Unit Tests Skipped
dkardarakos requested review of this revision.Dec 18 2017, 12:41 PM
dkardarakos created this revision.
tcanabrava requested changes to this revision.Nov 2 2018, 4:18 PM
tcanabrava added a subscriber: tcanabrava.
tcanabrava added inline comments.
src/settings/dictionaryeditor.h
41

enum class short ?

src/settings/parley.kcfg
401

This is way better if it's a json file outside of the kcfg group.
default-dictionaries.json or something.

This revision now requires changes to proceed.Nov 2 2018, 4:18 PM
Restricted Application added a subscriber: kde-edu. ยท View Herald TranscriptNov 2 2018, 4:18 PM