diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index a62adb41b1..f3bec0cdb2 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -2,8 +2,11 @@ var media = wp.media, Attachment = media.model.Attachment, Attachments = media.model.Attachments, - Query = media.model.Query; + Query = media.model.Query, + l10n; + // Link any localized strings. + l10n = media.view.l10n = _.isUndefined( _wpMediaViewsL10n ) ? {} : _wpMediaViewsL10n; /** * ======================================================================== @@ -386,7 +389,7 @@ this.attachmentsView = new media.view.Attachments({ controller: this.controller, - directions: 'Select stuff.', + directions: this.controller.get('multiple') ? l10n.selectMediaMultiple : l10n.selectMediaSingular, collection: this.collection }); @@ -465,22 +468,22 @@ }), 'create-new-gallery': { - style: 'primary', - text: 'Create a new gallery', + style: 'primary', + text: l10n.createNewGallery, priority: 40, - click: function() { + + click: function() { controller.render('gallery'); } }, 'insert-into-post': { - // style: 'primary', - text: 'Insert into post', + text: l10n.insertIntoPost, priority: 30 }, 'add-to-gallery': { - text: 'Add to gallery', + text: l10n.addToGallery, priority: 20 } } diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index f29bd46f1b..2b5553927a 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -320,6 +320,9 @@ function wp_default_scripts( &$scripts ) { 'insertMedia' => __( 'Insert Media' ), 'selectMediaSingular' => __( 'Select a media file:' ), 'selectMediaMultiple' => __( 'Select one or more media files:' ), + 'createNewGallery' => __( 'Create a new gallery' ), + 'insertIntoPost' => __( 'Insert into post' ), + 'addToGallery' => __( 'Add to gallery' ), ) ); $scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );