Changeset 14582 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/inc/class-plugin.php
- Timestamp:
- 10/30/2025 11:04:28 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/inc/class-plugin.php
r12873 r14582 6 6 use GP_Locales; 7 7 use WordPressdotorg\GlotPress\TranslationSuggestions\Routes\Translation_Memory; 8 use WordPressdotorg\GlotPress\Bulk_Pretranslations\Deepl; 8 9 9 10 class Plugin { … … 131 132 $get_openai_translations = ! empty( trim( gp_array_get( $gp_default_sort, 'openai_api_key' ) ) ); 132 133 $get_deepl_translations = ! empty( trim( gp_array_get( $gp_default_sort, 'deepl_api_key' ) ) ); 133 134 $deepl = new DeepL(); 135 $deepl_locale = $deepl->get_deepl_locale( $args['locale_slug'] ); 136 134 137 wp_localize_script( 135 138 'gp-translation-suggestions', … … 140 143 'get_openai_translations' => $get_openai_translations, 141 144 'get_deepl_translations' => $get_deepl_translations, 145 'get_deepl_locale' => $deepl_locale, 142 146 ), 143 147 ) … … 145 149 146 150 gp_enqueue_script( 'gp-translation-suggestions' ); 147 148 151 wp_add_inline_script( 149 152 'gp-translation-suggestions',
Note: See TracChangeset
for help on using the changeset viewer.