TranslatePress – Translate Multilingual sites - Version 2.1.9

Version Description

  • Improved database optimization tool by adding option to remove CDATA and untranslated links from TP custom tables
  • Fixed database optimization tool not starting in some cases
  • Fixed edge case error unknown format specifier on php 8 related to automatic translation of gettext strings
  • Added noindex tag to Translation Editor pages to prevent duplicate indexing
Download this release

Release Info

Developer razvan.mo
Plugin Icon 128x128 TranslatePress – Translate Multilingual sites
Version 2.1.9
Comparing to
See all releases

Code changes from version 2.1.8 to 2.1.9

class-translate-press.php CHANGED
@@ -58,7 +58,7 @@ class TRP_Translate_Press{
58
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
59
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
60
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
61
- define( 'TRP_PLUGIN_VERSION', '2.1.8' );
62
 
63
  wp_cache_add_non_persistent_groups(array('trp'));
64
 
@@ -248,6 +248,8 @@ class TRP_Translate_Press{
248
  $this->loader->add_action( 'admin_menu', $this->upgrade, 'register_menu_page' );
249
  $this->loader->add_action( 'admin_init', $this->upgrade, 'show_admin_notice' );
250
  $this->loader->add_action( 'admin_init', $this->upgrade, 'show_notification_about_add_ons_removal' );
 
 
251
  $this->loader->add_action( 'admin_enqueue_scripts', $this->upgrade, 'enqueue_update_script', 10, 1 );
252
  $this->loader->add_action( 'wp_ajax_trp_update_database', $this->upgrade, 'trp_update_database' );
253
 
@@ -395,6 +397,10 @@ class TRP_Translate_Press{
395
  //search
396
  $this->loader->add_filter( 'pre_get_posts', $this->search, 'trp_search_filter', 99999999 );
397
  $this->loader->add_filter( 'get_search_query', $this->search, 'trp_search_query', 10 );
 
 
 
 
398
  }
399
 
400
  /**
58
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
59
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
60
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
61
+ define( 'TRP_PLUGIN_VERSION', '2.1.9' );
62
 
63
  wp_cache_add_non_persistent_groups(array('trp'));
64
 
248
  $this->loader->add_action( 'admin_menu', $this->upgrade, 'register_menu_page' );
249
  $this->loader->add_action( 'admin_init', $this->upgrade, 'show_admin_notice' );
250
  $this->loader->add_action( 'admin_init', $this->upgrade, 'show_notification_about_add_ons_removal' );
251
+ $this->loader->add_action( 'admin_init', $this->upgrade, 'trp_prepare_options_for_database_optimization' );
252
+ $this->loader->add_action( 'admin_init', $this->upgrade, 'show_admin_error_message' );
253
  $this->loader->add_action( 'admin_enqueue_scripts', $this->upgrade, 'enqueue_update_script', 10, 1 );
254
  $this->loader->add_action( 'wp_ajax_trp_update_database', $this->upgrade, 'trp_update_database' );
255
 
397
  //search
398
  $this->loader->add_filter( 'pre_get_posts', $this->search, 'trp_search_filter', 99999999 );
399
  $this->loader->add_filter( 'get_search_query', $this->search, 'trp_search_query', 10 );
400
+
401
+ /* prevent indexing edit translation preview pages */
402
+ $this->loader->add_action( 'trp_head', $this->translation_manager, 'output_noindex_tag', 100 );
403
+ $this->loader->add_action( 'wp_head', $this->translation_manager, 'output_noindex_tag', 100 );
404
  }
405
 
406
  /**
includes/class-machine-translator.php CHANGED
@@ -314,7 +314,8 @@ class TRP_Machine_Translator {
314
  if ( !empty($strings) && is_array($strings) && method_exists( $this, 'translate_array' ) && apply_filters( 'trp_disable_automatic_translations_due_to_error', false ) === false ) {
315
 
316
  /* google has a problem translating this characters ( '%', '$', '#' )...for some reasons it puts spaces after them so we need to 'encode' them and decode them back. hopefully it won't break anything important */
317
- $trp_exclude_words_from_automatic_translation = apply_filters('trp_exclude_words_from_automatic_translation', array('%', '$', '#'));
 
318
  $placeholders = $this->get_placeholders(count($trp_exclude_words_from_automatic_translation));
319
  $shortcode_tags_to_execute = apply_filters( 'trp_do_these_shortcodes_before_automatic_translation', array('trp_language') );
320
 
314
  if ( !empty($strings) && is_array($strings) && method_exists( $this, 'translate_array' ) && apply_filters( 'trp_disable_automatic_translations_due_to_error', false ) === false ) {
315
 
316
  /* google has a problem translating this characters ( '%', '$', '#' )...for some reasons it puts spaces after them so we need to 'encode' them and decode them back. hopefully it won't break anything important */
317
+ /* we put '%s' before '%' because google seems to transform %s into % in strings for some languages which causes a 500 Fata Error in PHP 8*/
318
+ $trp_exclude_words_from_automatic_translation = apply_filters('trp_exclude_words_from_automatic_translation', array('%s','%', '$', '#'));
319
  $placeholders = $this->get_placeholders(count($trp_exclude_words_from_automatic_translation));
320
  $shortcode_tags_to_execute = apply_filters( 'trp_do_these_shortcodes_before_automatic_translation', array('trp_language') );
321
 
includes/class-query.php CHANGED
@@ -1267,11 +1267,91 @@ class TRP_Query{
1267
  return $query;
1268
  }
1269
 
1270
- /*
1271
- * Get last inserted ID for this table
1272
- *
1273
- * Useful for optimizing database by removing duplicate rows
1274
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1275
  public function get_last_id( $table_name ){
1276
  $last_id = $this->db->get_var("SELECT MAX(id) FROM " . $table_name );
1277
  return $last_id;
1267
  return $query;
1268
  }
1269
 
1270
+
1271
+ /**
1272
+ * Removes CDATA from original and dictionary tables.
1273
+ * @param $language_code
1274
+ * @param $inferior_limit
1275
+ * @param $batch_size
1276
+ * @return bool
1277
+ */
1278
+ public function remove_cdata_in_original_and_dictionary_tables($language_code, $inferior_limit, $batch_size){
1279
+
1280
+ if ($language_code == $this->settings['default-language']){
1281
+ $table_name = $this->get_table_name_for_original_strings();
1282
+ $query = $this->get_remove_cdata_query($table_name, $batch_size);
1283
+
1284
+ $rows_affected = $this->db->query( $query );
1285
+ if ( $rows_affected > 0 ) {
1286
+ return false;
1287
+ }else{
1288
+ return true;
1289
+ }
1290
+ }
1291
+ $table_name = $this->get_table_name( $language_code );
1292
+ if ($this->table_exists($table_name)) {
1293
+ $query = $this->get_remove_cdata_query($table_name, $batch_size);
1294
+ $rows_affected = $this->db->query( $query );
1295
+ if ( $rows_affected > 0 ) {
1296
+ return false;
1297
+ }else{
1298
+ return true;
1299
+ }
1300
+ }else{
1301
+ return true;
1302
+ }
1303
+ }
1304
+
1305
+ /**
1306
+ * @param $table_name
1307
+ * @param $batch_size
1308
+ * @return string
1309
+ */
1310
+ private function get_remove_cdata_query( $table_name, $batch_size ){
1311
+
1312
+ $query = "DELETE FROM " . $table_name . " WHERE original LIKE '<![CDATA[%' LIMIT " . $batch_size;
1313
+
1314
+ return $query;
1315
+ }
1316
+
1317
+ /**
1318
+ * Removes untranslated links from the dictionary table
1319
+ * @param $language_code
1320
+ * @param $inferior_limit
1321
+ * @param $batch_size
1322
+ * @return bool
1323
+ */
1324
+ public function remove_untranslated_links_in_dictionary_table($language_code, $inferior_limit, $batch_size){
1325
+ $table_name = $this->get_table_name( $language_code );
1326
+ if ($this->table_exists($table_name)) {
1327
+ $query = $this->get_remove_untranslated_links_query($table_name, $batch_size);
1328
+ $rows_affected = $this->db->query( $query );
1329
+ if ( $rows_affected > 0 ) {
1330
+ return false;
1331
+ }else{
1332
+ return true;
1333
+ }
1334
+ }else{
1335
+ return true;
1336
+ }
1337
+ }
1338
+
1339
+ /**
1340
+ * @param $table_name
1341
+ * @return $query
1342
+ */
1343
+ private function get_remove_untranslated_links_query($table_name, $batch_size){
1344
+
1345
+ $query = "DELETE FROM " . $table_name . " WHERE original LIKE 'http%' AND (translated = '' OR translated IS NULL) LIMIT " . $batch_size;
1346
+
1347
+ return $query;
1348
+ }
1349
+
1350
+ /*
1351
+ * Get last inserted ID for this table
1352
+ *
1353
+ * Useful for optimizing database by removing duplicate rows
1354
+ */
1355
  public function get_last_id( $table_name ){
1356
  $last_id = $this->db->get_var("SELECT MAX(id) FROM " . $table_name );
1357
  return $last_id;
includes/class-translation-manager.php CHANGED
@@ -1380,4 +1380,17 @@ class TRP_Translation_Manager
1380
  }
1381
  }
1382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1383
  }
