diff --git a/assets/js/aspire-update.js b/assets/js/aspire-update.js index e9f9f42..dd6e76e 100644 --- a/assets/js/aspire-update.js +++ b/assets/js/aspire-update.js @@ -150,7 +150,7 @@ class ApiRewrites { if ((response.status === 400) || (response.status === 401)) { ApiRewrites.api_key.show_error(response.responseJSON?.error); } else { - ApiRewrites.api_key.show_error('Unexpected Error: ' + response.status); + ApiRewrites.api_key.show_error(aspireupdate.string_unexpected_error + ' ' + response.status); } }); }, diff --git a/includes/class-admin-settings.php b/includes/class-admin-settings.php index fe29840..e3bccb9 100644 --- a/includes/class-admin-settings.php +++ b/includes/class-admin-settings.php @@ -288,10 +288,10 @@ public function admin_enqueue_scripts( $hook ) { 'aspire_update_settings_js', 'aspireupdate', [ - - 'ajax_url' => network_admin_url( 'admin-ajax.php' ), - 'nonce' => wp_create_nonce( 'aspireupdate-ajax' ), - 'domain' => Utilities::get_top_level_domain(), + 'ajax_url' => network_admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( 'aspireupdate-ajax' ), + 'domain' => Utilities::get_top_level_domain(), + 'string_unexpected_error' => esc_html__( 'Unexpected Error:', 'AspireUpdate' ), ] ); }