Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #839

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
Expand Down
23 changes: 23 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[files]
extend-exclude = [
".git/",
"tests/test-plugin/text-to-speech-voices.json"
]
ignore-hidden = false

[default]
extend-ignore-re = [
"\\bTung Du\\b",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not variable_names go here.

]

[default.extend-words]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are parts of variable names.

# Typos
"weather" = "whether"

[default.extend-identifiers]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complete variable names.

# Typos
"Github" = "GitHub"
"Wordpress" = "WordPress"
"Woocommerce" = "WooCommerce"
"get_post_stati" = "get_post_stati"
"Automattic" = "Automattic"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means: DO NOT CORRECT

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- `classifai_post_statuses_for_post_type_or_id` filter; allows post statuses for content classification to be changed as required based on post type / post ID (props [@jamesmorrison](https://github.com/jamesmorrison), [@dkotter](https://github.com/dkotter) via [#310](https://github.com/10up/classifai/pull/310)).
- Implement `can_register()` method for `Classifai/Providers/Watson/NLU.php` (props [@thrijith](https://github.com/thrijith) via [#313](https://github.com/10up/classifai/pull/313)).
- Notice for deprecated IBM Watson `watsonplatform.net` NLU API endpoint (props [@rahulsprajapati](https://github.com/rahulsprajapati), [@jeffpaul](https://github.com/jeffpaul) via [#320](https://github.com/10up/classifai/pull/320)).
- CodeQL Analaysis code scanning and Dependency security scanning actions (props [@jeffpaul](https://github.com/jeffpaul) via [#314](https://github.com/10up/classifai/pull/314), [#336](https://github.com/10up/classifai/pull/336)).
- CodeQL Analysis code scanning and Dependency security scanning actions (props [@jeffpaul](https://github.com/jeffpaul) via [#314](https://github.com/10up/classifai/pull/314), [#336](https://github.com/10up/classifai/pull/336)).

### Changed
- Bump WordPress "tested up to" version 5.9 (props [@s3rgiosan](https://github.com/s3rgiosan), [@jeffpaul](https://github.com/jeffpaul) via [#327](https://github.com/10up/classifai/pull/327)).
Expand Down
2 changes: 1 addition & 1 deletion hookdocs/useful-snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class MyProvider extends Provider {
*
* All Features will end up calling the rest_endpoint_callback method for their assigned Provider.
* This method should validate the route that is being called and then call the appropriate method
* for that route. This method typically will validate we have all the requried data and if so,
* for that route. This method typically will validate we have all the required data and if so,
* make a request to the appropriate API endpoint.
*
* @param int $post_id The Post ID we're processing.
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Admin/Onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct() {
}

/**
* Inintialize the class and register the actions needed.
* Initialize the class and register the actions needed.
*/
public function init() {
add_action( 'admin_menu', [ $this, 'register_setup_page' ] );
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Settings {
public function __construct() {}

/**
* Inintialize the class and register the actions needed.
* Initialize the class and register the actions needed.
*/
public function init() {
add_action( 'admin_menu', [ $this, 'register_settings_page' ] );
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Admin/UserProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ public function save_user_settings( int $user_id ) {
return;
}

$opted_out_feautures = isset( $_POST['classifai_opted_out_features'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['classifai_opted_out_features'] ) ) : array();
$opted_out_features = isset( $_POST['classifai_opted_out_features'] ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST['classifai_opted_out_features'] ) ) : array();

update_user_meta( $user_id, $this->opt_out_key, $opted_out_feautures );
update_user_meta( $user_id, $this->opt_out_key, $opted_out_features );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Features/Classification.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public function render_meta_box( \WP_Post $post ) {
</label>
</p>

<div class="classifai-clasify-post-wrapper" style="display: none;">
<div class="classifai-classify-post-wrapper" style="display: none;">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is a typo, because this is used as a class name, we'll need to decide if we want to leave this as-is, as others may be relying on this class for styling purposes and updating this will break things for them. Not overly concerned but something for us to consider

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding additional details here that this is used in the classic editor only.

<a href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=classifai_classify_post&post_id=' . $post->ID ), 'classifai_classify_post_action', 'classifai_classify_post_nonce' ) ); ?>" class="button button-classify-post">
<?php esc_html_e( 'Suggest terms & tags', 'classifai' ); ?>
</a>
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Features/PDFTextExtraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function register_endpoints() {
'required' => true,
'type' => 'integer',
'sanitize_callback' => 'absint',
'description' => esc_html__( 'Attachment ID to extact text from the PDF file.', 'classifai' ),
'description' => esc_html__( 'Attachment ID to extract text from the PDF file.', 'classifai' ),
],
],
'permission_callback' => [ $this, 'read_pdf_permissions_check' ],
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Features/Smart404EPIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct( $provider = null ) {
}

/**
* Inintialize the class and register the needed hooks.
* Initialize the class and register the needed hooks.
*/
public function init() {
// Vector support was added in Elasticsearch 7.0.
Expand Down
24 changes: 12 additions & 12 deletions includes/Classifai/Features/TermCleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function start_term_cleanup_process() {

$settings = $this->get_settings( 'taxonomies' );
$taxonomy = isset( $_POST['classifai_term_cleanup_taxonomy'] ) ? sanitize_text_field( wp_unslash( $_POST['classifai_term_cleanup_taxonomy'] ) ) : '';
$thresold = isset( $settings[ $taxonomy . '_threshold' ] ) ? absint( $settings[ $taxonomy . '_threshold' ] ) : 75;
$threshold = isset( $settings[ $taxonomy . '_threshold' ] ) ? absint( $settings[ $taxonomy . '_threshold' ] ) : 75;

if ( empty( $taxonomy ) ) {
wp_die( esc_html__( 'Invalid taxonomy.', 'classifai' ) );
Expand All @@ -387,7 +387,7 @@ public function start_term_cleanup_process() {
$job_args = [
[
'taxonomy' => $taxonomy,
'thresold' => $thresold,
'threshold' => $threshold,
'action' => 'term_cleanup',
'embeddings_generated' => false,
'processed' => 0,
Expand Down Expand Up @@ -515,16 +515,16 @@ public function generate_embeddings( string $taxonomy ) {
* Get similar terms.
*
* @param string $taxonomy Taxonomy to process.
* @param int $thresold Thresold to consider terms as duplicates.
* @param int $threshold Threshold to consider terms as duplicates.
* @param array $args Additional arguments.
* @return array|bool|WP_Error
*/
public function get_similar_terms( string $taxonomy, int $thresold, array $args = [] ) {
public function get_similar_terms( string $taxonomy, int $threshold, array $args = [] ) {
if ( class_exists( '\\ElasticPress\\Feature' ) && '1' === $this->get_settings( 'use_ep' ) ) {
return $this->get_similar_terms_using_elasticpress( $taxonomy, $thresold, $args );
return $this->get_similar_terms_using_elasticpress( $taxonomy, $threshold, $args );
}

return $this->get_similar_terms_using_wpdb( $taxonomy, $thresold, $args );
return $this->get_similar_terms_using_wpdb( $taxonomy, $threshold, $args );
}

/**
Expand All @@ -535,11 +535,11 @@ public function get_similar_terms( string $taxonomy, int $thresold, array $args
* when ElasticPress is not installed or not in use.
*
* @param string $taxonomy Taxonomy to process.
* @param int $thresold Thresold to consider terms as duplicates.
* @param int $threshold Threshold to consider terms as duplicates.
* @param array $args Additional arguments.
* @return array|bool
*/
public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, array $args = [] ) {
public function get_similar_terms_using_wpdb( string $taxonomy, int $threshold, array $args = [] ) {
$processed = $args['processed'] ?? 0;
$term_id = $args['term_id'] ?? 0;
$offset = $args['offset'] ?? 0;
Expand Down Expand Up @@ -625,7 +625,7 @@ public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, a
}

$similarity = $calculations->cosine_similarity( $term_embedding, $compare_embedding );
if ( false !== $similarity && ( 1 - $similarity ) >= ( $thresold / 100 ) ) {
if ( false !== $similarity && ( 1 - $similarity ) >= ( $threshold / 100 ) ) {
$similar_terms[ $compare_term_id ] = 1 - $similarity;
}
}
Expand Down Expand Up @@ -655,11 +655,11 @@ public function get_similar_terms_using_wpdb( string $taxonomy, int $thresold, a
* Get similar terms using Elasticsearch via ElasticPress.
*
* @param string $taxonomy Taxonomy to process.
* @param int $thresold Thresold to consider terms as duplicates.
* @param int $threshold Threshold to consider terms as duplicates.
* @param array $args Additional arguments.
* @return array|bool|WP_Error
*/
public function get_similar_terms_using_elasticpress( string $taxonomy, int $thresold, array $args = [] ) {
public function get_similar_terms_using_elasticpress( string $taxonomy, int $threshold, array $args = [] ) {
$processed = $args['processed'] ?? 0;
$meta_key = sanitize_text_field( $this->get_embeddings_meta_key() );

Expand Down Expand Up @@ -691,7 +691,7 @@ public function get_similar_terms_using_elasticpress( string $taxonomy, int $thr

foreach ( $terms as $term_id ) {
// Find similar terms for the term.
$search_results = $this->ep_integration->exact_knn_search( $term_id, 'term', 500, $thresold );
$search_results = $this->ep_integration->exact_knn_search( $term_id, 'term', 500, $threshold );

if ( is_wp_error( $search_results ) ) {
return $search_results;
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Features/TermCleanupEPIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct( $feature ) {
}

/**
* Inintialize the class and register the needed hooks.
* Initialize the class and register the needed hooks.
*/
public function init() {
// Vector support was added in Elasticsearch 7.0.
Expand Down
6 changes: 3 additions & 3 deletions includes/Classifai/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ function get_largest_acceptable_image_url( string $full_image, string $full_url,
* @param string $full_image The path to the full-sized image source file.
* @param string $full_url The URL of the full-sized image.
* @param array $metadata Attachment metadata, including intermediate sizes.
* @param array $width Array of minimimum and maximum width values. Default 0, 4200.
* @param array $height Array of minimimum and maximum height values. Default 0, 4200.
* @param array $width Array of minimum and maximum width values. Default 0, 4200.
* @param array $height Array of minimum and maximum height values. Default 0, 4200.
* @param int $max_size The maximum acceptable filesize. Default 1MB.
* @return string|null The image URL, or null if no acceptable image found.
*/
Expand Down Expand Up @@ -456,7 +456,7 @@ function check_term_permissions( string $tax = '' ) {
$create_cap = is_taxonomy_hierarchical( $taxonomy->name ) ? $taxonomy->cap->edit_terms : $taxonomy->cap->assign_terms;

if ( ! current_user_can( $create_cap ) || ! current_user_can( $taxonomy->cap->assign_terms ) ) {
return new WP_Error( 'rest_cannot_assign_term', esc_html__( 'Sorry, you are not alllowed to create or assign to this taxonomy.', 'classifai' ) );
return new WP_Error( 'rest_cannot_assign_term', esc_html__( 'Sorry, you are not allowed to create or assign to this taxonomy.', 'classifai' ) );
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Providers/Azure/Embeddings.php
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ private function get_embeddings_similarity( array $embedding, bool $consider_thr
*
* @param string $taxonomy Taxonomy slug.
* @param bool $all Whether to generate embeddings for all terms or just those without embeddings.
* @param array $args Overrideable query args for get_terms()
* @param array $args Overridable query args for get_terms()
* @param int $user_id The user ID to run this as.
*/
private function trigger_taxonomy_update( string $taxonomy = '', bool $all = false, array $args = [], int $user_id = 0 ) {
Expand Down Expand Up @@ -775,7 +775,7 @@ private function trigger_taxonomy_update( string $taxonomy = '', bool $all = fal
*
* @param string $taxonomy Taxonomy slug.
* @param bool $all Whether to generate embeddings for all terms or just those without embeddings.
* @param array $args Overrideable query args for get_terms()
* @param array $args Overridable query args for get_terms()
* @param int $user_id The user ID to run this as.
*/
public function generate_embedding_job( string $taxonomy = '', bool $all = false, array $args = [], int $user_id = 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/Azure/OpenAI.php
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ public function get_result( $response ) {
if ( empty( $json['error'] ) ) {
return $json;
} else {
$message = $json['error']['message'] ?? esc_html__( 'An error occured', 'classifai' );
$message = $json['error']['message'] ?? esc_html__( 'An error occurred', 'classifai' );
return new WP_Error( $code, $message );
}
} elseif ( ! empty( wp_remote_retrieve_response_message( $response ) ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/GoogleAI/APIRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function get_result( $response ) {
if ( empty( $json['error'] ) ) {
return $json;
} else {
$message = $json['error']['message'] ?? esc_html__( 'An error occured', 'classifai' );
$message = $json['error']['message'] ?? esc_html__( 'An error occurred', 'classifai' );
return new WP_Error( $code, $message );
}
} elseif ( ! empty( wp_remote_retrieve_response_message( $response ) ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/OpenAI/APIRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function get_result( $response ) {
if ( empty( $json['error'] ) ) {
return $json;
} else {
$message = $json['error']['message'] ?? esc_html__( 'An error occured', 'classifai' );
$message = $json['error']['message'] ?? esc_html__( 'An error occurred', 'classifai' );
return new WP_Error( $code, $message );
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/Providers/OpenAI/Embeddings.php
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ private function get_embeddings_similarity( array $embedding, bool $consider_thr
*
* @param string $taxonomy Taxonomy slug.
* @param bool $all Whether to generate embeddings for all terms or just those without embeddings.
* @param array $args Overrideable query args for get_terms()
* @param array $args Overridable query args for get_terms()
* @param int $user_id The user ID to run this as.
*/
public function trigger_taxonomy_update( string $taxonomy = '', bool $all = false, array $args = [], int $user_id = 0 ) {
Expand Down Expand Up @@ -891,7 +891,7 @@ public function trigger_taxonomy_update( string $taxonomy = '', bool $all = fals
*
* @param string $taxonomy Taxonomy slug.
* @param bool $all Whether to generate embeddings for all terms or just those without embeddings.
* @param array $args Overrideable query args for get_terms()
* @param array $args Overridable query args for get_terms()
* @param int $user_id The user ID to run this as.
*/
public function generate_embedding_job( string $taxonomy = '', bool $all = false, array $args = [], int $user_id = 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/Classifai/Providers/XAI/APIRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function get_result( $response ) {
} else {
$message = $json['error']['message'] ?? '';
if ( empty( $message ) ) {
$message = $json['error'] ?? esc_html__( 'An error occured', 'classifai' );
$message = $json['error'] ?? esc_html__( 'An error occurred', 'classifai' );
}
return new WP_Error( $code, $message );
}
Expand Down
4 changes: 2 additions & 2 deletions includes/Classifai/TermCleanupScheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function run( array $item = [] ) {
case 'term_cleanup':
$started_by = absint( $item['started_by'] );
$taxonomy = $item['taxonomy'];
$thresold = $item['thresold'];
$threshold = $item['threshold'];
$term_cleanup = new TermCleanup();
$embeddings_generated = (bool) $item['embeddings_generated'];

Expand Down Expand Up @@ -92,7 +92,7 @@ public function run( array $item = [] ) {
'term_id' => $item['term_id'] ?? 0,
'offset' => $item['offset'] ?? 0,
);
$res = $term_cleanup->get_similar_terms( $taxonomy, $thresold, $args );
$res = $term_cleanup->get_similar_terms( $taxonomy, $threshold, $args );

/**
* Fires when a batch of similar terms are calculated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PrePubClassifyPost extends Component {
* Render the component.
*/
render() {
// retun null if popupOpened is true
// return null if popupOpened is true
if ( this.props.popupOpened ) {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/features/classification/previewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ import './previewer.scss';
* Filters response data depending on the threshold value.
*
* @param {Object} data Response data from NLU.
* @param {Object} thresholds Object containing threshold values for various taxnomy types.
* @param {Object} thresholds Object containing threshold values for various taxonomy types.
* @return {Array} Sorted data.
*/
function filterByScoreOrRelevance( data = {}, thresholds ) {
Expand Down Expand Up @@ -513,7 +513,7 @@ document.addEventListener( 'DOMContentLoaded', function () {
if ( classifaiNLUCheckbox ) {
classifaiNLUCheckbox.addEventListener( 'change', function () {
const classifyButton = document.querySelector(
'.classifai-clasify-post-wrapper'
'.classifai-classify-post-wrapper'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide we don't want to change this class name (mentioned in another comment) we'll want to revert this change as well

);
if ( this.checked === true ) {
classifyButton.style.display = 'none';
Expand Down
2 changes: 1 addition & 1 deletion src/js/features/classification/taxonomy-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const TaxonomyControls = ( { onChange, query } ) => {
// Append newTerm to taxoInfo.terms.
const terms = {
...taxoInfo.terms,
entitites: [
entities: [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this typo may have caused problems but would be curious to know if that was the case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos is a very useful tool. Not every day but the benefits are great on those days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW tsc from Typescript does perform static analysis on JavaScript too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkotter, I just checked this. Due to a typo, the terms object was updated with a new key, but since we are not using the entities data, it hasn't caused any issues yet.

...taxoInfo.terms.entities,
newTerm,
],
Expand Down
2 changes: 1 addition & 1 deletion src/js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const chromeAITextGeneration = async ( prompt = '', content = '' ) => {
sprintf(
/* translators: %s: error message */
__(
'Error occured during AI text generation: %1$s. Please ensure you have followed the setup instructions at https://10up.github.io/classifai/tutorial-chrome-built-in-ai.html',
'Error occurred during AI text generation: %1$s. Please ensure you have followed the setup instructions at https://10up.github.io/classifai/tutorial-chrome-built-in-ai.html',
'classifai'
),
e?.message
Expand Down
4 changes: 2 additions & 2 deletions src/js/settings/components/provider-settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { AzurePersonalizerSettings } from './azure-personlizer';
import { OpenAIDallESettings } from './openai-dalle';
import { AmazonPollySettings } from './amazon-polly';
import { AzureTextToSpeechSettings } from './azure-text-to-speech';
import { OpenAITextToSpeachSettings } from './openai-text-to-speech';
import { OpenAITextToSpeechSettings } from './openai-text-to-speech';
import { ChromeAISettings } from './chrome-ai';
import { XAIGrokSettings } from './xai-grok';

Expand Down Expand Up @@ -84,7 +84,7 @@ const ProviderFields = ( { provider, isConfigured } ) => {
return <AzureTextToSpeechSettings isConfigured={ isConfigured } />;

case 'openai_text_to_speech':
return <OpenAITextToSpeachSettings isConfigured={ isConfigured } />;
return <OpenAITextToSpeechSettings isConfigured={ isConfigured } />;

case 'xai_grok':
return <XAIGrokSettings isConfigured={ isConfigured } />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import { STORE_NAME } from '../../data/store';
* @param {Object} props Component props.
* @param {boolean} props.isConfigured Whether the provider is configured.
*
* @return {React.ReactElement} OpenAITextToSpeachSettings component.
* @return {React.ReactElement} OpenAITextToSpeechSettings component.
*/
export const OpenAITextToSpeachSettings = ( { isConfigured = false } ) => {
export const OpenAITextToSpeechSettings = ( { isConfigured = false } ) => {
const providerName = 'openai_text_to_speech';
const providerSettings = useSelect(
( select ) =>
Expand Down
Loading
Loading