Modify NVDA behavior with CLDR characters#9707
Conversation
…ytimes and quicker configurable. * In the cldr.dic files, set the punctuation level to none * Add shift+NVDA+p to toggle on and off CLDR characters anouncement Fix #8826
|
Is this all CLDR characters, or only Emojis? I understood this to be primarily
about fixing Emoji handling, but my brief comprehension of CLDR is that it
includes much more than Emojis. Although maybe I am mistaken about one of those
things.
Either way, I think the changelog should at least mention Emojis in this
context, as the vast majority of people will have no idea what CLDR is, and will
assume it doesn't apply to them.
Maybe: (Section: New features) "Add a gesture, shift+NVDA+p by default, to
toggle on and off CLDR (Emoji) character reporting". and (Section: Changes)
"When CLDR (Emoji) character reporting is enabled, announce them on every punctuation level"
|
|
Thanks @XLTechie for your comment. I also added a test I did but forgot to mention. |
|
Thank you for the changes. Either way, nice work and will be appreciated by many
I'm sure!
|
|
Someone like @feerrenrut will need to review this, but before that, you might want to include with this an update to the user guide mentioning this new key. |
|
I've just updated the user guide to mention the new gesture. |
|
CC: @michaelDCurran |
|
Hi, I will review this code in a few moments, and no, I don’t think this will make the cut to 2019.2 as major features are frozen. Personally, when translatable string freeze is declared, I consider this a feature freeze. Thanks.
From: Luke Davis <notifications@github.com>
Sent: Tuesday, June 18, 2019 2:39 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [nvaccess/nvda] Modify NVDA behavior with CLDR characters (#9707)
CC: @michaelDCurran <https://github.com/michaelDCurran>
I know you're busy with Python 3 work, but this seemed like a small enough issue to make it into 2019.2 if someone could take a look at it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#9707?email_source=notifications&email_token=AB4AXEDPQUA7TJGBX6X3FG3P3CUK7A5CNFSM4HWSWZA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX5Z2LQ#issuecomment-503029038> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AB4AXECIEX7EFY2X6SGH543P3CUK7ANCNFSM4HWSWZAQ> .
|
Doesn't change anything but everything will be automatically tested again to be sure.
|
Hi, Argument for postponing this after 2019.2: translatable strings are present, which will require explanation and translation by translators. A while ago string freeze was extended a bit but it was to allow really last minute translations to be included. Thanks. |
|
I wasn't thinking of how late in the game we were for 2019.2 when I wrote that,
but of course you are right. That's what I get for posting on no sleep.
|
josephsl
left a comment
There was a problem hiding this comment.
Few general comments:
- CLDR sconscript: can you write a short comment explaining why the punctuation level change is needed?
- Keyboard command: I personally don't care about assigning a default shortcut, I think some may ask you to leave it unassigned.
- Input help mode fails: I think there is a mismatch between the name of the new script and the name of the script used for obtaining the docstring (input help mode message). I can tell how this happened - when doing a copy/paste, I think it would help if you check the names defined for script and the docstring to really make sure input help works.
@LeonarddeR, what do you think?
|
Hi Luke, Don't worry about making that comment - I myself made terrible mistakes and assumed bad things after an insomnia. Thanks. |
| dictFile.write(u"symbols:\r\n") | ||
| for pattern, description in cldrDict.iteritems(): | ||
| dictFile.write(u"{pattern}\t{description}\tsome\r\n".format( | ||
| dictFile.write(u"{pattern}\t{description}\tnone\r\n".format( |
There was a problem hiding this comment.
Please remove None here, as it is the implicit default. It will save us a lot of space.
| dictFile.write(u"{pattern}\t{description}\tnone\r\n".format( | |
| dictFile.write(u"{pattern}\t{description}\r\n".format( |
There was a problem hiding this comment.
Please remove
Nonehere, as it is the implicit default. It will save us a lot of space.
After some test, it looks like the default level is all when I remove all "none", emojis were not pronounced except if I was on "all" level.
| # Translators: Describes a command. | ||
| script_recognizeWithUwpOcr.__doc__ = _("Recognizes the content of the current navigator object with Windows 10 OCR") | ||
|
|
||
| def script_toggleReportCLDR(self,gesture): |
There was a problem hiding this comment.
Please use the script decorator to set script metadata. script_review_currentSymbol is a good example here.
|
@LeonarddeR: before I push all requested changes, are you on the same
though as @josephsl about assigning no gesture by default?
I ask because of your last comment on issue #8826 where you suggested
the gesture.
Thanks.
|
|
I do not have a particular preference. Would be good to know what either @michaelDCurran or @feerrenrut prefers. |
|
Ah, looks like I read things wrong there. Excuse me.
|
cldrDict_sconscript: * Add a comment to specify why punctuation level is set to none source/globalCommands.py: * Use script decorator instead of old-style coding * Fix translators comments * commented gesture assignment until final advice
|
@LeonarddeR @josephsl @feerrenrut anything else to change on the code to be merged? |
No, only high priority bug fixes will be considered for merging for now. |
One error left: continuation line under-indented for hanging indent I don't understand how to fix this when I took it from another part of this file
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit d66cc3b6b9 |
|
In commit e5f1601 I fixed a strange coding style thing: |
|
All looks good with tests :) thanks for the fixes @feerrenrut and @LeonarddeR if I don't make a mistake. |
… be reviewed again by @josephsl or someone else
michaelDCurran
left a comment
There was a problem hiding this comment.
Is the script supposed to be bound to NVDA+shift+p by default or not? It looks like it isn't, yet the userGuide says it is.
I'm thinking that in the end it was decided not to bind the script by default. So if true, please remove the changes to the userGuide.
|
I finally decided to let user decide to add a shortcut or not as suggested by @josephsl and it is now removed from the user documentation. |
josephsl
left a comment
There was a problem hiding this comment.
The only thing missing is the user guide edit advising users to assign a command to toggle this feature from everywhere (you can use the wording from simple review mode entry).
Link to issue number:
#8826
Summary of the issue:
Emojis are not announced on every punctuation level.
Emojis are not properly punctuations, there are characters which provide more precision about a written message missing them might cause confusion.
As emojis are handled with CLDR characters database, we have to change NVDA behavior for all these characters.
Description of how this pull request fixes the issue:
Testing performed:
Known issues with pull request:
None found
Change log entry:
Section: New features
Section: Changes