WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#13024 closed defect (bug) (fixed)

Don't mark internal post status strings for translation

Reported by: ryan Owned by: nbachiyski
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch commit
Focuses: Cc:

Description

	register_post_status( 'auto-draft', array(	'label' => _x('Auto-Draft', 'post'),
											'internal' => true,
											'_builtin' => true, /* internal use only. */
											'label_count' => _n_noop('Auto-Draft <span class="count">(%s)</span>', 'Auto-Drafts <span class="count">(%s)</span>')
										) );

	register_post_status( 'inherit', array(	'label' => _x('Inherit', 'post'),
											'internal' => true,
											'_builtin' => true, /* internal use only. */
											'label_count' => _n_noop('Inherit <span class="count">(%s)</span>', 'Inherit <span class="count">(%s)</span>')
										) );

Some translators have asked how to deal with these. Since they never appear in the UI, perhaps we should remove the gettext and just use the status id for the labels ('inherit' and 'auto-draft').

Attachments (1)

no-translation-for-hidden-post-types.diff (1.4 KB) - added by nbachiyski 4 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 nbachiyski4 years ago

  • Keywords has-patch dev-feedback added
  • Status changed from new to accepted

Yeah, it makes sense.

Here is a patch, which removes the gettext calls and makes label_count and array by default, because _n_noop() returns an array with singular and plural values.

comment:2 nacin4 years ago

  • Keywords commit added; dev-feedback removed

comment:3 nacin4 years ago

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

(In [14262]) Don't translate internal post stati. props nbachiyski, fixes #13024.

Note: See TracTickets for help on using tickets.