Skip to content

Commit

Permalink
fix(accessible_output): remove extraneous periods in accessible outpu…
Browse files Browse the repository at this point in the history
…t messages

Removed unnecessary periods from the accessible output messages for better consistency. Added braille output option to the "Message copied to clipboard" message.
  • Loading branch information
AAClause committed Nov 4, 2024
1 parent 696b5db commit e5cf717
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions basilisk/gui/conversation_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,14 @@ def move_to_start_of_message(self, event: wx.CommandEvent = None):
self.message_segment_manager.absolute_position = cursor_pos
self.message_segment_manager.focus_content_block()
self.messages.SetInsertionPoint(self.message_segment_manager.start)
self._handle_accessible_output(_("Start of message."))
self._handle_accessible_output(_("Start of message"))

def move_to_end_of_message(self, event: wx.CommandEvent = None):
cursor_pos = self.messages.GetInsertionPoint()
self.message_segment_manager.absolute_position = cursor_pos
self.message_segment_manager.focus_content_block()
self.messages.SetInsertionPoint(self.message_segment_manager.end - 1)
self._handle_accessible_output(_("End of message."))
self._handle_accessible_output(_("End of message"))

def get_range_for_current_message(self) -> tuple[int, int]:
cursor_pos = self.messages.GetInsertionPoint()
Expand Down Expand Up @@ -616,7 +616,9 @@ def on_copy_message(self, event: wx.CommandEvent = None):
self.select_current_message()
self.messages.Copy()
self.messages.SetInsertionPoint(cursor_pos)
self._handle_accessible_output(_("Message copied to clipboard."))
self._handle_accessible_output(
_("Message copied to clipboard"), braille=True
)

def on_remove_message_block(self, event: wx.CommandEvent = None):
cursor_pos = self.messages.GetInsertionPoint()
Expand All @@ -629,7 +631,7 @@ def on_remove_message_block(self, event: wx.CommandEvent = None):
self.refresh_messages()
self.messages.SetInsertionPoint(cursor_pos)
self._handle_accessible_output(
_("Message block removed."), braille=True
_("Message block removed"), braille=True
)

else:
Expand Down

0 comments on commit e5cf717

Please sign in to comment.