From 0827fbd49c5cafe09aa58cc32d9794e54602430a Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Thu, 3 Aug 2023 14:16:06 +0000 Subject: [PATCH] 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 --- options/locale/locale_en-US.ini | 8 ++++---- templates/repo/unicode_escape_prompt.tmpl | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c6379d0fe647..ef940c83c812 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1150,10 +1150,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 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.` +ambiguous_runes_header = `This file contains ambiguous Unicode characters` +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.` 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]` diff --git a/templates/repo/unicode_escape_prompt.tmpl b/templates/repo/unicode_escape_prompt.tmpl index 961e2370a782..66e00f6a9905 100644 --- a/templates/repo/unicode_escape_prompt.tmpl +++ b/templates/repo/unicode_escape_prompt.tmpl @@ -1,6 +1,6 @@ {{if .EscapeStatus}} {{if .EscapeStatus.HasInvisible}} -
+
{{$.root.locale.Tr "repo.invisible_runes_header"}}