WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 4 months ago

#23230 new enhancement

Change hyphen in front of "Draft" to em dash

Reported by: kkalvaa Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.5
Component: Text Changes Keywords: ui-feedback has-patch
Focuses: ui Cc:

Description

When a post/page/etc. is saved as a draft there is a "- Draft" appended after the title in the overview list in the dashboard.

Rather than using an hyphen (-) it should be an em dash (—) and ideally it should be translatable as the typographic rules for dashes varies with languages.

Rather than "- Draft" it should say "— Draft"

Attachments (2)

23230.diff (784 bytes) - added by McGuive7 9 months ago.
Replaces endash with translatable emdash for _post_states() and _media_states()
display_post_states.png (34.5 KB) - added by netweb 4 months ago.

Download all attachments as: .zip

Change History (13)

comment:1 alexvorn215 months ago

I like this small " - " minus :)

comment:2 SergeyBiryukov15 months ago

  • Component changed from UI to Administration
  • Keywords ui-focus added

comment:3 aaronholbrook15 months ago

Why should it be an em dash instead of a hyphen? What reasoning do you have for this change?

comment:4 kkalvaa15 months ago

It should be an em dash because it is typographically correct in English (but an en dash would be correct in other languages). It should not be a hyphen because it not joining words or letters inside a word. A hyphen is not a dash, it is punctuation, for everything else a dash should be used. That's my reasoning.

Ref: http://en.wikipedia.org/wiki/Dash and http://www.smashingmagazine.com/2011/08/15/mind-your-en-and-em-dashes-typographic-etiquette/ (plus a ton of typographical tradition and research)

Personally I prefer the en dash, I find the em dash a tad too long, but that's how English typography is.

comment:5 alexvorn215 months ago

How do you know this is a hyphen or a minus sign?

1: -
2: -

the are the same

comment:6 kkalvaa15 months ago

Regardless of whether it is a hyphen or minus it should still be a dash there. Again, ref wikipedia.

McGuive79 months ago

Replaces endash with translatable emdash for _post_states() and _media_states()

comment:7 McGuive79 months ago

23230.diff​:
Changes the ' - ' to a translatable (with context specified) &mdash in _post_states() and _media_states() in /wp-admin/includes/template.php.

Two other things worth noting:

  1. ' - ' appears in numerous other files including:
  • /wp-admin/includes/class-wp-ms-sites-list-table.php
  • /wp-includes/class-pop3.php
  • /wp-includes/formatting.php
  • /wp-includes/functions.php
  • /wp-includes/ID3/module.tag.id3v2.php
  • /xmlrpc.php
  1. A quick search for ' - ' also revealed that many plugins utilize ' - ' instead of —. So it might be best to stick with that ndash convention, instead of switching to &mdash. Not as correct typographically, but perhaps more consistent.

Final thought: being as the ' - ' lives independently in a bunch of different files, might it be a good idea to abstract it to a more global variable?

comment:8 McGuive79 months ago

  • Cc McGuive7 added
  • Keywords has-patch added

comment:9 DrewAPicture9 months ago

  • Cc xoodrew@… added
  • Component changed from Administration to Text Changes

comment:10 melchoyce5 months ago

  • Cc melissachoyce@… added

netweb4 months ago

comment:11 netweb4 months ago

I have been looking for a way to do something similar and I would suggest that this should be filterable so text/icons can be used before/after the title for the _post_state/_media_state, similar to the way the post format icons are used in the posts section.

As you can see in display_post_states.png the existing post-format icons in the posts section. Then below using bbPress 'Topics' section (post_type=topic) it is easy enough for suffix the title with custom text based on the post_state with or without CSS styling per 1 & 2. For 3 though getting an icon before the title is not currently possible.

Also as seen in 1 & 2 you cannot actually remove the ' - ' so the added benefit here as per the original ticket if you want to use an 'em dash' instead of a 'hyphen' this would also allow for that and still be translatable also.

Note: See TracTickets for help on using tickets.