Make WordPress Core

Opened 9 years ago

Closed 11 months ago

Last modified 11 months ago

#30796 closed enhancement (fixed)

Entity Name vs. Entity Number

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by:
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: Administration Keywords: dev-feedback has-patch needs-testing
Focuses: ui-copy Cc:


In our strings, we currently use ’ and ’ interchangeably. They result in the same right quote mark () so this isn't a bug, nor is it grammatically incorrect. It may however be a potential bottleneck for individuals translating our heavy slang and contraction use, which appears to be in the hundreds of strings.

I'd like to suggest we do one of two things:

  • Switch completely to ’ as it's easier to grok than ’
  • Switch completely to ’ unless we have a complementary ‘ usage. (Note that we only currently have 1 ‘ and it's incorrectly used in a contraction.)
  • Remove our contraction usages completely. This results in a subtle tone change and removes some of WordPress's Texan personality, but also makes internationalization easier and potentially more inviting as a result.

There are likely other entities worth discussing, so I titled this ticket intentionally broad and highlighted one of the more obvious usages. Definitely feel free to retitle and modify this ticket for maximum traction, y’all.

Attachments (1)

30796.patch (2.4 KB) - added by sabernhardt 17 months ago.

Download all attachments as: .zip

Change History (18)

#1 @chriscct7
8 years ago

  • Keywords i18n-change removed

#3 follow-up: @GaryJ
8 years ago

  • Keywords dev-feedback added

Polyglot markup requires numbered entities and the W3C Recommendation is that numbered entities SHOULD use the hexadecimal form when it exists.

Is WP UTF-8 safe yet? Could we use the real in the code?

Even with numbered or named entities, do translators ensure those entities are used in contractions in the translated strings? Does GlotPress do any sort of conversion? How about plugin authors? I feel some more answers are needed beyond just whether to change the source, to see what effect (good or bad) it will have for translators.

#4 in reply to: ↑ 3 @SergeyBiryukov
8 years ago

Replying to GaryJ:

Is WP UTF-8 safe yet? Could we use the real in the code?

There's a precedent in [38359].

Even with numbered or named entities, do translators ensure those entities are used in contractions in the translated strings?

I think entities were originally used to make sure the code is ASCII-only, and prevent code editors from introducing issues like the one just fixed in [38517] :) That said, I guess most editors should be UTF-8 safe now.

Translators can use actual characters instead of entities, that should not cause any issues.

Does GlotPress do any sort of conversion?

Not that I know of.

#5 @garrett-eclipse
4 years ago

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

17 months ago

#6 @sabernhardt
17 months ago

  • Keywords has-patch added; needs-patch removed
  • Milestone set to Future Release

The patch replaces contractions that use either ‘ or ’ in wp-admin and wp-includes. (The bundled themes' text strings probably should stay as they are.)

Custom image header (r14907):

'If you do not want to upload your own image, you can use one of these cool headers, or show a random one.'

Default password nag (r11162, r14170):

'You are using the auto-generated password for your account. Would you like to change it?'

Theme starter content (r39260), also adding a comma:

'You might be an artist who would like to introduce yourself and your work here, or maybe you are a business with a mission to describe.'

This does not address the possibility of editing ’, either in contractions or as the possessive apostrophe, but I'm not eager to change so many.

#7 @sabernhardt
15 months ago

  • Milestone changed from Future Release to 6.3

#8 @sabernhardt
14 months ago

If someone else is interested in editing text strings with the apostrophe character code, I counted 132 unique strings with ’ (outside formatting.php and the bundled themes).

#9 @audrasjb
11 months ago

In 55977:

Administration: Replace contracted verb forms for better consistency.

Previously: [52979], [52978].
Props sabernhardt.
See #30796.

#11 @oglekler
11 months ago

  • Keywords needs-testing added

I am a bit confused, because the last patch is a typo fix and possibly should have been handled separately. This is definitely not an enhancement but a bug fix.

#12 @audrasjb
11 months ago

  • Milestone changed from 6.3 to 6.4

Moving this ticket to the next milestone to implement the changes suggested by @sabernhardt.

#13 @sabernhardt
11 months ago

My changes are already in r55977; PR 4672 has @kebbet's suggestions.

#14 @kebbet
11 months ago

Should this ticket be kept in 6.3 milestone since it have changesets in it, and a new one opened for follow up changes suggested by @sabernhardt ? Whats your thought on that @audrasjb ?

#15 @audrasjb
11 months ago

  • Milestone changed from 6.4 to 6.3

Alright, let's close this ticket as fixed and open a new one for the changes suggested by @sabernhardt :)

#16 @audrasjb
11 months ago

  • Resolution set to fixed
  • Status changed from new to closed

#17 @kebbet
11 months ago

I created #58639 as a follow up ticket.

Note: See TracTickets for help on using tickets.