Skip to content

Commit

Permalink
fixup client print dialog message for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
rocodes committed Aug 22, 2024
1 parent 36a598e commit 58193af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions client/securedrop_client/gui/conversation/export/print_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,18 @@ def _show_error_message(self) -> None:
self.continue_button.clicked.connect(self.close)
self.continue_button.setText(_("DONE"))
self.header.setText(self.error_header)
text = (
self.unprintable_type_error_message
if self.status == ExportStatus.ERROR_UNPRINTABLE_TYPE
else self.generic_error_message
)
if self.status == ExportStatus.ERROR_UNPRINTABLE_TYPE:
body_text = self.unprintable_type_error_message
else:
body_text = self.generic_error_message

if self.status:
self.body.setText( # nosemgrep: semgrep.untranslated-gui-string
f"{self.status.value}: {text}"
f"{self.status.value}: {body_text}"
)
else:
self.body.setText( # nosemgrep: semgrep.untranslated-gui-string
f"{text}"
body_text
)
self.error_details.hide()
self.adjustSize()
Expand Down

0 comments on commit 58193af

Please sign in to comment.