*/ public static function strings(): array { return array( 'formTitle' => __( 'Generate article with AI', 'acez-seo' ), 'modePage' => __( 'Based on the page\'s own information', 'acez-seo' ), 'modeBrief' => __( 'Provide a short brief for the AI', 'acez-seo' ), 'briefPlaceholder' => __( 'e.g. 5 ways to save water in the garden', 'acez-seo' ), 'briefRequired' => __( 'Provide a short description for the AI.', 'acez-seo' ), 'lengthLabel' => __( 'Article length', 'acez-seo' ), 'lengthShort' => __( 'Short (~400 words)', 'acez-seo' ), 'lengthMedium' => __( 'Medium (~800 words)', 'acez-seo' ), 'lengthLong' => __( 'Long (~1500 words)', 'acez-seo' ), 'generate' => __( 'Generate', 'acez-seo' ), 'generating' => __( 'Generating…', 'acez-seo' ), 'generatingInfo' => __( 'Generating the article can take up to a few minutes — do not close this window.', 'acez-seo' ), 'cancel' => __( 'Cancel', 'acez-seo' ), 'error' => __( 'Failed to generate the article.', 'acez-seo' ), 'previewTitle' => __( 'Preview of the generated article', 'acez-seo' ), 'discard' => __( 'Discard', 'acez-seo' ), 'insert' => __( 'Insert into content', 'acez-seo' ), 'existingContentWarning' => __( 'This page already has content — choose what to do with the generated article.', 'acez-seo' ), 'insertReplace' => __( 'Replace everything', 'acez-seo' ), 'insertAppend' => __( 'Insert at the end', 'acez-seo' ), 'insertCursor' => __( 'Insert at the cursor position', 'acez-seo' ), 'confirmInsert' => __( 'OK', 'acez-seo' ), ); } /** * @return array */ public static function config(): array { return array_merge( self::strings(), array( 'restUrl' => esc_url_raw( rest_url( 'acez-seo/v1/generate' ) ), 'nonce' => wp_create_nonce( 'wp_rest' ), ) ); } }