Skip to content

Commit d450653

Browse files
committed
I18N: Add context to the Filter button in list tables.
The "Filter" submit button on admin list tables now uses the existing "Filter" string with the "verb" context. The block editor recently added a "Filter" string meant as a noun, so the button's string needs context to keep being translated as an action. Developed in #16216 Props timse201, wildworks. Fixes #66810. git-svn-id: https://develop.svn.wordpress.org/trunk@65807 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d4a16ac commit d450653

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/wp-admin/includes/class-wp-comments-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ protected function extra_tablenav( $which ) {
444444

445445
if ( ! empty( $output ) && $this->has_items() ) {
446446
echo $output;
447-
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
447+
submit_button( _x( 'Filter', 'verb' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
448448
}
449449
}
450450

‎src/wp-admin/includes/class-wp-links-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function extra_tablenav( $which ) {
123123

124124
wp_dropdown_categories( $dropdown_options );
125125

126-
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
126+
submit_button( _x( 'Filter', 'verb' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
127127
?>
128128
</div>
129129
<?php

‎src/wp-admin/includes/class-wp-media-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected function extra_tablenav( $which ) {
242242
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
243243
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
244244

245-
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
245+
submit_button( _x( 'Filter', 'verb' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
246246

247247
if ( $this->is_trash && $this->has_items()
248248
&& current_user_can( 'edit_others_posts' )

‎src/wp-admin/includes/class-wp-ms-sites-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ protected function extra_tablenav( $which ) {
329329

330330
if ( ! empty( $output ) ) {
331331
echo $output;
332-
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'site-query-submit' ) );
332+
submit_button( _x( 'Filter', 'verb' ), '', 'filter_action', false, array( 'id' => 'site-query-submit' ) );
333333
}
334334
}
335335
?>

‎src/wp-admin/includes/class-wp-posts-list-table.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ protected function extra_tablenav( $which ) {
582582

583583
if ( ! empty( $output ) ) {
584584
echo $output;
585-
submit_button( __( 'Filter' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
585+
submit_button( _x( 'Filter', 'verb' ), 'compact', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
586586
}
587587
}
588588

0 commit comments

Comments
 (0)