| @@ -80,9 +80,9 @@ | ||
| 80 | 80 | ); |
| 81 | 81 | }; |
| 82 | 82 | |
| 83 | 83 | if (action == 'delete') { |
| 84 | - let msg = __('You are about to delete %1 page(s). Are you sure you want to proceed?', countSent); | |
| 84 | + let msg = MainWP.I18n.t('You are about to delete %1 page(s). Are you sure you want to proceed?', countSent); | |
| 85 | 85 | mainwp_confirm(msg, _callback); |
| 86 | 86 | return; |
| 87 | 87 | } |
| 88 | 88 | _callback(); |
| @@ -235,9 +235,9 @@ | ||
| 235 | 235 | jQuery("input[name='selected_sites[]']:checked").each(function () { |
| 236 | 236 | selected_sites.push(jQuery(this).val()); |
| 237 | 237 | }); |
| 238 | 238 | if (selected_sites.length == 0) { |
| 239 | - errors.push('<div class="ui yellow message">' + __('Please select websites or groups or clients.') + '</div>'); | |
| 239 | + errors.push('<div class="ui yellow message">' + MainWP.I18n.t('Please select websites or groups or clients.') + '</div>'); | |
| 240 | 240 | } |
| 241 | 241 | } else if (jQuery('input[name="select_by"]').val() == 'client') { |
| 242 | 242 | jQuery("input[name='selected_clients[]']:checked").each(function () { |
| 243 | 243 | selected_clients.push(jQuery(this).val()); |
| @@ -242,9 +242,9 @@ | ||
| 242 | 242 | jQuery("input[name='selected_clients[]']:checked").each(function () { |
| 243 | 243 | selected_clients.push(jQuery(this).val()); |
| 244 | 244 | }); |
| 245 | 245 | if (selected_clients.length == 0) { |
| 246 | - errors.push('<div class="ui yellow message">' + __('Please select websites or groups or clients.') + '</div>'); | |
| 246 | + errors.push('<div class="ui yellow message">' + MainWP.I18n.t('Please select websites or groups or clients.') + '</div>'); | |
| 247 | 247 | } |
| 248 | 248 | } else { |
| 249 | 249 | jQuery("input[name='selected_groups[]']:checked").each(function () { |
| 250 | 250 | selected_groups.push(jQuery(this).val()); |
| @@ -249,9 +249,9 @@ | ||
| 249 | 249 | jQuery("input[name='selected_groups[]']:checked").each(function () { |
| 250 | 250 | selected_groups.push(jQuery(this).val()); |
| 251 | 251 | }); |
| 252 | 252 | if (selected_groups.length == 0) { |
| 253 | - errors.push('<div class="ui yellow message">' + __('Please select websites or groups or clients.') + '</div>'); | |
| 253 | + errors.push('<div class="ui yellow message">' + MainWP.I18n.t('Please select websites or groups or clients.') + '</div>'); | |
| 254 | 254 | } |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | let _status = ''; |
| @@ -393,9 +393,9 @@ | ||
| 393 | 393 | value = rowElement.find(target).val() || ''; |
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | mainwp_copyTextToClipboard(value).catch(function () { |
| 397 | - alert(__('Unable to copy to clipboard.')); | |
| 397 | + alert(MainWP.I18n.t('Unable to copy to clipboard.')); | |
| 398 | 398 | }); |
| 399 | 399 | |
| 400 | 400 | return false; |
| 401 | 401 | }); |
| @@ -420,9 +420,9 @@ | ||
| 420 | 420 | } |
| 421 | 421 | ); |
| 422 | 422 | } |
| 423 | 423 | if (action == 'delete') { |
| 424 | - let msg = __('You are about to delete %1 post(s). Are you sure you want to proceed?', countSent); | |
| 424 | + let msg = MainWP.I18n.t('You are about to delete %1 post(s). Are you sure you want to proceed?', countSent); | |
| 425 | 425 | mainwp_confirm(msg, _callback); |
| 426 | 426 | return; |
| 427 | 427 | } |
| 428 | 428 | _callback(); |
| @@ -524,9 +524,9 @@ | ||
| 524 | 524 | |
| 525 | 525 | let _status = ''; |
| 526 | 526 | let statuses = jQuery("#mainwp_post_search_type").dropdown("get value"); |
| 527 | 527 | if (statuses == null) |
| 528 | - errors.push('<div class="ui yellow message">' + __('Please select at least one post status.') + '</div>'); | |
| 528 | + errors.push('<div class="ui yellow message">' + MainWP.I18n.t('Please select at least one post status.') + '</div>'); | |
| 529 | 529 | else { |
| 530 | 530 | _status = statuses.join(','); |
| 531 | 531 | } |
| 532 | 532 | |
| @@ -593,9 +593,9 @@ | ||
| 593 | 593 | let i = 0; |
| 594 | 594 | let num_sites = jQuery('#search-bulk-sites').attr('number-sites'); |
| 595 | 595 | num_sites = Number.parseInt(num_sites); |
| 596 | 596 | |
| 597 | - let select_sites_error = '<div class="ui yellow message">' + __('Please select at least one website or group or client.') + '</div>'; | |
| 597 | + let select_sites_error = '<div class="ui yellow message">' + MainWP.I18n.t('Please select at least one website or group or client.') + '</div>'; | |
| 598 | 598 | |
| 599 | 599 | let bulk_search = num_sites > 0; |
| 600 | 600 | |
| 601 | 601 | if (jQuery('input[name="select_by"]').val() == 'site' && start_sites == undefined) { |