1380
  }
1381
  }
1382
 
1383
+ /**
1384
+ * Prevent indexing edit translation preview pages.
1385
+ *
1386
+ * Hooked to trp_head, wp_head
1387
+ *
1388
+ */
1389
+ public function output_noindex_tag()
1390
+ {
1391
+ if( $this->conditions_met( 'true' ) || $this->conditions_met( 'preview' ) ){
1392
+ echo '<meta name="robots" content="noindex, nofollow">';
1393
+ }
1394
+ }
1395
+
1396
  }
includes/class-upgrade.php CHANGED
@@ -21,6 +21,7 @@ class TRP_Upgrade {
21
  global $wpdb;
22
  $this->db = $wpdb;
23
  $this->settings = $settings;
 
24
  }
25
 
26
  /**
@@ -104,6 +105,22 @@ class TRP_Upgrade {
104
  public function get_updates_details(){
105
  return apply_filters( 'trp_updates_details',
106
  array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  'full_trim_originals_140' => array(
108
  'version' => '1.4.0',
109
  'option_name' => 'trp_updated_database_full_trim_originals_140',
@@ -155,7 +172,7 @@ class TRP_Upgrade {
155
  'batch_size' => 1000,
156
  'message_processing'=> __('Inserting original strings for language %s...', 'translatepress-multilingual' )
157
  ),
158
- 'original_id_cleanup_166' => array(
159
  'version' => '1.6.6',
160
  'option_name' => 'trp_updated_database_original_id_cleanup_166',
161
  'callback' => array( $this,'trp_updated_database_original_id_cleanup_166'),
@@ -187,6 +204,15 @@ class TRP_Upgrade {
187
  'batch_size' => 20000,
188
  'message_initial' => '',
189
  'message_processing'=> __('Cleaning original meta table for language %s...', 'translatepress-multilingual' )
 
 
 
 
 
 
 
 
 
190
  )
191
  )
192
  );
@@ -226,10 +252,41 @@ class TRP_Upgrade {
226
  echo $html;//phpcs:ignore
227
  }
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  public function trp_update_database_page(){
230
  require_once TRP_PLUGIN_DIR . 'partials/trp-update-database.php';
231
  }
232
 
 
 
233
  /**
234
  * Call all functions to update database
235
  *
@@ -329,23 +386,25 @@ class TRP_Upgrade {
329
 
330
  if ( $finished_with_language ) {
331
  // finished with the current language
332
- $index = array_search( $language_code, $this->settings['translation-languages'] );
333
- if ( isset ( $this->settings['translation-languages'][ $index + 1 ] ) ) {
334
- // next language code in array
335
- $request['trp_updb_lang'] = $this->settings['translation-languages'][ $index + 1 ];
336
- $request['progress_message'] .= __(' done.', 'translatepress-multilingual' ) . '</br>';
337
- $update_message_processing = isset( $updates_needed[$_REQUEST['trp_updb_action']]['message_processing'] ) ?
338
- $updates_needed[ sanitize_text_field( $_REQUEST['trp_updb_action'] ) ]['message_processing']
339
- : __('Processing table for language %s...', 'translatepress-multilingual' );
340
- $request['progress_message'] .= '</br>' . sprintf( $update_message_processing, $request['trp_updb_lang'] );
341
- } else {
342
- // finish action due to completing all the translation languages
343
- $request['progress_message'] .= __(' done.', 'translatepress-multilingual' ) . '</br>';
344
- $request['trp_updb_lang'] = '';
345
- // this will stop showing the admin notice
346
- update_option( $update_details['option_name'], 'yes' );
347
- $request['trp_updb_action'] = '';
348
- }
 
 
349
  }else{
350
  $request['trp_updb_lang'] = $language_code;
351
  $request['progress_message'] = '.';
@@ -491,42 +550,65 @@ class TRP_Upgrade {
491
  }
492
  }
493
 
494
- /**
495
- * Remove duplicate rows from DB for trp_dictionary tables.
496
- * Removes untranslated strings if there is a translated version.
497
- *
498
- * Iterates over languages. Each language is iterated in batches of 10 000
499
- *
500
- * Not accessible from anywhere else
501
- * http://example.com/wp-admin/admin.php?page=trp_remove_duplicate_rows
502
- */
503
- public function trp_remove_duplicate_rows(){
504
- if ( ! current_user_can( 'manage_options' ) ){
505
- return;
506
- }
507
- // prepare page structure
508
 
509
- require_once TRP_PLUGIN_DIR . 'partials/trp-remove-duplicate-rows.php';
 
 
 
 
 
510
 
511
  if(isset( $_GET['trp_rm_duplicates_gettext'] )){
512
  update_option('trp_remove_duplicate_gettext_rows', 'no');
513
  update_option('trp_remove_duplicate_untranslated_gettext_rows', 'no');
 
514
  }
515
 
516
  if(isset( $_GET['trp_rm_duplicates_dictionary'] )){
517
  update_option('trp_remove_duplicate_dictionary_rows', 'no');
518
  update_option('trp_remove_duplicate_untranslated_dictionary_rows', 'no');
 
519
  }
520
 
521
  if ( isset( $_GET['trp_rm_duplicates_original_strings'] ) ){
522
  $this->trp_remove_duplicate_original_strings();
 
 
 
 
 
 
523
  }
524
 
525
- if (isset( $_GET['trp_rm_duplicates_gettext'] ) || isset( $_GET['trp_rm_duplicates_dictionary'] ) || isset( $_GET['trp_rm_duplicates_original_strings'] )) {
 
 
 
 
 
 
526
  $url = add_query_arg( array( 'page' => 'trp_update_database' ), site_url( 'wp-admin/admin.php' ) );
527
  wp_safe_redirect( $url );
 
528
  }
529
- exit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  }
531
 
