Skip to content

Use locale for delayed character descriptions#13972

Merged
seanbudd merged 3 commits intobetafrom
fixLangCharDesc
Aug 4, 2022
Merged

Use locale for delayed character descriptions#13972
seanbudd merged 3 commits intobetafrom
fixLangCharDesc

Conversation

@seanbudd
Copy link
Copy Markdown
Member

@seanbudd seanbudd commented Aug 2, 2022

Link to issue number:

Fixes #13969
Fixes #13966

Background for the feature in PR #13550

Summary of the issue:

NVDA does not correctly handle language switching commands when speaking character descriptions.

Description of user facing changes

Ensure character descriptions are read in the proper locale where known.

Description of development approach

Use the same code other spelling commands use, _getSpellingSpeechWithoutCharMode, which handles language switching.

Testing strategy:

  1. Enable delayed character descriptions
  2. Open a browser window using the following data string: data:text/html,<div lang="de" contenteditable="true">Hello! World</div>
  3. Navigate character by character, ensure characters are described with German phonetic descriptions.
  4. Ensure "!" and space aren't described.

Known issues with pull request:

None

Change log entries:

None: unreleased feature

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@seanbudd seanbudd requested a review from a team as a code owner August 2, 2022 07:07
@seanbudd seanbudd requested review from feerrenrut and removed request for a team August 2, 2022 07:07
@seanbudd seanbudd added this to the 2022.3 milestone Aug 2, 2022
@CyrilleB79
Copy link
Copy Markdown
Contributor

The test done in this PR checks #13969 has been fixed, but there is no test to check that #13966.

@LittleStar-VIP, would you mind test the build of this PR and check that all the descriptions are reported for a character if you enable delayed character description? Thanks.

@LittleStar-VIP
Copy link
Copy Markdown

@CyrilleB79
Thank you for tagging me, but sorry, where can I get the pr build of nvda here? I cannot find the link to download.

@seanbudd
Copy link
Copy Markdown
Member Author

seanbudd commented Aug 2, 2022

@LittleStar-VIP
Copy link
Copy Markdown

@seanbudd
I tested this pr and there is a very strange result.
After creating a portable copy with the link provided above, I enabled the delay character description in nvda setting.
I test the function with the same word "香" which I had mentioned in the issue.
This time, both delay character description and pressing numpad 2 generate the same character description
however, both tw and hk locale still generate the same character description for the character 香 and the character description is
香 香港 香蕉 香煙 蚊香 香味 香料 香水 芳香 檀香 中國香港 在香港以外

After comparing the character description of the respective folder, the above line of character description is found in the file "X:\NVDA PR\locale\zh\characterDescriptions.dic"

I remember somewhere else mentioned that the character description here is a no longer maintained file of character description.

@seanbudd
Copy link
Copy Markdown
Member Author

seanbudd commented Aug 3, 2022

@LittleStar-VIP - if the description is consistent across gestures, I think #13966 is fixed.
The changes since 2022.3beta1 should have no affect on the numpad2 character description.
zh and zh_tw both have the same description for in locale\zh\characterDescriptions.dic and locale\zh_tw\characterDescriptions.dic: 香 香港 香蕉 香煙 蚊香 香味 香料 香水 芳香 檀香 中國香港 在香港以外

@LittleStar-VIP
Copy link
Copy Markdown

LittleStar-VIP commented Aug 3, 2022

@seanbudd
Please clarify with the character description maintainer, to my understanding, the cn, hk and tw character description are maintained by different group of people.
So it should not generate the same set of character description under hk, cn or tw locale.

@LittleStar-VIP
Copy link
Copy Markdown

LittleStar-VIP commented Aug 3, 2022

the character description for the word 香should be "香 香水 香港 香味 芳香 百里香 焚香頂禮" in tw locale
the above line of text is copied from the file X:\NVDA 2023.1 Beta 1\locale\zh_TW\characterDescriptions.dic

@seanbudd
Copy link
Copy Markdown
Member Author

seanbudd commented Aug 3, 2022

This PR is blocked by a test sample and STR for #13966, so that the behaviour for the sample can be compared with 2022.2 and this PR.

@LittleStar-VIP
Copy link
Copy Markdown

I have created a new issue regarding the character description problem which I mentioned above
#13978

@seanbudd
Copy link
Copy Markdown
Member Author

seanbudd commented Aug 3, 2022

as the problem described in #13978 is not specific to delayed character description, I'm unblocking this PR and suggesting it closes #13966 as is

@seanbudd seanbudd merged commit 68d3679 into beta Aug 4, 2022
@seanbudd seanbudd deleted the fixLangCharDesc branch August 4, 2022 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants