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

Remove newlines from error message #23215

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Sep 30, 2024

Newlines can cause trouble with translations as well as presentation in the UI. This particular string doesn't actually need the newline as part of the translation string, so this commit changes it to just not have it.

Alternative to #23213

@jrafanie Please review.

Newlines can cause trouble with translations as well as presentation in
the UI. This particular string doesn't actually need the newline as part
of the translation string, so this commit changes it to just not have it.

Alternative to ManageIQ#23213
@miq-bot
Copy link
Member

miq-bot commented Sep 30, 2024

Checked commit Fryguy@8d24399 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. ⭐

Copy link
Member

@jrafanie jrafanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrafanie jrafanie merged commit 2c6cd3c into ManageIQ:master Oct 1, 2024
12 checks passed
@jrafanie jrafanie added the bug label Oct 1, 2024
err_text = "Provision failed for the following reasons:\n#{errors.join("\n")}"
_log.error("<#{err_text}>")
raise _("Provision failed for the following reasons:\n%{errors}") % {:errors => errors.join("\n")}
err_text = errors.join("\n").insert(0, "\n")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, the newline might cause issues if translators don't embed it in their translations.

See: #23218 (comment)

@Fryguy Fryguy deleted the better_error_messages branch October 1, 2024 19:55
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.

3 participants