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

Scripts: Disable markup in error messages #20072

Merged
merged 2 commits into from Jul 10, 2022

Conversation

Unrud
Copy link
Contributor

@Unrud Unrud commented Jun 14, 2022

Error messages are displayed using the following methods:

  • zenity parses pango markup and replaces escaped characters
  • kdialog replaces (some) escaped characters
  • gtk-dialog.py replaces \n
  • printf interprets format strings and replaces escaped characters
  • echo just displays the text

The error messages themself contain escaped characters and paths from variables.

This PR unifies the behavior by:

  • Use printf to format error messages and replace escaped characters
  • Setting --no-markup for zenity to disable pango markup and escaped characters
  • Remove \n replacement from gtk-dialog.py.
  • Use plain echo instead of printf

Error messages are displayed using the following methods:

* **zenity** parses pango markup and replaces escaped characters
* **kdialog** replaces (some) escaped characters
* **gtk-dialog.py** replaces `\n`
* **printf** interprets format strings and replaces escaped characters
* **echo** just displays the text

The error messages themself contain escaped characters and paths from variables.

This PR unifies the behavior by:

* Use **printf** to format error messages and replace escaped characters
* Setting `--no-markup` for **zenity** to disable pango markup and escaped characters
* Remove `\n` replacement from **gtk-dialog.py**.
* Use plain **echo** instead of **printf**
pchote
pchote previously approved these changes Jun 24, 2022
anvilvapre
anvilvapre previously approved these changes Jun 25, 2022
@Unrud Unrud dismissed stale reviews from anvilvapre and pchote via a106a65 June 25, 2022 14:03
@abcdefg30 abcdefg30 merged commit 0a36d6f into OpenRA:bleed Jul 10, 2022
@abcdefg30
Copy link
Member

Changelog

@Unrud Unrud deleted the no-markup-errors branch July 14, 2022 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants