Make WordPress Core

Changeset 22029


Ignore:
Timestamp:
09/27/2012 01:11:04 AM (13 years ago)
Author:
koopersmith
Message:

Apply localized strings to media modal. see #21390, #21808.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22027 r22029  
    33        Attachment  = media.model.Attachment,
    44        Attachments = media.model.Attachments,
    5         Query       = media.model.Query;
    6 
     5        Query       = media.model.Query,
     6        l10n;
     7
     8    // Link any localized strings.
     9    l10n = media.view.l10n = _.isUndefined( _wpMediaViewsL10n ) ? {} : _wpMediaViewsL10n;
    710
    811    /**
     
    387390            this.attachmentsView = new media.view.Attachments({
    388391                controller: this.controller,
    389                 directions: 'Select stuff.',
     392                directions: this.controller.get('multiple') ? l10n.selectMediaMultiple : l10n.selectMediaSingular,
    390393                collection: this.collection
    391394            });
     
    466469
    467470                    'create-new-gallery': {
    468                         style: 'primary',
    469                         text:  'Create a new gallery',
     471                        style:    'primary',
     472                        text:     l10n.createNewGallery,
    470473                        priority: 40,
    471                         click:  function() {
     474
     475                        click: function() {
    472476                            controller.render('gallery');
    473477                        }
     
    475479
    476480                    'insert-into-post': {
    477                         // style: 'primary',
    478                         text:  'Insert into post',
     481                        text:     l10n.insertIntoPost,
    479482                        priority: 30
    480483                    },
    481484
    482485                    'add-to-gallery': {
    483                         text:  'Add to gallery',
     486                        text:     l10n.addToGallery,
    484487                        priority: 20
    485488                    }
  • trunk/wp-includes/script-loader.php

    r22012 r22029  
    321321        'selectMediaSingular' => __( 'Select a media file:' ),
    322322        'selectMediaMultiple' => __( 'Select one or more media files:' ),
     323        'createNewGallery'    => __( 'Create a new gallery' ),
     324        'insertIntoPost'      => __( 'Insert into post' ),
     325        'addToGallery'        => __( 'Add to gallery' ),
    323326    ) );
    324327
Note: See TracChangeset for help on using the changeset viewer.