Add ability to report start of paragraphs in braille (#16906)
Closes #16895
Summary of the issue:
NVDA should have an option to indicate paragraphs in braille, so that reading, especially books or long pieces of text, can be more comfortable and meaningful.
Description of user facing changes
In the braille settings panel, a new combo box can be used for setting NVDA to show two spaces, a pilcrow or no marker at the start of paragraphs in braille. This requires that the reading by paragraph checkbox is enabled.
Description of development approach
A new option for this feature has been added in the braille section of config.conf.
In config["braille"], an integer is assigned to get the startParagraphMarker.
A getParagraphStartMarker function has been added, so that it can be used in different places of braille.py, and in this way we can also make the PILCROW translatable.
In the getFormatFieldBraille function of braille.py: when the isAtStart parameter is True, NVDA will check if it's configured to read by paragraph and if it should present the start paragraph indicator, through the getParagraphStartMarker function.
In the _set_windowEndPos function of braille.py: if the braille wrap word and paragraph start options are enabled, and the start window pos to be set is minor than or equal to the lenghts of paragraph start indicator + 1 (1 corresponding to the text separator), tart pos is set to the start position of the last region if it starts with paragraph start indicator plus text separator. This handles some cases where the paragraph start indicator is not displayed when the braille word wrap is enabled.
The braille settings subpanel has been updated in the gui.
A new ParagraphStartMarker class has been added to configFlags.py