Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit e8892e9

Browse files
committed
Use default text domain for first several translation strings in common with core
1 parent 9550566 commit e8892e9

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

php/class-wp-customize-post-setting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ public function sanitize( $post_data ) {
345345

346346
/** This filter is documented in wp-includes/post.php */
347347
if ( 'trash' !== $post_data['post_status'] && apply_filters( 'wp_insert_post_empty_content', $maybe_empty, $post_data ) ) {
348-
return $has_setting_validation ? new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.', 'customize-posts' ), array( 'setting_property' => 'post_content' ) ) : null;
348+
return $has_setting_validation ? new WP_Error( 'empty_content', __( 'Content, title, and excerpt are empty.', 'default' ), array( 'setting_property' => 'post_content' ) ) : null;
349349
}
350350

351351
if ( empty( $post_data['post_status'] ) ) {

php/class-wp-customize-posts-panel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function print_template() {
9393
<# } else if ( data.text ) { #>
9494
{{ data.text }}
9595
<# } else { #>
96-
<em><?php esc_html_e( '(No title)', 'customize-posts' ); ?></em>
96+
<em><?php esc_html_e( '(no title)', 'default' ); ?></em>
9797
<# } #>
9898
</script>
9999

php/class-wp-customize-posts.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@ public function get_author_choices() {
655655
foreach ( (array) $users as $user ) {
656656
$choices[] = array(
657657
'value' => (int) $user->ID,
658-
'text' => sprintf( _x( '%1$s (%2$s)', 'user dropdown', 'customize-posts' ), $user->display_name, $user->user_login ),
658+
/* translators: 1: display name, 2: user login */
659+
'text' => sprintf( _x( '%1$s (%2$s)', 'user dropdown', 'default' ), $user->display_name, $user->user_login ),
659660
);
660661
}
661662
}
@@ -680,7 +681,7 @@ public function get_date_month_choices() {
680681
$month_text = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
681682

682683
/* translators: 1: month number, 2: month abbreviation */
683-
$months[ $i ]['text'] = sprintf( __( '%1$s-%2$s', 'customize-posts' ), $month_number, $month_text );
684+
$months[ $i ]['text'] = sprintf( __( '%1$s-%2$s', 'default' ), $month_number, $month_text );
684685
$months[ $i ]['value'] = $month_number;
685686
}
686687
return $months;
@@ -820,10 +821,10 @@ public function enqueue_scripts() {
820821
'fieldSlugLabel' => __( 'Slug', 'customize-posts' ),
821822
'fieldStatusLabel' => __( 'Status', 'customize-posts' ),
822823
'fieldDateLabel' => __( 'Date', 'customize-posts' ),
823-
'fieldContentLabel' => __( 'Content', 'customize-posts' ),
824+
'fieldContentLabel' => __( 'Content', 'default' ),
824825
'fieldExcerptLabel' => __( 'Excerpt', 'customize-posts' ),
825826
'fieldDiscussionLabel' => __( 'Discussion', 'customize-posts' ),
826-
'fieldAuthorLabel' => __( 'Author', 'customize-posts' ),
827+
'fieldAuthorLabel' => __( 'Author', 'default' ),
827828
'fieldParentLabel' => __( 'Parent', 'customize-posts' ),
828829
'fieldOrderLabel' => __( 'Order', 'customize-posts' ),
829830
'noTitle' => __( '(no title)', 'customize-posts' ),
@@ -1438,7 +1439,8 @@ public function ajax_insert_auto_draft_post() {
14381439
if ( is_wp_error( $r ) ) {
14391440
$error = $r;
14401441
$data = array(
1441-
'message' => sprintf( __( '%1$s could not be created: %2$s', 'customize-posts' ), $singular_name, $error->get_error_message() ),
1442+
/* translators: 1: singular post name, 2: error message */
1443+
'message' => sprintf( __( '%1$s could not be created: %2$s', 'default' ), $singular_name, $error->get_error_message() ),
14421444
);
14431445
wp_send_json_error( $data );
14441446
}

0 commit comments

Comments
 (0)