Skip to content

Commit 0827fbd

Browse files
n0toosedelvh
andauthored
Make confusable character warning less jarring (#25069)
This commit assumes that the warning can be made more discreet so as to make it less annoying for the people that do not actually need the warning, without necessarily increasing the risk for those that do need it. This doesn't fix the underlying problem of the warning being shown in certain cases that, say, a certain kind of whitespace character like 0x1E could be absolutely justifiable from a technical perspective. --------- Co-authored-by: delvh <[email protected]>
1 parent 8ba54a2 commit 0827fbd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

options/locale/locale_en-US.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,10 +1150,10 @@ file_view_rendered = View Rendered
11501150
file_view_raw = View Raw
11511151
file_permalink = Permalink
11521152
file_too_large = The file is too large to be shown.
1153-
invisible_runes_header = `This file contains invisible Unicode characters!`
1154-
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.`
1155-
ambiguous_runes_header = `This file contains ambiguous Unicode characters!`
1156-
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.`
1153+
invisible_runes_header = `This file contains invisible Unicode characters`
1154+
invisible_runes_description = `This file contains 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.`
1155+
ambiguous_runes_header = `This file contains ambiguous Unicode characters`
1156+
ambiguous_runes_description = `This file contains Unicode characters that might 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.`
11571157
invisible_runes_line = `This line has invisible unicode characters`
11581158
ambiguous_runes_line = `This line has ambiguous unicode characters`
11591159
ambiguous_character = `%[1]c [U+%04[1]X] can be confused with %[2]c [U+%04[2]X]`

templates/repo/unicode_escape_prompt.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{if .EscapeStatus}}
22
{{if .EscapeStatus.HasInvisible}}
3-
<div class="ui error message unicode-escape-prompt gt-text-left">
3+
<div class="ui warning message unicode-escape-prompt gt-text-left">
44
<button class="close icon hide-panel button" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
55
<div class="header">
66
{{$.root.locale.Tr "repo.invisible_runes_header"}}

0 commit comments

Comments
 (0)