WordPress.org

Make WordPress Core

Ticket #31196: 31196.translation.patch

File 31196.translation.patch, 1.9 KB (added by Fab1en, 4 years ago)

Patch to apply on top of [attachment 31196.3.patch] for loading message translation.

  • src/wp-includes/js/customize-preview.js

    diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js
    index 44ba23b..c3bbcb7 100644
    a b  
    6464
    6565        $( function() {
    6666                api.settings = window._wpCustomizeSettings;
     67                api.l10n = window._wpCustomizePreviewL10n;
    6768                if ( ! api.settings )
    6869                        return;
    6970
     
    118119                // Display a loading indicator when preview is reloading
    119120                api.preview.bind( 'loading', function () {
    120121                        $( 'body' ).addClass( 'customizer-navigating-away' );
    121                         $( 'html' ).prop( 'title', 'Loading...' );
     122                        $( 'html' ).prop( 'title', api.l10n.loading );
    122123                });
    123124
    124125                /* Custom Backgrounds */
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 23c8905..cc0096f 100644
    a b function wp_default_scripts( &$scripts ) { 
    382382        $scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore' ), false, 1 );
    383383        $scripts->add( 'customize-loader',   "/wp-includes/js/customize-loader$suffix.js",   array( 'customize-base' ), false, 1 );
    384384        $scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'customize-base' ), false, 1 );
     385        did_action( 'init' ) && $scripts->localize( 'customize-preview', '_wpCustomizePreviewL10n', array(
     386                'loading'  => __( 'Loading ...' ),
     387        ) );
     388
    385389        $scripts->add( 'customize-models',   "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 );
    386390        $scripts->add( 'customize-views',    "/wp-includes/js/customize-views.js",  array( 'jquery', 'underscore', 'imgareaselect', 'customize-models' ), false, 1 );
    387391        $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base' ), false, 1 );