Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the textdomain from block library #12215

Merged
merged 4 commits into from Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/block-library/src/archives/index.php
Expand Up @@ -32,7 +32,7 @@ function render_block_core_archives( $attributes ) {
$class .= ' wp-block-archives-dropdown';

$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
$title = __( 'Archives', 'default' );
$title = __( 'Archives' );

/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
$dropdown_args = apply_filters(
Expand All @@ -50,19 +50,19 @@ function render_block_core_archives( $attributes ) {

switch ( $dropdown_args['type'] ) {
case 'yearly':
$label = __( 'Select Year', 'default' );
$label = __( 'Select Year' );
break;
case 'monthly':
$label = __( 'Select Month', 'default' );
$label = __( 'Select Month' );
break;
case 'daily':
$label = __( 'Select Day', 'default' );
$label = __( 'Select Day' );
break;
case 'weekly':
$label = __( 'Select Week', 'default' );
$label = __( 'Select Week' );
break;
default:
$label = __( 'Select Post', 'default' );
$label = __( 'Select Post' );
break;
}

Expand Down Expand Up @@ -101,7 +101,7 @@ function render_block_core_archives( $attributes ) {
$block_content = sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No archives to show.', 'default' )
__( 'No archives to show.' )
);
} else {

Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/categories/index.php
Expand Up @@ -27,7 +27,7 @@ function render_block_core_categories( $attributes ) {
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category', 'default' );
$args['show_option_none'] = __( 'Select Category' );
$wrapper_markup = '<div class="%1$s">%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';
Expand Down
6 changes: 3 additions & 3 deletions packages/block-library/src/latest-comments/index.php
Expand Up @@ -29,7 +29,7 @@
function gutenberg_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)', 'default' );
$title = __( '(no title)' );
}
return esc_html( $title );
}
Expand Down Expand Up @@ -98,7 +98,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {

$list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s', 'default' ),
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
Expand Down Expand Up @@ -143,7 +143,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.', 'default' )
__( 'No comments to show.' )
);

return $block_content;
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/latest-posts/index.php
Expand Up @@ -33,7 +33,7 @@ function render_block_core_latest_posts( $attributes ) {

$title = get_the_title( $post_id );
if ( ! $title ) {
$title = __( '(Untitled)', 'default' );
$title = __( '(Untitled)' );
}
$list_items_markup .= sprintf(
'<li><a href="%1$s">%2$s</a>',
Expand Down
4 changes: 4 additions & 0 deletions phpcs.xml.dist
Expand Up @@ -18,6 +18,10 @@
</properties>
</rule>

<rule ref="WordPress.WP.I18n.MissingArgDomainDefault">
<exclude-pattern>packages/block-library/src/*</exclude-pattern>
</rule>

<arg value="ps"/>
<arg name="extensions" value="php"/>

Expand Down