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

Address issues in userGuide and keyCommands found when researching markdown translation string extraction #16119

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Feb 1, 2024

Link to issue number:

None.

Summary of the issue:

Several issues were discovered with the rendering of the user guide and key commands document in HTML after conversion to markdown.

Key commands document:

  • Previous headings for single settings are inappropriately being included in the document before the start of a settings table. E.g. Browse Mode -> Maximum line length (which has no keyboard shortcut, is being included before Use Screen layout). This therefore also breaks the Browse Mode table in to smaller tables.
  • Tables are not being correctly ended with a blank line as markdown requires, so sometimes subsequent headings were being shown as raw markdown as part of the previous table. e.g. The Synth settings ring heading was being shown as raw markdown within the Synthesizer Selection table.
  • The "Introduction" heading is incorrectly appearing at the top of the Key commands document.

There is also a small syntax error in the userGuide, causing the table listing the New Papenmire model braile keys to break in the key commands document. Specifically, the kc beginInclude command appears after the table header rather than before.

Description of user facing changes

the key commands document now renders correctly in HTML.

Description of development approach

  • Refactored _handleSetting in keyCommandsDoc.py to address the above issues.
    this also involved correcting level calculation in the _heading method. The first heading symbol in t2t is of length 1, but in markdown it is of length 2.

Testing strategy:

Viewed English keyCommands.html in a web browser and confirmed that all above issues were corrected.

Known issues with pull request:

None known.

Code Review Checklist:

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

…ues:

* Previous headings for single settings were accidentally being included in the document before the start of a settings table. E.g. Browse Mode -> Maximum line length (which has no keyboard shortcut, was being included before Use Screen layout). This therefore also broke the Browse Mode table in to smaller tables.
* Tables were not being correctly ended with a blank line as markdown requires, so sometimes subsequent headings were being shown as raw markdown as part of the previous table. e.g. The Synth settings ring heading was being shown as raw markdown within the Synthesizer Selection table.

Also correct 0-based heading level counting: the first heading symbol in t2t is of length 1, but in markdown it is of length 2.
this stops the "Introduction" heading from accidentally appearing at the top of the key commands doc.
@michaelDCurran michaelDCurran requested review from a team as code owners February 1, 2024 13:38
@michaelDCurran michaelDCurran requested review from Qchristensen and SaschaCowley and removed request for a team February 1, 2024 13:38
seanbudd
seanbudd previously approved these changes Feb 2, 2024
user_docs/keyCommandsDoc.py Outdated Show resolved Hide resolved
@seanbudd seanbudd merged commit 4c2d7c3 into beta Feb 2, 2024
2 of 3 checks passed
@seanbudd seanbudd deleted the fixKeyCommandsDoc branch February 2, 2024 03:15
@nvaccessAuto nvaccessAuto added this to the 2024.2 milestone Feb 2, 2024
Adriani90 pushed a commit to Adriani90/nvda that referenced this pull request Mar 13, 2024
…rkdown translation string extraction (nvaccess#16119)

Several issues were discovered with the rendering of the user guide and key commands document in HTML after conversion to markdown.

Key commands document:

Previous headings for single settings are inappropriately being included in the document before the start of a settings table. E.g. Browse Mode -> Maximum line length (which has no keyboard shortcut, is being included before Use Screen layout). This therefore also breaks the Browse Mode table in to smaller tables.
Tables are not being correctly ended with a blank line as markdown requires, so sometimes subsequent headings were being shown as raw markdown as part of the previous table. e.g. The Synth settings ring heading was being shown as raw markdown within the Synthesizer Selection table.
The "Introduction" heading is incorrectly appearing at the top of the Key commands document.
There is also a small syntax error in the userGuide, causing the table listing the New Papenmire model braile keys to break in the key commands document. Specifically, the kc beginInclude command appears after the table header rather than before.

Description of user facing changes
the key commands document now renders correctly in HTML.

Description of development approach
Refactored _handleSetting in keyCommandsDoc.py to address the above issues.
this also involved correcting level calculation in the _heading method. The first heading symbol in t2t is of length 1, but in markdown it is of length 2.
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.

3 participants