I18n for custom post type labels. Props demetris, dimadin. Fixes #12968

git-svn-id: http://svn.automattic.com/wordpress/trunk@14571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nbachiyski
2010-05-11 19:52:50 +00:00
parent 00c831f44a
commit 46afe7c285
13 changed files with 124 additions and 89 deletions

View File

@@ -1079,14 +1079,8 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
if ( 'publish' == $post->post_status ) {
if ( 'post' == $post->post_type ) {
$view_post = __('View Post');
} elseif ( 'page' == $post->post_type ) {
$view_post = __('View Page');
} else {
$ptype = get_post_type_object($post->post_type);
$view_post = sprintf(__('View %s'), $ptype->singular_label);
}
$ptype = get_post_type_object($post->post_type);
$view_post = $ptype->labels->view_item;
$title = __('Click to edit this part of the permalink');
} else {
$title = __('Temporary permalink. Click to edit this part.');