From b3bf144aea991ca32495e62474f8f541f9954202 Mon Sep 17 00:00:00 2001 From: JULIA SMITH Date: Thu, 13 Aug 2020 12:46:30 -0700 Subject: [PATCH] use wp.i18n --- js/multi-post-thumbnails-admin.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/multi-post-thumbnails-admin.js b/js/multi-post-thumbnails-admin.js index 8797dcc..da3cfa7 100644 --- a/js/multi-post-thumbnails-admin.js +++ b/js/multi-post-thumbnails-admin.js @@ -16,7 +16,7 @@ window.MultiPostThumbnails = { action:'set-' + post_type + '-' + id + '-thumbnail', post_id: jQuery('#post_ID').val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie) }, function(str){ if ( str == '0' ) { - alert( setPostThumbnailL10n.error ); + alert( wp.i18n.__( 'Could not remove the image.' ) ); } else { MultiPostThumbnails.setThumbnailHTML(str, id, post_type); } @@ -28,17 +28,17 @@ window.MultiPostThumbnails = { setAsThumbnail: function(thumb_id, id, post_type, nonce){ var $link = jQuery('a#' + post_type + '-' + id + '-thumbnail-' + thumb_id); $link.data('thumbnail_id', thumb_id); - $link.text( setPostThumbnailL10n.saving ); + $link.text( wp.i18n.__( 'Saving...' ) ); jQuery.post(ajaxurl, { action:'set-' + post_type + '-' + id + '-thumbnail', post_id: post_id, thumbnail_id: thumb_id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie) }, function(str){ var win = window.dialogArguments || opener || parent || top; - $link.text( setPostThumbnailL10n.setThumbnail ); + $link.text( wp.i18n.__( 'Use as title image' ) ); if ( str == '0' ) { - alert( setPostThumbnailL10n.error ); + alert( wp.i18n.__( 'Could not set that image. Try a different attachment.' ) ); } else { $link.show(); - $link.text( setPostThumbnailL10n.done ); + $link.text( wp.i18n.__( 'Done' ) ); $link.fadeOut( 2000, function() { jQuery('tr.' + post_type + '-' + id + '-thumbnail').hide(); });