Make WordPress Core

Opened 7 years ago

Closed 9 months ago

#46921 closed defect (bug) (wontfix)

Improper use of ’ (quotation mark)

Reported by: marcochiesi's profile marcochiesi Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: I18N Keywords: close
Focuses: ui-copy Cc:

Description

I am a member of the Italian Polyglots team (and also a developer). While looking at strings to be translated for version 5.2 I have noticed a large number of strings containing the HTML entity ’.

I.e.

To enhance your site’s security, we recommend you remove any themes you’re not using. You should keep your current theme, %1$s, and %2$s, its parent theme.

According to W3C Char ref (https://dev.w3.org/html5/html-author/charref), the entity ’ is an equivalent of ’ which is a right single quotation mark.
I am not a native English speaker but according to different sources (see links below) the single quotation mark is often confused with the apostrophe, which has its own HTML entity (').
In most of the core strings (if not all) where the entity ’ is present, it appears to be misused, as an apostrophe should have been used instead. Quotation marks should only be used for quotations and they should always come in pairs.

By the way, I would suggest using a plain apostrophe (') rather than the equivalent HTML entity ('). I don't see any advantage in using an HTML entity here. If there's any issue related to escaping the ' it should be addressed at code-level and not relying on the strings inserted by the translators. From a translator perspective strings without HTML entities are much more readable and easier to translate, so I would avoid the usage of entities whenever possible.

So my proposal is to review all the core strings that include occurrences of ’ and replace them with a plain apostrophe ' (excluding possible cases where there's a real quotation).

P.s. Here are a few links on this topic:

Change History (5)

#1 @desrosj
7 years ago

  • Version trunk deleted

Thanks for the ticket, @marcochiesi!

This is not a regression against trunk since it's teh pattern used throughout core. As far as I know, ’ is used for better typography (vs. a plain apostrophe). But, I defer to a member of the Polyglot/i18n team.

#2 @eagleangel
7 years ago

While ' is the correct HTML entity to use, it can cause issues if used within WordPress for PHP and JavaScript escaping reasons. I have raised a separate ticket for this.

#3 @garrett-eclipse
6 years ago

  • Component changed from Text Changes to I18N
  • Focuses ui-copy added

#4 @jonsurrell
11 months ago

  • Keywords close added

This seems like the expected behavior. It's very common in the WordPress source.

I'd reference the behavior of wptexturize which will apply this type of transformation, suggesting it's desirable:

Replaces common plain text characters with formatted entities.


As an example,

'cause today's effort makes it worth tomorrow's "holiday" ...

Becomes:

’cause today’s effort makes it worth tomorrow’s “holiday” …

#5 @jonsurrell
9 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.