rails
rails copied to clipboard
Improve typography of user facing validation messages
With the universal adoption of UTF-8 in browsers, user facing text can use more optimal Unicode typography. In digital and print design, using RIGHT SINGLE QUOTATION MARK (U+2019) is normally preferred over APOSTROPHE (U+0027) in contractions.
For details, see the Unicode Standard Section 6.2: https://www.unicode.org/versions/Unicode13.0.0/ch06.pdf
Punctuation Apostrophe. U+2019 right single quotation mark is preferred where the character is to represent a punctuation mark, as for contractions: “We’ve been here before.” In this latter case, U+2019 is also referred to as a punctuation apostrophe.
Previous discussion: #42071
Previous discussion: #42071
Yup, thanks. I reopened as the previous discussion was closed automatically by a bot before the review could finish.
Hi, thanks for the PR. Maybe I need more context, but is this just changing the defaults? Can't people update their en.yml
file to use this?
Yes, this is changing the defaults and people can update their en.yml
file to achieve this today.
However, good defaults matter and in this case, we can improve the defaults. Per the standard listed in the post, the current text is using the wrong Unicode character for a contraction. The current text requires every Rails developer that wants to follow the Unicode standard to override the default. That is unnecessary overhead for each project to take on when it can be fixed upstream.
Just like a spelling error, Rails developers could override the default, but that wouldn't hold back a fix.
Other software project and web frameworks do use the correct Unicode character for user facing strings.