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

Make confusable character warning less jarring #25069

Merged
merged 10 commits into from
Aug 3, 2023
8 changes: 4 additions & 4 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1131,10 +1131,10 @@ file_view_rendered = View Rendered
file_view_raw = View Raw
file_permalink = Permalink
file_too_large = The file is too large to be shown.
invisible_runes_header = `This file contains invisible Unicode characters!`
invisible_runes_description = `This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.`
ambiguous_runes_header = `This file contains ambiguous Unicode characters!`
ambiguous_runes_description = `This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.`
invisible_runes_header = `This file contains invisible Unicode characters`
invisible_runes_description = `This file contains different kinds of invisible Unicode characters that are indistinguishable to humans, but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.`
n0toose marked this conversation as resolved.
Show resolved Hide resolved
ambiguous_runes_header = `This file contains ambiguous Unicode characters`
ambiguous_runes_description = `This file contains ambiguous Unicode characters that could possibly be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.`
n0toose marked this conversation as resolved.
Show resolved Hide resolved
invisible_runes_line = `This line has invisible unicode characters`
ambiguous_runes_line = `This line has ambiguous unicode characters`
ambiguous_character = `%[1]c [U+%04[1]X] can be confused with %[2]c [U+%04[2]X]`
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/unicode_escape_prompt.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{if .EscapeStatus}}
{{if .EscapeStatus.HasInvisible}}
<div class="ui error message unicode-escape-prompt gt-tl">
<div class="ui message unicode-escape-prompt gt-tl">
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
<div class="header">
{{$.root.locale.Tr "repo.invisible_runes_header"}}
Expand All @@ -11,7 +11,7 @@
{{end}}
</div>
{{else if .EscapeStatus.HasAmbiguous}}
<div class="ui warning message unicode-escape-prompt gt-tl">
<div class="ui message unicode-escape-prompt gt-tl">
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
<div class="header">
{{$.root.locale.Tr "repo.ambiguous_runes_header"}}
Expand Down