WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#46921 new defect (bug)

Improper use of ’ (quotation mark)

Reported by: marcochiesi Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Text Changes Keywords:
Focuses: 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 (2)

#1 @desrosj
4 months 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
3 months 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.

Note: See TracTickets for help on using tickets.