esc_url_raw(rest_url('mxchat-editor/v1/transform')), 'nonce' => wp_create_nonce('wp_rest'), 'ajaxUrl' => esc_url_raw(admin_url('admin-ajax.php')), 'streamAction' => MxChat_Editor_Assistant_Stream::AJAX_ACTION, 'streamNonce' => wp_create_nonce(MxChat_Editor_Assistant_Stream::NONCE), // Free core feature — no license gate. Kept as a constant true so any // older cached asset that still reads it stays functional. 'licenseActive' => true, 'actions' => MxChat_Editor_Assistant_REST::get_actions_for_client(), 'supportedBlocks' => array('core/paragraph', 'core/heading', 'core/list-item', 'core/quote'), 'locales' => array( array('value' => 'en', 'label' => __('English', 'mxchat')), array('value' => 'es', 'label' => __('Spanish', 'mxchat')), array('value' => 'fr', 'label' => __('French', 'mxchat')), array('value' => 'de', 'label' => __('German', 'mxchat')), array('value' => 'ja', 'label' => __('Japanese', 'mxchat')), array('value' => 'pt', 'label' => __('Portuguese', 'mxchat')), ), 'i18n' => array( 'panelTitle' => __('MxChat Editor Assistant', 'mxchat'), 'sidebarHeading' => __('Block actions', 'mxchat'), 'selectBlockNotice' => __('Select a paragraph, heading, list item, or quote block to use the assistant.', 'mxchat'), 'unsupportedNotice' => __('This action works on paragraph, heading, list item, and quote blocks. Select one of those to continue.', 'mxchat'), 'workingLabel' => __('Working…', 'mxchat'), 'resultHeading' => __('Result', 'mxchat'), 'accept' => __('Accept', 'mxchat'), 'discard' => __('Discard', 'mxchat'), 'tryAgain' => __('Try again', 'mxchat'), 'translateTo' => __('Translate to', 'mxchat'), 'licenseRequired' => __('MxChat PRO license required. Actions are disabled.', 'mxchat'), 'errorPrefix' => __('Editor Assistant error:', 'mxchat'), 'emptyContent' => __('The selected block has no text content.', 'mxchat'), 'streamingLabel' => __('Streaming…', 'mxchat'), 'acceptAll' => __('Accept all', 'mxchat'), 'pending' => __('Waiting…', 'mxchat'), 'done' => __('Done', 'mxchat'), 'failed' => __('Failed', 'mxchat'), 'skipped' => __('Skipped — unsupported block', 'mxchat'), /* translators: %1$d: applied count, %2$d: total selected */ 'appliedSummary' => __('Applied to %1$d of %2$d selected blocks.', 'mxchat'), /* translators: %d: number of blocks */ 'blocksLabelSuffix' => __('(%d blocks)', 'mxchat'), 'blockLabel' => __('Block', 'mxchat'), ), ) ); wp_set_script_translations('mxchat-editor-assistant-sidebar', 'mxchat'); } }