diff --git a/assets/apps/dashboard/src/Components/Content/AvailableModule.js b/assets/apps/dashboard/src/Components/Content/AvailableModule.js index 1b633e6617..06a3fc262a 100644 --- a/assets/apps/dashboard/src/Components/Content/AvailableModule.js +++ b/assets/apps/dashboard/src/Components/Content/AvailableModule.js @@ -1,5 +1,5 @@ /* global neveDash */ -import { __, sprintf } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; import { NEVE_AVAILABLE_MODULES_ICON_MAP, NEVE_STORE, @@ -42,10 +42,8 @@ const ModuleToggle = ({ const { api } = neveDash; const { title } = moduleData; const toastMessage = { - //translators: %s - Plugin name - installing: sprintf(__('Installing %s', 'neve'), 'Orbit Fox Plugin'), - //translators: %s - Plugin name - activating: sprintf(__('Activating %s', 'neve'), 'Orbit Fox Plugin'), + installing: __('Installing', 'neve'), + activating: __('Activating', 'neve'), }; const handleToggle = async (value) => { @@ -90,7 +88,10 @@ const ModuleToggle = ({ ); } catch (error) { setToast( - __('Something went wrong while activating the module.', 'neve') + __( + 'Something went wrong. Please reload the page and try again.', + 'neve' + ) ); } finally { setLoading(false); @@ -154,7 +155,7 @@ const AvailableModuleCard = ({ className="flex mt-2 text-blue-600 gap-2 align-middle" href="admin.php?page=obfx_companion" > - {__('Go to Settings to Edit', 'neve')} + {__('Settings', 'neve')} )} diff --git a/inc/core/admin.php b/inc/core/admin.php index f6238e32c2..be40d0613a 100644 --- a/inc/core/admin.php +++ b/inc/core/admin.php @@ -402,7 +402,7 @@ public function activate_plugin( $request ) { } if ( ! isset( $api->download_link ) ) { - wp_send_json_error( array( 'message' => __( 'Invalid plugin information.', 'neve' ) ) ); + wp_send_json_error( array( 'message' => __( 'Invalid action', 'neve' ) ) ); } $skin = new \WP_Ajax_Upgrader_Skin(); @@ -461,12 +461,12 @@ public function activate_module( $request ) { $modules = $settings::$instance->module_objects; if ( ! isset( $modules[ $module_slug ] ) ) { - wp_send_json_error( __( 'Invalid module slug.', 'neve' ) ); + wp_send_json_error( __( 'Invalid action', 'neve' ) ); } $response = $modules[ $module_slug ]->set_status( 'active', $module_value ); - wp_send_json_success( __( 'Module status changed.', 'neve' ) ); + wp_send_json_success( $module_value ? __( 'Module Activated', 'neve' ) : __( 'Module Deactivated.', 'neve' ) ); } /**