|
From: Rafal M. <ra...@us...> - 2005-11-19 20:07:42
|
Hi, Good news - the money for the "editable dictionaries" been collected (see the fddd web page), so I can start working on this. But the first things first and the design has to be made. Please find a preliminary design below. All comments are welcome Cheers, Rafal =============================================== Objective: dictionaries can be edited in zbedic. == Back-end == Editable dictionaries are stored as sqlite2 or sqlite3 database files with ".edic" extension. There can be three types of dictionaries: * read-only: .dic.dz file * editable: .edic file * hybrid: .dic.dz accompanied with .edic file in the same directory and of the same name except the extension Search * For an editable dictionary .edic file is searched * For a hybrid dictionary both .edic and .dic.dz files are searched. If the word exists in both dictionaries, only an entry from the .edic dictionary is displayed. The results from both dictionaries are merged == Front-end == New actions: * Main window ** New entry - creates new entry using the word from the word-box widget (the word must not be found), sets the entry to an empty text and brings up an edit entry widget. For read-only dictionaries, hybrid dictionary will be created ** Edit entry - brings up edit entry widget ** Delete entry - deletes entry. Possible only for entries from an editable dictionary. * Settings window / dictionary tab ** New dictionary - opens a "dictionary properties" window, where the compulsory field "Name" must be entered before an editable dictionary is created ** Properties - open the "dictionary properties" window. If dictionary is editable (but not hybrid), the fields can be edited ** (optional) Export as plain text- exports an editable dictionary (or edited part of a hybrid dictionary) to a text file in a simplified bedic format. ** (optional) Export as TEI XML - exports an editable dictionary (or edited part of a hybrid dictionary) to a file in the TEI XML format. ** "Details" button is removed since "Properties" takes over its function Edit Entry widget * This widget is stacked under the description text widget * This is a multi-line plain text editor * There are several buttons at the top of this widget for entering common tags: meaning / sub-meaning / example / pronunciation. There is also an "accept" button * Edited text is stored in the DB when the widget losses the focus or the accept button is pressed * A formating is done on an entry, prior to display, so that EOLs are inserted in the entry text (otherwise an entry would be a single line) * (optional) syntax check on a edited entry after pressing the accept button Dictionary Properties Window * It contains the following fields: ** Name - a unique ID of the dictionary ** Description ** Copyright ** Maintainer ** Path - editable only for a newly created dictionary ** Read-only text, with additional information: # of entries, build date, size (uncompressed), file (or files for a hybrid dictionary) |