Changeset 12629 for sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-translation-helpers.php
- Timestamp:
- 06/07/2023 08:07:12 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-translation-helpers.php
r12626 r12629 397 397 gp_enqueue_script( 'gp-comment-feedback-js' ); 398 398 399 $gp_locale = GP_Locales::by_field( 'slug', $translation_set['locale_slug'] ); 399 400 wp_localize_script( 400 401 'gp-comment-feedback-js', … … 404 405 'nonce' => wp_create_nonce( 'gp_comment_feedback' ), 405 406 'locale_slug' => $translation_set['locale_slug'], 407 'language' => $gp_locale ? $gp_locale->english_name : 'Unknown', 408 'has_openai_key' => !! apply_filters( 'gp_get_openai_key', null ), 406 409 'comment_reasons' => Helper_Translation_Discussion::get_comment_reasons( $translation_set['locale_slug'] ), 407 410 ) … … 453 456 454 457 $openai_response = GP_OpenAI_Review::get_openai_review( $original, $translation, $language, $glossary, $is_retry ); 455 458 if ( isset( $openai_response['error'] ) ) { 459 wp_send_json_error( $openai_response ); 460 } 456 461 wp_send_json_success( $openai_response ); 457 462 }
Note: See TracChangeset
for help on using the changeset viewer.