Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify NVDA behavior with CLDR characters #9707

Merged
merged 22 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
51584e6
Modify NVDA behavior with CLDR characters to have them announced ever…
Nardol Jun 10, 2019
54d42e7
Merge remote-tracking branch 'origin/master' into toggleRepportCLDR
Nardol Jun 12, 2019
471027c
User guide: add gesture
Nardol Jun 12, 2019
6ecb6fa
Merge branch 'master' into toggleRepportCLDR
Nardol Jun 17, 2019
286dbe7
Merge branch 'master' into toggleRepportCLDR
Nardol Jun 18, 2019
f86d49f
Changes after reviewS.
Nardol Jun 18, 2019
d4c251a
Merge branch 'master' into toggleRepportCLDR
Nardol Jun 28, 2019
4db50f3
Merge branch 'master' into toggleRepportCLDR
Nardol Jul 1, 2019
e3c3eff
Merge remote-tracking branch 'origin/master' into toggleRepportCLDR
Nardol Jul 28, 2019
797438c
Merge branch 'master' into toggleRepportCLDR
Nardol Aug 1, 2019
82b394e
Merge branch 'master' into toggleRepportCLDR
Nardol Aug 1, 2019
34ded1f
Fix code style for Lint check
Nardol Aug 1, 2019
e5f1601
Code style fix
Nardol Aug 2, 2019
3c38d3e
Merge branch 'master' into toggleRepportCLDR
Nardol Aug 2, 2019
e77187c
Reverted to original code style as codestyle checks now pass
Nardol Aug 2, 2019
7d38924
Merge branch 'master' into toggleRepportCLDR
Nardol Aug 17, 2019
702c6d9
Merge branch 'master' into toggleRepportCLDR
Nardol Sep 6, 2019
a3c6369
Delete the commented gesture, will add it back if needed when PR will…
Nardol Sep 6, 2019
b7d8c2a
Merge branch 'master' into toggleRepportCLDR
Nardol Oct 2, 2019
b9958f1
Remove keyboard shortcut from user guide
Nardol Oct 2, 2019
7c03bb3
Merge branch 'master' into toggleRepportCLDR
Nardol Oct 2, 2019
5402c95
User guide: advise users to assign a command to toggle this feature f…
Nardol Oct 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cldrDict_sconscript
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def createCLDRAnnotationsDict(sources, dest):
with codecs.open(dest, "w", "utf_8_sig", errors="replace") as dictFile:
dictFile.write(u"symbols:\r\n")
for pattern, description in cldrDict.items():
dictFile.write(u"{pattern}\t{description}\tsome\r\n".format(
# Punctuations are set to none for CLDR characters to be pronounced even if user set punctuation level to None
dictFile.write(u"{pattern}\t{description}\tnone\r\n".format(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove None here, as it is the implicit default. It will save us a lot of space.

Suggested change
dictFile.write(u"{pattern}\t{description}\tnone\r\n".format(
dictFile.write(u"{pattern}\t{description}\r\n".format(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove None here, 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.

pattern=pattern,
description=description
))
Expand Down
17 changes: 17 additions & 0 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,23 @@ def script_recognizeWithUwpOcr(self, gesture):
# Translators: Describes a command.
script_recognizeWithUwpOcr.__doc__ = _("Recognizes the content of the current navigator object with Windows 10 OCR")

@script(
# Translators: Input help mode message for toggle report CLDR command.
description=_("Toggles on and off the reporting of CLDR characters, such as emojis"),
category=SCRCAT_SPEECH,
)
def script_toggleReportCLDR(self, gesture):
if config.conf["speech"]["includeCLDR"]:
# Translators: presented when the report CLDR is toggled.
state = _("report CLDR characters off")
config.conf["speech"]["includeCLDR"] = False
else:
# Translators: presented when the report CLDR is toggled.
state = _("report CLDR characters on")
config.conf["speech"]["includeCLDR"] = True
characterProcessing.clearSpeechSymbols()
ui.message(state)

@script(
# Translators: Describes a command.
description=_(
Expand Down
3 changes: 3 additions & 0 deletions user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,10 @@ This option applies to all synthesizers, not just the currently active synthesiz
On by default, this option tells NVDA if the current voice's language can be trusted when processing symbols and characters.
If you find that NVDA is reading punctuation in the wrong language for a particular synthesizer or voice, you may wish to turn this off to force NVDA to use its global language setting instead.

%kc:setting
==== Include Unicode Consortium data (including emoji) when processing characters and symbols ====[SpeechSettingsCLDR]
Key: shift+NVDA+p

When this checkbox is enabled, NVDA will include additional symbol pronunciation dictionaries when pronouncing characters and symbols.
These dictionaries contain descriptions for symbols (particularly emoji) that are provided by the [Unicode Consortium http://www.unicode.org/consortium/] as part of their [Common Locale Data Repository http://cldr.unicode.org/].
If you want NVDA to speak descriptions of emoji characters based on this data, you should enable this option.
Expand Down