From bdba526d83b2b55ac4f8165a2bd9b7236b456de6 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 5 Dec 2012 19:03:38 +0000 Subject: [PATCH] Media: Use '%d selected' for the selection string, and offer a comment to translators to help them find a workable solution with this would-be plural string. fixes #22749. see #22229. git-svn-id: https://develop.svn.wordpress.org/trunk@23075 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-views.js | 2 +- wp-includes/media.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index f167b5b647..963f22088b 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -3731,7 +3731,7 @@ this.$el.toggleClass( 'one', 1 === collection.length ); this.$el.toggleClass( 'editing', editing ); - this.$('.count').text( collection.length + ' ' + l10n.selected ); + this.$('.count').text( l10n.selected.replace('%d', collection.length) ); }, edit: function( event ) { diff --git a/wp-includes/media.php b/wp-includes/media.php index 8b6bbcf07c..5f6120c7c2 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1461,7 +1461,11 @@ function wp_enqueue_media( $args = array() ) { 'search' => __( 'Search' ), 'select' => __( 'Select' ), 'cancel' => __( 'Cancel' ), - 'selected' => __( 'selected' ), + /* translators: This is a would-be plural string used in the media manager. + If there is not a word you can use in your language to avoid issues with the + lack of plural support here, turn it into "selected: %d" then translate it. + */ + 'selected' => __( '%d selected' ), 'dragInfo' => __( 'Drag and drop to reorder images.' ), // Upload