[wp-trac] [WordPress Trac] #44599: Add translator notes to _post_states via _x
WordPress Trac
noreply at wordpress.org
Wed Jul 18 02:10:52 UTC 2018
#44599: Add translator notes to _post_states via _x
-----------------------------+-----------------------------
Reporter: garrett-eclipse | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: I18N | Version: trunk
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Hello,
To assist translators it would be nice to provide context for _post_states
strings. This would help in cases such as #44130 where the case depends on
the context of where the string appears in the UI.
Speaking specifically of these strings;
https://core.trac.wordpress.org/browser/branches/4.9/src/wp-
admin/includes/template.php?marks=1739-1779#L1739
{{{
1747 $post_states['protected'] = __('Password
protected');
1749 $post_states['private'] = __('Private');
1752 $post_states[] = __( 'Customization Draft'
);
1754 $post_states['draft'] = __( 'Draft' );
1757 $post_states[] = __( 'Customization Draft' );
1760 $post_states['pending'] = _x('Pending', 'post
status');
1762 $post_states['sticky'] = __('Sticky');
1765 $post_states['scheduled'] = __( 'Scheduled' );
1770 $post_states['page_on_front'] = __( 'Front
Page' );
1774 $post_states['page_for_posts'] = __(
'Posts Page' );
1779 $post_states['page_for_privacy_policy'] = __(
'Privacy Policy Page' );
}}}
The one pending status does have context via _x so the rest could be done
for consistency.
As all items in the function are post stati could simply create a
`$context = 'post_status';` variable to use throughout the entire
function.
$context = 'post_status';
$post_states['protected'] = _x('Password protected', $context);
All the best,
Cheers
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44599>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list