ability to add more punctuation symbols in the Punctuation/Symbols Pronunciation dialog box #4354
Comments
Comment 2 by norrumar on 2014-10-24 09:18
|
Comment 4 by jteh on 2014-10-24 09:51 |
Comment 5 by jteh on 2014-10-24 09:55 |
Comment 6 by norrumar on 2014-10-24 10:06 |
Comment 7 by blindbhavya on 2014-10-24 10:11 |
Comment 8 by norrumar (in reply to comment 7) on 2014-10-24 10:34
Please, see 2.2. Symbol pronunciation, of the NVDA Developer guide at: |
Comment 9 by jteh on 2014-10-24 10:34
|
Comment 10 by blindbhavya on 2014-10-24 10:46 |
Comment 11 by jteh (in reply to comment 6) on 2014-10-24 10:49
As you say, that's pretty ugly and it also isn't particularly user or localisation friendly. It just occurred to me that since we only need to know whether to enable/disable the Remove button as we move to each item in the list (i.e. one item at a time), we can just check whether the symbol is present in sources other than user defined symbols at that point. That will require some changes to SymbolProcessor, but it shouldn't be too drastic. |
Comment 12 by norrumar (in reply to comment 11) on 2014-10-24 16:10
I agree with you. |
Comment 13 by norrumar on 2014-10-26 22:05 At this point it's possible to add new symbols, but not remove them, and it's not disallowed to add the same symbol many times. |
Comment 14 by jteh on 2014-10-26 22:09 |
Comment 15 by norrumar (in reply to comment 14) on 2014-10-28 18:29
Hi, the work is incomplete, but if you want can review it or give me some recommendations.
|
Comment 16 by jteh (in reply to comment 15) on 2014-10-28 22:03
I'm not sure what you mean by "different times" here. If you mean order, the order doesn't matter. If you mean duplicates, duplicates should not be allowed.
I agree that this is potentially unintuitive. I think the Remove button should be disabled for these. This is what I meant about the need for this distinction in SymbolProcessor; see comment:11. |
Comment 17 by norrumar (in reply to comment 16) on 2014-10-28 22:35
I mean duplicates.
I have started to work on this. See |
Comment 18 by norrumar on 2014-11-01 10:06 |
Comment 20 by jteh on 2014-11-04 03:54 You use the built-in symbols for the current locale to check whether a symbol is built in. However, for non-English locales, the English symbols are also used as a base, so you actually need to check two sets of symbols. I'd suggest that you keep a list of built-in sources on SpeechSymbolProcessor and add a SpeechSymbolProcessor.isBuiltin method which takes a symbol identifier and returns True if it's present in any of the built-in sources. When adding a new symbol, the SpeechSymbolProcessor.updateSymbol method:
SpeechSymbolProcessor.deleteSymbol is currently broken. It needs to delete the item, not call pop on the item itself. I see you don't currently use this, but I think it'd be better if you did. Regarding SymbolEntryDialog:
You use wx.NewId and then bind events based on id. Instead, it's clearer to forget ids and instead just bind to the button directly:
You seem to delete all items in symbolsList and then rebuild it whenever an entry is added or removed. This isn't efficient and I don't think you need to do this. Just add or remove the relevant item from the list. I also don't follow the need for the code that loops through and clears selection. The Remove button actually removes the symbol from SpeechSymbolProcessor. This means that if the user presses Cancel, it won't revert the changes. Instead, I think you'll need to keep a list of symbols for pending removal and only remove in onOk. This means you'll also have to remove it from that list if the same symbol is added again. Thanks! |
Comment 21 by norrumar (in reply to comment 20) on 2014-11-06 06:41 Replying to jteh:
Thank you for the revision!
Hope is done now.
I think it's done.
better if you did. I'm using it to add symbols to pendingRemovals.
I think it's done.
I don't use defaultPosition. The sintax you are using seems to produce an error, and it seems to be fixed adding poss=wx.DefaultPosition, but perhaps we don't need this.
I have implemented your suggestions, with some changes, addressing pendingRemovals.
Hope it's done.
Yes, I don't know why when I started to work with this got errors and I fixed them using this inefficient code.
Hope it's fixed with pendingRemovals and restore button.
Thank you. |
Comment 22 by jteh (in reply to comment 21) on 2014-11-06 06:52 Replying to norrumar:
Sorry. Bad copy and paste error on my part. :( Yes, you can remove the pos argument altogether, since DefaultPosition is the default.
Did you find a better fix for these errors? (If you've already fixed it in the new code, great!) If not, do you remember what the errors were? |
Comment 23 by norrumar (in reply to comment 22) on 2014-11-06 10:28
OK.
I don't get none error now. |
Comment 24 by jteh on 2014-11-07 03:46 In SpeechSymbolProcessor:
Please use a variable, rather than fetching twice. I like the new approach you've taken in updateSymbol. Nice. Regarding symbol deletion:
Thanks! |
Comment 25 by norrumar (in reply to comment 24) on 2014-11-08 06:07
Oh, sorry. Sure.
Done, with symbolIdentifier instead of identifier.
Thanks, I had done it with other reviewer, but I didn't know your opinion. Done.
Thanks.
I think its right now.
Done. I don't know too much about what users can prefer.
Yes, I think it's done.
Thank you for your suggestion and revision. |
Comment 26 by norrumar on 2014-11-08 08:07 |
Comment 27 by norrumar on 2014-11-08 18:09 |
Comment 28 by norrumar on 2014-11-10 12:34 |
Comment 29 by jteh on 2014-11-11 06:26
Thanks for all your work. |
Comment 30 by James Teh <jamie@... on 2014-11-11 06:27
Changes:
|
Comment 31 by norrumar on 2014-11-11 06:28 |
Comment 32 by James Teh <jamie@... on 2014-11-11 07:02
|
Comment 33 by jteh (in reply to comment 31) on 2014-11-11 07:07
It's not only confusing; it causes brokenness. :)
I fixed a further issue related to this. editingItem needs to be set as well. Otherwise, you get exceptions and other brokenness when you tab out of replacement/level. Nice catches! Btw, I squashed all of your original commits into one for the official t4354 branch. It'd be great if you can make any fixes against that. To do this, switch to your t4354 branch and:
|
Comment 34 by norrumar (in reply to comment 33) on 2014-11-11 08:13
Thanks. I thought so, but I wasn't sure.
Yes, thanks.
Done, thanks. |
Comment 35 by jteh (in reply to comment 34) on 2014-11-11 09:52
You're welcome. Ideally, I would have gone through further code review iterations, as it helps developers to learn and thus we get even better code in future. :) However, I've got a lot on my plate right now and I wanted to make sure this didn't get neglected. |
Comment 36 by James Teh <jamie@... on 2014-12-03 04:44
Changes:
|
Comment 37 by jteh on 2014-12-03 04:47 |
Reported by blindbhavya on 2014-08-02 16:54
There are several symbols that NVDA (or rather/maybe ESpeak) does not read.
Currently, the user needs to copy paste the symbol in the Default Default Dictionary > Add > Pattern edit box and then type in the Replacement pronunciation text.
So, I propose that there should be an Add button in the Punctuation/Symbol Pronunciation dialog box called 'Add button' (shortcut Alt + A) by which the user can add more punctuation marks or technical symbols.
I feel the necessity of this feature despite the power of the Speech Dictionaries because in the Punctuation/SYmbol Pronunciation dialog box, one can set the punctuation/symbol level at which the symbol should be spoken, which is otherwise inachievable.
Hope I was clear.
Blocking #4563
The text was updated successfully, but these errors were encountered: