Make WordPress Core

Opened 8 years ago

Last modified 8 weeks ago

#30796 new enhancement

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
Focuses: ui-copy Cc:

Description

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 5 months ago.

Download all attachments as: .zip

Change History (9)

#1 @chriscct7
7 years ago

  • Keywords i18n-change removed

#3 follow-up: @GaryJ
7 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
7 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
3 years ago

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

@sabernhardt
5 months ago

#6 @sabernhardt
5 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
2 months ago

  • Milestone changed from Future Release to 6.3

#8 @sabernhardt
8 weeks 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).

Note: See TracTickets for help on using tickets.