532
  public function enqueue_update_script( $hook ) {
@@ -645,8 +727,6 @@ class TRP_Upgrade {
645
  $this->trp_query->rename_originals_table();
646
  $this->trp_query->check_original_table();
647
 
648
- echo '<br> ' . esc_html__( 'Recreated original strings table.', 'translatepress-multilingual' );
649
-
650
  update_option( 'trp_updated_database_original_id_insert_166', 'no' );
651
  update_option( 'trp_updated_database_original_id_cleanup_166', 'no' );
652
  update_option( 'trp_updated_database_original_id_update_166', 'no' );
21
  global $wpdb;
22
  $this->db = $wpdb;
23
  $this->settings = $settings;
24
+
25
  }
26
 
27
  /**
105
  public function get_updates_details(){
106
  return apply_filters( 'trp_updates_details',
107
  array(
108
+ 'remove_cdata_original_and_dictionary_rows' => array(
109
+ 'version' => '0',
110
+ 'option_name' => 'trp_remove_cdata_original_and_dictionary_rows',
111
+ 'callback' => array( $this->trp_query,'remove_cdata_in_original_and_dictionary_tables'),
112
+ 'batch_size' => 1000,
113
+ 'message_initial' => '',
114
+ 'message_processing'=> __('Removing cdata dictionary strings for language %s...', 'translatepress-multilingual' )
115
+ ),
116
+ 'remove_untranslated_links_dictionary_rows' => array(
117
+ 'version' => '0',
118
+ 'option_name' => 'trp_remove_untranslated_links_dictionary_rows',
119
+ 'callback' => array( $this->trp_query,'remove_untranslated_links_in_dictionary_table'),
120
+ 'batch_size' => 10000,
121
+ 'message_initial' => '',
122
+ 'message_processing'=> __('Removing untranslated dictionary links for language %s...', 'translatepress-multilingual' )
123
+ ),
124
  'full_trim_originals_140' => array(
125
  'version' => '1.4.0',
126
  'option_name' => 'trp_updated_database_full_trim_originals_140',
172
  'batch_size' => 1000,
173
  'message_processing'=> __('Inserting original strings for language %s...', 'translatepress-multilingual' )
174
  ),
175
+ 'original_id_cleanup_166' => array(
176
  'version' => '1.6.6',
177
  'option_name' => 'trp_updated_database_original_id_cleanup_166',
178
  'callback' => array( $this,'trp_updated_database_original_id_cleanup_166'),
204
  'batch_size' => 20000,
205
  'message_initial' => '',
206
  'message_processing'=> __('Cleaning original meta table for language %s...', 'translatepress-multilingual' )
207
+ ),
208
+ 'show_error_db_message' => array(
209
+ 'version' => '0', // independent of tp version, available only on demand
210
+ 'option_name' => 'trp_show_error_db_message',
211
+ 'callback' => array( $this,'trp_successfully_run_database_optimization'),
212
+ 'batch_size' => 10,
213
+ 'message_initial' => '',
214
+ 'message_processing'=> __('Finishing up...', 'translatepress-multilingual' ),
215
+ 'execute_only_once' => true
216
  )
217
  )
218
  );
252
  echo $html;//phpcs:ignore
253
  }
254
 
255
+ public function trp_successfully_run_database_optimization($language_code= null, $inferior_size = null, $batch_size = null){
256
+ delete_option('trp_show_error_db_message');
257
+
258
+ return true;
259
+ }
260
+
261
+
262
+ public function show_admin_error_message(){
263
+ if ( ( isset( $_GET[ 'page'] ) && $_GET['page'] == 'trp_update_database' ) ){
264
+ return;
265
+ }
266
+ $updates_needed = $this->get_updates_details();
267
+ foreach ( $updates_needed as $update ) {
268
+ $option = get_option( $update['option_name'] );
269
+ if ( $option === 'no' ) {
270
+ add_action( 'admin_notices', array( $this, 'trp_admin_notice_error_database' ) );
271
+ break;
272
+ }
273
+ }
274
+ }
275
+
276
+ public function trp_admin_notice_error_database(){
277
+
278
+ echo '<div class="notice notice-error is-dismissible">
279
+ <p>' . wp_kses( sprintf( __('Database optimization did not complete successfully. We recommend restoring the original database or <a href="%s" >trying again.</a>', 'translatepress-multilingual'), admin_url('admin.php?page=trp_update_database') ), array('a' => array( 'href' => array() ) ) ) .'</p>
280
+ </div>';
281
+
282
+ }
283
+
284
  public function trp_update_database_page(){
285
  require_once TRP_PLUGIN_DIR . 'partials/trp-update-database.php';
286
  }
287
 
288
+
289
+
290
  /**
291
  * Call all functions to update database
292
  *
386
 
387
  if ( $finished_with_language ) {
388
  // finished with the current language
389
+ $index = array_search( $language_code, $this->settings['translation-languages'] );
390
+
391
+ if ( isset ( $this->settings['translation-languages'][ $index + 1 ] ) && (!isset($update_details['execute_only_once']) || $update_details['execute_only_once'] == false)) {
392
+ // next language code in array
393
+ $request['trp_updb_lang'] = $this->settings['translation-languages'][ $index + 1 ];
394
+ $request['progress_message'] .= __( ' done.', 'translatepress-multilingual' ) . '</br>';
395
+ $update_message_processing = isset( $updates_needed[ $_REQUEST['trp_updb_action'] ]['message_processing'] ) ?
396
+ $updates_needed[ sanitize_text_field( $_REQUEST['trp_updb_action'] ) ]['message_processing']
397
+ : __( 'Processing table for language %s...', 'translatepress-multilingual' );
398
+ $request['progress_message'] .= '</br>' . sprintf( $update_message_processing, $request['trp_updb_lang'] );
399
+
400
+ } else {
401
+ // finish action due to completing all the translation languages
402
+ $request['progress_message'] .= __( ' done.', 'translatepress-multilingual' ) . '</br>';
403
+ $request['trp_updb_lang'] = '';
404
+ // this will stop showing the admin notice
405
+ update_option( $update_details['option_name'], 'yes' );
406
+ $request['trp_updb_action'] = '';
407
+ }
408
  }else{
409
  $request['trp_updb_lang'] = $language_code;
410
  $request['progress_message'] = '.';
550
  }
551
  }
552
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
 
554
+ public function trp_prepare_options_for_database_optimization(){
555
+ if ( !current_user_can('manage_options') ){
556
+ return;
557
+ }
558
+
559
+ $redirect = false;
560
 
561
  if(isset( $_GET['trp_rm_duplicates_gettext'] )){
562
  update_option('trp_remove_duplicate_gettext_rows', 'no');
563
  update_option('trp_remove_duplicate_untranslated_gettext_rows', 'no');
564
+ $redirect = true;
565
  }
566
 
567
  if(isset( $_GET['trp_rm_duplicates_dictionary'] )){
568
  update_option('trp_remove_duplicate_dictionary_rows', 'no');
569
  update_option('trp_remove_duplicate_untranslated_dictionary_rows', 'no');
570
+ $redirect = true;
571
  }
572
 
573
  if ( isset( $_GET['trp_rm_duplicates_original_strings'] ) ){
574
  $this->trp_remove_duplicate_original_strings();
575
+ $redirect = true;
576
+ }
577
+
578
+ if ( isset( $_GET['trp_rm_cdata_original_and_dictionary'])){
579
+ update_option('trp_remove_cdata_original_and_dictionary_rows', 'no');
580
+ $redirect = true;
581
  }
582
 
583
+ if ( isset( $_GET['trp_rm_untranslated_links'] ) ){
584
+ update_option('trp_remove_untranslated_links_dictionary_rows', 'no');
585
+ $redirect = true;
586
+ }
587
+
588
+ if ( $redirect ) {
589
+ update_option('trp_show_error_db_message', 'no');
590
  $url = add_query_arg( array( 'page' => 'trp_update_database' ), site_url( 'wp-admin/admin.php' ) );
591
  wp_safe_redirect( $url );
592
+ exit;
593
  }
594
+ }
595
+
596
+ /**
597
+ * Remove duplicate rows from DB for trp_dictionary tables.
598
+ * Removes untranslated strings if there is a translated version.
599
+ *
600
+ * Iterates over languages. Each language is iterated in batches of 10 000
601
+ *
602
+ * Not accessible from anywhere else
603
+ * http://example.com/wp-admin/admin.php?page=trp_remove_duplicate_rows
604
+ */
605
+ public function trp_remove_duplicate_rows(){
606
+ if ( ! current_user_can( 'manage_options' ) ){
607
+ return;
608
+ }
609
+ // prepare page structure
610
+
611
+ require_once TRP_PLUGIN_DIR . 'partials/trp-remove-duplicate-rows.php';
612
  }
613
 
614
  public function enqueue_update_script( $hook ) {
727
  $this->trp_query->rename_originals_table();
728
  $this->trp_query->check_original_table();
729
 
 
 
730
  update_option( 'trp_updated_database_original_id_insert_166', 'no' );
731
  update_option( 'trp_updated_database_original_id_cleanup_166', 'no' );
732
  update_option( 'trp_updated_database_original_id_update_166', 'no' );
index.php CHANGED
@@ -3,14 +3,14 @@
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
6
- Version: 2.1.8
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
10
  Domain Path: /languages
11
  License: GPL2
12
  WC requires at least: 2.5.0
13
- WC tested up to: 6.0
14
 
15
  == Copyright ==
16
  Copyright 2017 Cozmoslabs (www.cozmoslabs.com)
3
  Plugin Name: TranslatePress - Multilingual
4
  Plugin URI: https://translatepress.com/
5
  Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
6
+ Version: 2.1.9
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
10
  Domain Path: /languages
11
  License: GPL2
12
  WC requires at least: 2.5.0
13
+ WC tested up to: 6.1
14
 
15
  == Copyright ==
16
  Copyright 2017 Cozmoslabs (www.cozmoslabs.com)
languages/translatepress-multilingual.catalog.php CHANGED
@@ -192,6 +192,8 @@
192
  <?php __("OG Image", "translatepress-multilingual"); ?>
193
  <?php __("OG Image Secure URL", "translatepress-multilingual"); ?>
194
  <?php __("Twitter Image", "translatepress-multilingual"); ?>
 
 
195
  <?php __("Removing duplicated gettext strings for language %s...", "translatepress-multilingual"); ?>
196
  <?php __("Removing untranslated gettext strings where translation is available for language %s...", "translatepress-multilingual"); ?>
197
  <?php __("Removing duplicated dictionary strings for language %s...", "translatepress-multilingual"); ?>
@@ -201,10 +203,12 @@
201
  <?php __("Updating original string ids for language %s...", "translatepress-multilingual"); ?>
202
  <?php __("Regenerating original meta table for language %s...", "translatepress-multilingual"); ?>
203
  <?php __("Cleaning original meta table for language %s...", "translatepress-multilingual"); ?>
 
204
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
205
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
206
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
207
  <?php __("Run the updater", "translatepress-multilingual"); ?>
 
208
  <?php __("Update aborted! Your user account doesn't have the capability to perform database updates.", "translatepress-multilingual"); ?>
209
  <?php __("Update aborted! Invalid nonce.", "translatepress-multilingual"); ?>
210
  <?php __("Update aborted! Incorrect action.", "translatepress-multilingual"); ?>
@@ -214,7 +218,6 @@
214
  <?php __("Back to TranslatePress Settings", "translatepress-multilingual"); ?>
215
  <?php __("Successfully updated database!", "translatepress-multilingual"); ?>
216
  <?php __(" done.", "translatepress-multilingual"); ?>
217
- <?php __("Recreated original strings table.", "translatepress-multilingual"); ?>
218
  <?php __("All individual TranslatePress add-on plugins <a href=\"%1$s\" target=\"_blank\">have been discontinued</a> and are now included in the premium Personal, Business and Developer versions of TranslatePress. Please log into your <a href=\"%2$s\" target=\"_blank\">account page</a>, download the new premium version and install it. Your individual addons settings will be ported over.", "translatepress-multilingual"); ?>
219
  <?php __("TranslatePress", "translatepress-multilingual"); ?>
220
  <?php __("<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server.", "translatepress-multilingual"); ?>
@@ -338,6 +341,10 @@
338
  <?php __("<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>", "translatepress-multilingual"); ?>
339
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!! Are you sure you want to continue?", "translatepress-multilingual"); ?>
340
  <?php __("Operations to perform", "translatepress-multilingual"); ?>
 
 
 
 
341
  <?php __("Remove duplicate rows for gettext strings", "translatepress-multilingual"); ?>
342
  <?php __("Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings.", "translatepress-multilingual"); ?>
343
  <?php __("Remove duplicate rows for dictionary strings", "translatepress-multilingual"); ?>
192
  <?php __("OG Image", "translatepress-multilingual"); ?>
193
  <?php __("OG Image Secure URL", "translatepress-multilingual"); ?>
194
  <?php __("Twitter Image", "translatepress-multilingual"); ?>
195
+ <?php __("Removing cdata dictionary strings for language %s...", "translatepress-multilingual"); ?>
196
+ <?php __("Removing untranslated dictionary links for language %s...", "translatepress-multilingual"); ?>
197
  <?php __("Removing duplicated gettext strings for language %s...", "translatepress-multilingual"); ?>
198
  <?php __("Removing untranslated gettext strings where translation is available for language %s...", "translatepress-multilingual"); ?>
199
  <?php __("Removing duplicated dictionary strings for language %s...", "translatepress-multilingual"); ?>
203
  <?php __("Updating original string ids for language %s...", "translatepress-multilingual"); ?>
204
  <?php __("Regenerating original meta table for language %s...", "translatepress-multilingual"); ?>
205
  <?php __("Cleaning original meta table for language %s...", "translatepress-multilingual"); ?>
206
+ <?php __("Finishing up...", "translatepress-multilingual"); ?>
207
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
208
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
209
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
210
  <?php __("Run the updater", "translatepress-multilingual"); ?>
211
+ <?php __("Database optimization did not complete successfully. We recommend restoring the original database or <a href=\"%s\" >trying again.</a>", "translatepress-multilingual"); ?>
212
  <?php __("Update aborted! Your user account doesn't have the capability to perform database updates.", "translatepress-multilingual"); ?>
213
  <?php __("Update aborted! Invalid nonce.", "translatepress-multilingual"); ?>
214
  <?php __("Update aborted! Incorrect action.", "translatepress-multilingual"); ?>
218
  <?php __("Back to TranslatePress Settings", "translatepress-multilingual"); ?>
219
  <?php __("Successfully updated database!", "translatepress-multilingual"); ?>
220
  <?php __(" done.", "translatepress-multilingual"); ?>
 
221
  <?php __("All individual TranslatePress add-on plugins <a href=\"%1$s\" target=\"_blank\">have been discontinued</a> and are now included in the premium Personal, Business and Developer versions of TranslatePress. Please log into your <a href=\"%2$s\" target=\"_blank\">account page</a>, download the new premium version and install it. Your individual addons settings will be ported over.", "translatepress-multilingual"); ?>
222
  <?php __("TranslatePress", "translatepress-multilingual"); ?>
223
  <?php __("<strong>TranslatePress</strong> requires <strong><a href=\"http://php.net/manual/en/book.mbstring.php\">Multibyte String PHP library</a></strong>. Please contact your server administrator to install it on your server.", "translatepress-multilingual"); ?>
341
  <?php __("<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>", "translatepress-multilingual"); ?>
342
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!! Are you sure you want to continue?", "translatepress-multilingual"); ?>
343
  <?php __("Operations to perform", "translatepress-multilingual"); ?>
344
+ <?php __("Remove CDATA for original and dictionary strings", "translatepress-multilingual"); ?>
345
+ <?php __("Removes CDATA from trp_original_strings and trp_dictionary_* tables.<br>This type of content should not be detected by TranslatePress. It might have been introduced in the database in older versions of the plugin.", "translatepress-multilingual"); ?>
346
+ <?php __("Remove untranslated links from dictionary tables", "translatepress-multilingual"); ?>
347
+ <?php __("Removes untranslated links and images from all trp_dictionary_* tables. These tables contain translations for user-inputted strings such as post content, post title, menus etc.", "translatepress-multilingual"); ?>
348
  <?php __("Remove duplicate rows for gettext strings", "translatepress-multilingual"); ?>
349
  <?php __("Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings.", "translatepress-multilingual"); ?>
350
  <?php __("Remove duplicate rows for dictionary strings", "translatepress-multilingual"); ?>
languages/translatepress-multilingual.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2021 TranslatePress Multilingual
2
  # This file is distributed under the same license as the TranslatePress Multilingual package.
3
  msgid ""
4
  msgstr ""
@@ -185,7 +185,7 @@ msgstr ""
185
  msgid "Automatic translation has been disabled."
186
  msgstr ""
187
 
188
- #: includes/class-error-manager.php:146, includes/class-plugin-notices.php:341, includes/class-plugin-notices.php:392, includes/class-plugin-notices.php:373, includes/class-plugin-notices.php:406, includes/class-plugin-notices.php:431, includes/class-plugin-notices.php:455, includes/class-reviews.php:119, includes/class-reviews.php:122, includes/class-upgrade.php:736
189
  msgid "Dismiss this notice."
190
  msgstr ""
191
 
@@ -785,99 +785,111 @@ msgstr ""
785
  msgid "Twitter Image"
786
  msgstr ""
787
 
788
- #: includes/class-upgrade.php:125
 
 
 
 
 
 
 
 
789
  msgid "Removing duplicated gettext strings for language %s..."
790
  msgstr ""
791
 
792
- #: includes/class-upgrade.php:133
793
  msgid "Removing untranslated gettext strings where translation is available for language %s..."
794
  msgstr ""
795
 
796
- #: includes/class-upgrade.php:141
797
  msgid "Removing duplicated dictionary strings for language %s..."
798
  msgstr ""
799
 
800
- #: includes/class-upgrade.php:149
801
  msgid "Removing untranslated dictionary strings where translation is available for language %s..."
802
  msgstr ""
803
 
804
- #: includes/class-upgrade.php:156
805
  msgid "Inserting original strings for language %s..."
806
  msgstr ""
807
 
808
- #: includes/class-upgrade.php:165
809
  msgid "Cleaning original strings table for language %s..."
810
  msgstr ""
811
 
812
- #: includes/class-upgrade.php:173
813
  msgid "Updating original string ids for language %s..."
814
  msgstr ""
815
 
816
- #: includes/class-upgrade.php:181
817
  msgid "Regenerating original meta table for language %s..."
818
  msgstr ""
819
 
820
- #: includes/class-upgrade.php:189
821
  msgid "Cleaning original meta table for language %s..."
822
  msgstr ""
823
 
824
- #: includes/class-upgrade.php:223
 
 
 
 
825
  msgid "TranslatePress data update"
826
  msgstr ""
827
 
828
- #: includes/class-upgrade.php:223
829
  msgid "We need to update your translations database to the latest version."
830
  msgstr ""
831
 
832
- #: includes/class-upgrade.php:224
833
  msgid "IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?"
834
  msgstr ""
835
 
836
- #: includes/class-upgrade.php:224
837
  msgid "Run the updater"
838
  msgstr ""
839
 
840
- #: includes/class-upgrade.php:240
 
 
 
 
841
  msgid "Update aborted! Your user account doesn't have the capability to perform database updates."
842
  msgstr ""
843
 
844
- #: includes/class-upgrade.php:245
845
  msgid "Update aborted! Invalid nonce."
846
  msgstr ""
847
 
848
- #: includes/class-upgrade.php:286
849
  msgid "Update aborted! Incorrect action."
850
  msgstr ""
851
 
852
- #: includes/class-upgrade.php:289
853
  msgid "Update aborted! Incorrect language code."
854
  msgstr ""
855
 
856
- #: includes/class-upgrade.php:273
857
  msgid "Updating database to version %s+"
858
  msgstr ""
859
 
860
- #: includes/class-upgrade.php:277, includes/class-upgrade.php:339
861
  msgid "Processing table for language %s..."
862
  msgstr ""
863
 
864
- #: includes/class-upgrade.php:260, includes/class-upgrade.php:368
865
  msgid "Back to TranslatePress Settings"
866
  msgstr ""
867
 
868
- #: includes/class-upgrade.php:264
869
  msgid "Successfully updated database!"
870
  msgstr ""
871
 
872
- #: includes/class-upgrade.php:343, includes/class-upgrade.php:336
873
  msgid " done."
874
  msgstr ""
875
 
876
- #: includes/class-upgrade.php:648
877
- msgid "Recreated original strings table."
878
- msgstr ""
879
-
880
- #: includes/class-upgrade.php:734
881
  msgid "All individual TranslatePress add-on plugins <a href=\"%1$s\" target=\"_blank\">have been discontinued</a> and are now included in the premium Personal, Business and Developer versions of TranslatePress. Please log into your <a href=\"%2$s\" target=\"_blank\">account page</a>, download the new premium version and install it. Your individual addons settings will be ported over."
882
  msgstr ""
883
 
@@ -1375,31 +1387,47 @@ msgstr ""
1375
  msgid "Operations to perform"
1376
  msgstr ""
1377
 
1378
- #: partials/trp-remove-duplicate-rows.php:21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1379
  msgid "Remove duplicate rows for gettext strings"
1380
  msgstr ""
1381
 
1382
- #: partials/trp-remove-duplicate-rows.php:23
1383
  msgid "Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings."
1384
  msgstr ""
1385
 
1386
- #: partials/trp-remove-duplicate-rows.php:26
1387
  msgid "Remove duplicate rows for dictionary strings"
1388
  msgstr ""
1389
 
1390
- #: partials/trp-remove-duplicate-rows.php:28
1391
  msgid "Cleans up all trp_dictionary_* tables of duplicate rows. These tables contain translations for user-inputted strings such as post content, post title, menus etc."
1392
  msgstr ""
1393
 
1394
- #: partials/trp-remove-duplicate-rows.php:31
1395
  msgid "Remove duplicate rows for original dictionary strings"
1396
  msgstr ""
1397
 
1398
- #: partials/trp-remove-duplicate-rows.php:33
1399
  msgid "Cleans up all trp_original_strings table of duplicate rows. This table contains strings in the default language, without any translation.<br>The trp_original_meta table, which contains meta information that refers to the post parent’s id, is also regenerated.<br>Such duplicates can appear in exceptional situations of unexpected behavior."
1400
  msgstr ""
1401
 
1402
- #: partials/trp-remove-duplicate-rows.php:39
1403
  msgid "Optimize Database"
1404
  msgstr ""
1405
 
1
+ # Copyright (C) 2022 TranslatePress Multilingual
2
  # This file is distributed under the same license as the TranslatePress Multilingual package.
3
  msgid ""
4
  msgstr ""
185
  msgid "Automatic translation has been disabled."
186
  msgstr ""
187
 
188
+ #: includes/class-error-manager.php:146, includes/class-plugin-notices.php:341, includes/class-plugin-notices.php:392, includes/class-plugin-notices.php:373, includes/class-plugin-notices.php:406, includes/class-plugin-notices.php:431, includes/class-plugin-notices.php:455, includes/class-reviews.php:119, includes/class-reviews.php:122, includes/class-upgrade.php:816
189
  msgid "Dismiss this notice."
190
  msgstr ""
191
 
785
  msgid "Twitter Image"
786
  msgstr ""
787
 
788
+ #: includes/class-upgrade.php:114
789
+ msgid "Removing cdata dictionary strings for language %s..."
790
+ msgstr ""
791
+
792
+ #: includes/class-upgrade.php:122
793
+ msgid "Removing untranslated dictionary links for language %s..."
794
+ msgstr ""
795
+
796
+ #: includes/class-upgrade.php:142
797
  msgid "Removing duplicated gettext strings for language %s..."
798
  msgstr ""
799
 
800
+ #: includes/class-upgrade.php:150
801
  msgid "Removing untranslated gettext strings where translation is available for language %s..."
802
  msgstr ""
803
 
804
+ #: includes/class-upgrade.php:158
805
  msgid "Removing duplicated dictionary strings for language %s..."
806
  msgstr ""
807
 
808
+ #: includes/class-upgrade.php:166
809
  msgid "Removing untranslated dictionary strings where translation is available for language %s..."
810
  msgstr ""
811
 
812
+ #: includes/class-upgrade.php:173
813
  msgid "Inserting original strings for language %s..."
814
  msgstr ""
815
 
816
+ #: includes/class-upgrade.php:182
817
  msgid "Cleaning original strings table for language %s..."
818
  msgstr ""
819
 
820
+ #: includes/class-upgrade.php:190
821
  msgid "Updating original string ids for language %s..."
822
  msgstr ""
823
 
824
+ #: includes/class-upgrade.php:198
825
  msgid "Regenerating original meta table for language %s..."
826
  msgstr ""
827
 
828
+ #: includes/class-upgrade.php:206
829
  msgid "Cleaning original meta table for language %s..."
830
  msgstr ""
831
 
832
+ #: includes/class-upgrade.php:214
833
+ msgid "Finishing up..."
834
+ msgstr ""
835
+
836
+ #: includes/class-upgrade.php:249
837
  msgid "TranslatePress data update"
838
  msgstr ""
839
 
840
+ #: includes/class-upgrade.php:249
841
  msgid "We need to update your translations database to the latest version."
842
  msgstr ""
843
 
844
+ #: includes/class-upgrade.php:250
845
  msgid "IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?"
846
  msgstr ""
847
 
848
+ #: includes/class-upgrade.php:250
849
  msgid "Run the updater"
850
  msgstr ""
851
 
852
+ #: includes/class-upgrade.php:279
853
+ msgid "Database optimization did not complete successfully. We recommend restoring the original database or <a href=\"%s\" >trying again.</a>"
854
+ msgstr ""
855
+
856
+ #: includes/class-upgrade.php:297
857
  msgid "Update aborted! Your user account doesn't have the capability to perform database updates."
858
  msgstr ""
859
 
860
+ #: includes/class-upgrade.php:302
861
  msgid "Update aborted! Invalid nonce."
862
  msgstr ""
863
 
864
+ #: includes/class-upgrade.php:343
865
  msgid "Update aborted! Incorrect action."
866
  msgstr ""
867
 
868
+ #: includes/class-upgrade.php:346
869
  msgid "Update aborted! Incorrect language code."
870
  msgstr ""
871
 
872
+ #: includes/class-upgrade.php:330
873
  msgid "Updating database to version %s+"
874
  msgstr ""
875
 
876
+ #: includes/class-upgrade.php:334, includes/class-upgrade.php:397
877
  msgid "Processing table for language %s..."
878
  msgstr ""
879
 
880
+ #: includes/class-upgrade.php:317, includes/class-upgrade.php:427
881
  msgid "Back to TranslatePress Settings"
882
  msgstr ""
883
 
884
+ #: includes/class-upgrade.php:321
885
  msgid "Successfully updated database!"
886
  msgstr ""
887
 
888
+ #: includes/class-upgrade.php:402, includes/class-upgrade.php:394
889
  msgid " done."
890
  msgstr ""
891
 
892
+ #: includes/class-upgrade.php:814
 
 
 
 
893
  msgid "All individual TranslatePress add-on plugins <a href=\"%1$s\" target=\"_blank\">have been discontinued</a> and are now included in the premium Personal, Business and Developer versions of TranslatePress. Please log into your <a href=\"%2$s\" target=\"_blank\">account page</a>, download the new premium version and install it. Your individual addons settings will be ported over."
894
  msgstr ""
895
 
1387
  msgid "Operations to perform"
1388
  msgstr ""
1389
 
1390
+ #: partials/trp-remove-duplicate-rows.php:22
1391
+ msgid "Remove CDATA for original and dictionary strings"
1392
+ msgstr ""
1393
+
1394
+ #: partials/trp-remove-duplicate-rows.php:24
1395
+ msgid "Removes CDATA from trp_original_strings and trp_dictionary_* tables.<br>This type of content should not be detected by TranslatePress. It might have been introduced in the database in older versions of the plugin."
1396
+ msgstr ""
1397
+
1398
+ #: partials/trp-remove-duplicate-rows.php:27
1399
+ msgid "Remove untranslated links from dictionary tables"
1400
+ msgstr ""
1401
+
1402
+ #: partials/trp-remove-duplicate-rows.php:29
1403
+ msgid "Removes untranslated links and images from all trp_dictionary_* tables. These tables contain translations for user-inputted strings such as post content, post title, menus etc."
1404
+ msgstr ""
1405
+
1406
+ #: partials/trp-remove-duplicate-rows.php:32
1407
  msgid "Remove duplicate rows for gettext strings"
1408
  msgstr ""
1409
 
1410
+ #: partials/trp-remove-duplicate-rows.php:34
1411
  msgid "Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings."
1412
  msgstr ""
1413
 
1414
+ #: partials/trp-remove-duplicate-rows.php:37
1415
  msgid "Remove duplicate rows for dictionary strings"
1416
  msgstr ""
1417
 
1418
+ #: partials/trp-remove-duplicate-rows.php:39
1419
  msgid "Cleans up all trp_dictionary_* tables of duplicate rows. These tables contain translations for user-inputted strings such as post content, post title, menus etc."
1420
  msgstr ""
1421
 
1422
+ #: partials/trp-remove-duplicate-rows.php:42
1423
  msgid "Remove duplicate rows for original dictionary strings"
1424
  msgstr ""
1425
 
1426
+ #: partials/trp-remove-duplicate-rows.php:44
1427
  msgid "Cleans up all trp_original_strings table of duplicate rows. This table contains strings in the default language, without any translation.<br>The trp_original_meta table, which contains meta information that refers to the post parent’s id, is also regenerated.<br>Such duplicates can appear in exceptional situations of unexpected behavior."
1428
  msgstr ""
1429
 
1430
+ #: partials/trp-remove-duplicate-rows.php:50
1431
  msgid "Optimize Database"
1432
  msgstr ""
1433
 
partials/trp-remove-duplicate-rows.php CHANGED
@@ -18,6 +18,17 @@
18
  <input type="hidden" name="page" value="trp_remove_duplicate_rows">
19
  <input type="hidden" name="trp_rm_batch" value="1">
20
  <input type="hidden" name="trp_rm_duplicates" value="<?php echo esc_attr( $this->settings['translation-languages'][0] ); ?>">
 
 
 
 
 
 
 
 
 
 
 
21
  <input type="checkbox" name="trp_rm_duplicates_gettext" id="trp_rm_duplicates_gettext" checked><label for="trp_rm_duplicates_gettext"><?php esc_attr_e( 'Remove duplicate rows for gettext strings', 'translatepress-multilingual' ); ?></label></input><br>
22
  <p class="description">
23
  <?php echo wp_kses ( __( 'Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
18
  <input type="hidden" name="page" value="trp_remove_duplicate_rows">
19
  <input type="hidden" name="trp_rm_batch" value="1">
20
  <input type="hidden" name="trp_rm_duplicates" value="<?php echo esc_attr( $this->settings['translation-languages'][0] ); ?>">
21
+
22
+ <input type="checkbox" name="trp_rm_cdata_original_and_dictionary" id="trp_rm_cdata_original_and_dictionary" checked><label for="trp_rm_cdata_original_and_dictionary"><?php esc_attr_e( 'Remove CDATA for original and dictionary strings', 'translatepress-multilingual' ); ?></label></input><br>
23
+ <p class="description">
24
+ <?php echo wp_kses ( __( 'Removes CDATA from trp_original_strings and trp_dictionary_* tables.<br>This type of content should not be detected by TranslatePress. It might have been introduced in the database in older versions of the plugin.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
25
+ </p>
26
+ <br>
27
+ <input type="checkbox" name="trp_rm_untranslated_links" id="trp_rm_untranslated_links" checked><label for="trp_rm_untranslated_links"><?php esc_attr_e( 'Remove untranslated links from dictionary tables', 'translatepress-multilingual' ); ?></label></input><br>
28
+ <p class="description">
29
+ <?php echo wp_kses ( __( 'Removes untranslated links and images from all trp_dictionary_* tables. These tables contain translations for user-inputted strings such as post content, post title, menus etc.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
30
+ </p>
31
+ <br>
32
  <input type="checkbox" name="trp_rm_duplicates_gettext" id="trp_rm_duplicates_gettext" checked><label for="trp_rm_duplicates_gettext"><?php esc_attr_e( 'Remove duplicate rows for gettext strings', 'translatepress-multilingual' ); ?></label></input><br>
33
  <p class="description">
34
  <?php echo wp_kses ( __( 'Cleans up all trp_gettext_* tables of duplicate rows. These tables contain translations for themes and plugin strings.', 'translatepress-multilingual' ), array( 'br' => array() ) ); ?>
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, sareiodata, cristophor
3
  Donate link: https://www.translatepress.com/
4
  Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
  Requires at least: 3.1.0
6
- Tested up to: 5.8.2
7
  Requires PHP: 5.6.20
8
- Stable tag: 2.1.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,12 @@ For more information please check out our [documentation](https://translatepress
140
 
141
 
142
  == Changelog ==
 
 
 
 
 
 
143
  = 2.1.8 =
144
  * Added language formality setting to be used in Automatic Translation
145
  * Added Advanced option for enabling clickable shortcode language switcher
3
  Donate link: https://www.translatepress.com/
4
  Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
5
  Requires at least: 3.1.0
6
+ Tested up to: 5.8.3
7
  Requires PHP: 5.6.20
8
+ Stable tag: 2.1.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
 
142
  == Changelog ==
143
+ = 2.1.9 =
144
+ * Improved database optimization tool by adding option to remove CDATA and untranslated links from TP custom tables
145
+ * Fixed database optimization tool not starting in some cases
146
+ * Fixed edge case error unknown format specifier on php 8 related to automatic translation of gettext strings
147
+ * Added noindex tag to Translation Editor pages to prevent duplicate indexing
148
+
149
  = 2.1.8 =
150
  * Added language formality setting to be used in Automatic Translation
151
  * Added Advanced option for enabling clickable shortcode language switcher