TranslatePress – Translate Multilingual sites - Version 1.9.1

Version Description

  • Fixing issue with WooCommerce slugs resulting in 404 if they were changed manually from the defaults in certain cases
  • Added a new cleanup option in settings
  • Fixed some issues with extra characters appearing on translated languages in certain conditions
  • Always load Beaver Builder in default language.
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 TranslatePress – Translate Multilingual sites
Version 1.9.1
Comparing to
See all releases

Code changes from version 1.9.0 to 1.9.1

class-translate-press.php CHANGED
@@ -57,7 +57,7 @@ class TRP_Translate_Press{
57
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
58
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
59
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
60
- define( 'TRP_PLUGIN_VERSION', '1.9.0' );
61
 
62
  wp_cache_add_non_persistent_groups(array('trp'));
63
 
57
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
58
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
59
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
60
+ define( 'TRP_PLUGIN_VERSION', '1.9.1' );
61
 
62
  wp_cache_add_non_persistent_groups(array('trp'));
63
 
includes/class-query.php CHANGED
@@ -1350,4 +1350,52 @@ class TRP_Query{
1350
  $query = $this->db->prepare( $sql, $values );
1351
  return $this->db->query( $query );
1352
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1353
  }
1350
  $query = $this->db->prepare( $sql, $values );
1351
  return $this->db->query( $query );
1352
  }
1353
+
1354
+ public function rename_originals_table(){
1355
+ $new_table_name = sanitize_text_field( $this->get_table_name_for_original_strings() . time() );
1356
+ $this->db->query( "ALTER TABLE " . $this->get_table_name_for_original_strings() . " RENAME TO " . $new_table_name );
1357
+
1358
+ $table_to_use_for_recovery = get_option('trp_original_strings_table_for_recovery', '');
1359
+ if ( $table_to_use_for_recovery == '' ) {
1360
+ // if a previous run of removing original strings duplicates failed, use the old table, not the one created during that failed time
1361
+ update_option( 'trp_original_strings_table_for_recovery', $new_table_name );
1362
+ }
1363
+ }
1364
+
1365
+ public function regenerate_original_meta_table($inferior_limit, $batch_size){
1366
+
1367
+ if( !$this->error_manager ){
1368
+ $trp = TRP_Translate_Press::get_trp_instance();
1369
+ $this->error_manager = $trp->get_component( 'error_manager' );
1370
+ }
1371
+
1372
+ $originals_table = $this->get_table_name_for_original_strings();
1373
+ $recovery_originals_table = sanitize_text_field( get_option( 'trp_original_strings_table_for_recovery' ) );
1374
+ $originals_meta_table = $this->get_table_name_for_original_meta();
1375
+ if ( empty( $recovery_originals_table ) ){
1376
+ $this->error_manager->record_error(array('regenerate_original_meta_table' => 'Empty option trp_original_strings_table_for_recovery'));
1377
+ return;
1378
+ }
1379
+
1380
+ $this->db->query( $this->db->prepare("UPDATE `$originals_meta_table` trp_meta INNER JOIN `$recovery_originals_table` trp_old ON trp_meta.original_id = trp_old.id LEFT JOIN `$originals_table` trp_new ON trp_new.original = trp_old.original set trp_meta.original_id = IF(trp_new.id IS NULL, 0, trp_new.id) WHERE trp_meta.meta_id > %d AND trp_meta.meta_id <= %d AND trp_new.id != trp_old.id", $inferior_limit, ($inferior_limit + $batch_size) ) );
1381
+
1382
+ /* UPDATE `wp_trp_original_meta` trp_meta INNER JOIN `wp_trp_original_strings1608214654` as trp_old ON trp_meta.original_id = trp_old.id
1383
+ * LEFT JOIN `wp_trp_original_strings` as trp_new on trp_new.original = trp_old.original set trp_meta.original_id = IF(trp_new.id IS NULL, 0, trp_new.id)
1384
+ * WHERE trp_meta.meta_id > 10 AND trp_meta.meta_id <= 33 AND trp_new.id != trp_old.id*/
1385
+
1386
+ if (!empty($this->db->last_error)) {
1387
+ $this->error_manager->record_error(array('last_error_regenerate_original_meta_table' => $this->db->last_error));
1388
+ }
1389
+ }
1390
+
1391
+ public function clean_original_meta( $limit ){
1392
+ $limit = (int) $limit;
1393
+ $sql = "DELETE FROM `" . sanitize_text_field( $this->get_table_name_for_original_meta() ). "` WHERE original_id = 0 LIMIT " . $limit;
1394
+ return $this->db->query( $sql );
1395
+ }
1396
+
1397
+ public function drop_table($table_name){
1398
+ $sql = "DROP TABLE `" . sanitize_text_field( $table_name ). "`";
1399
+ return $this->db->query( $sql );
1400
+ }
1401
  }
includes/class-translation-manager.php CHANGED
@@ -877,8 +877,8 @@ class TRP_Translation_Manager
877
  }
878
  }
879
  unset($callstack_functions);//maybe free up some memory
880
-
881
- if (did_action('init')) {
882
  if ((!empty($TRP_LANGUAGE) && $this->settings["default-language"] != $TRP_LANGUAGE) || (isset($_REQUEST['trp-edit-translation']) && $_REQUEST['trp-edit-translation'] == 'preview')) {
883
  //add special start and end tags so that it does not influence html in any way. we will replace them with < and > at the start of the translate function
884
  $translation = apply_filters('trp_process_gettext_tags', '#!trpst#trp-gettext data-trpgettextoriginal=' . $db_id . '#!trpen#' . $translation . '#!trpst#/trp-gettext#!trpen#', $translation, $skip_gettext_querying, $text, $domain);
877
  }
878
  }
879
  unset($callstack_functions);//maybe free up some memory
880
+ global $trp_output_buffer_started;
881
+ if (did_action('init') && isset($trp_output_buffer_started) && $trp_output_buffer_started) {//check here for our global $trp_output_buffer_started, don't wrap the gettexts if they are not processed by our cleanup callbacks for the buffers
882
  if ((!empty($TRP_LANGUAGE) && $this->settings["default-language"] != $TRP_LANGUAGE) || (isset($_REQUEST['trp-edit-translation']) && $_REQUEST['trp-edit-translation'] == 'preview')) {
883
  //add special start and end tags so that it does not influence html in any way. we will replace them with < and > at the start of the translate function
884
  $translation = apply_filters('trp_process_gettext_tags', '#!trpst#trp-gettext data-trpgettextoriginal=' . $db_id . '#!trpen#' . $translation . '#!trpst#/trp-gettext#!trpen#', $translation, $skip_gettext_querying, $text, $domain);
includes/class-translation-render.php CHANGED
@@ -37,13 +37,16 @@ class TRP_Translation_Render{
37
  return;//we have two cases where we don't do anything: we are on the admin side and we are not in an ajax call or we are in the left side of the translation editor
38
  }
39
  else {
 
40
  mb_http_output("UTF-8");
41
  if ( $TRP_LANGUAGE == $this->settings['default-language'] && !trp_is_translation_editor() ) {
42
  // on default language when we are not in editor we just need to clear any trp tags that could still be present and handle links for special situation
43
  $chunk_size = ($this->handle_custom_links_for_default_language() ) ? null : 4096;
44
  ob_start(array( $this, 'render_default_language' ), $chunk_size);
 
45
  } else {
46
  ob_start(array($this, 'translate_page'));//everywhere else translate the page
 
47
  }
48
  }
49
  }
37
  return;//we have two cases where we don't do anything: we are on the admin side and we are not in an ajax call or we are in the left side of the translation editor
38
  }
39
  else {
40
+ global $trp_output_buffer_started;//use this global so we know that we started the output buffer. we can check it for instance when wrapping gettext
41
  mb_http_output("UTF-8");
42
  if ( $TRP_LANGUAGE == $this->settings['default-language'] && !trp_is_translation_editor() ) {
43
  // on default language when we are not in editor we just need to clear any trp tags that could still be present and handle links for special situation
44
  $chunk_size = ($this->handle_custom_links_for_default_language() ) ? null : 4096;
45
  ob_start(array( $this, 'render_default_language' ), $chunk_size);
46
+ $trp_output_buffer_started = true;
47
  } else {
48
  ob_start(array($this, 'translate_page'));//everywhere else translate the page
49
+ $trp_output_buffer_started = true;
50
  }
51
  }
52
  }
includes/class-upgrade.php CHANGED
@@ -130,6 +130,22 @@ class TRP_Upgrade {
130
  'batch_size' => 5000,
131
  'message_initial' => '',
132
  'message_processing'=> __('Updating original string ids for language %s...', 'translatepress-multilingual' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  )
134
  )
135
  );
@@ -448,6 +464,11 @@ class TRP_Upgrade {
448
  // prepare page structure
449
  require_once TRP_PLUGIN_DIR . 'partials/trp-remove-duplicate-rows.php';
450
 
 
 
 
 
 
451
  if ( empty( $_GET['trp_rm_duplicates'] ) ){
452
  // iteration not started
453
  return;
@@ -630,4 +651,75 @@ class TRP_Upgrade {
630
  update_option('trp_machine_translation_settings', $machine_translation_settings);
631
  }
632
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  }
130
  'batch_size' => 5000,
131
  'message_initial' => '',
132
  'message_processing'=> __('Updating original string ids for language %s...', 'translatepress-multilingual' )
133
+ ),
134
+ 'regenerate_original_meta' => array(
135
+ 'version' => '0', // independent of tp version, available only on demand
136
+ 'option_name' => 'trp_regenerate_original_meta_table',
137
+ 'callback' => array( $this,'trp_regenerate_original_meta_table'),
138
+ 'batch_size' => 200,
139
+ 'message_initial' => '',
140
+ 'message_processing'=> __('Regenerating original meta table for language %s...', 'translatepress-multilingual' )
141
+ ),
142
+ 'clean_original_meta' => array(
143
+ 'version' => '0', // independent of tp version, available only on demand
144
+ 'option_name' => 'trp_clean_original_meta_table',
145
+ 'callback' => array( $this,'trp_clean_original_meta_table'),
146
+ 'batch_size' => 20000,
147
+ 'message_initial' => '',
148
+ 'message_processing'=> __('Cleaning original meta table for language %s...', 'translatepress-multilingual' )
149
  )
150
  )
151
  );
464
  // prepare page structure
465
  require_once TRP_PLUGIN_DIR . 'partials/trp-remove-duplicate-rows.php';
466
 
467
+ if ( isset( $_GET['trp_rm_duplicates_original_strings'] ) ){
468
+ $this->trp_remove_duplicate_original_strings();
469
+ exit;
470
+ }
471
+
472
  if ( empty( $_GET['trp_rm_duplicates'] ) ){
473
  // iteration not started
474
  return;
651
  update_option('trp_machine_translation_settings', $machine_translation_settings);
652
  }
653
  }
654
+
655
+
656
+ public function trp_remove_duplicate_original_strings(){
657
+ if ( ! $this->trp_query ) {
658
+ $trp = TRP_Translate_Press::get_trp_instance();
659
+ /* @var TRP_Query */
660
+ $this->trp_query = $trp->get_component( 'query' );
661
+ }
662
+ $this->trp_query->rename_originals_table();
663
+ $this->trp_query->check_original_table();
664
+
665
+ echo '<br> ' . esc_html__( 'Recreated original strings table.', 'translatepress-multilingual' );
666
+
667
+ update_option( 'trp_updated_database_original_id_insert_166', 'no' );
668
+ update_option( 'trp_updated_database_original_id_cleanup_166', 'no' );
669
+ update_option( 'trp_updated_database_original_id_update_166', 'no' );
670
+
671
+ update_option( 'trp_regenerate_original_meta_table', 'no' );
672
+ update_option( 'trp_clean_original_meta_table', 'no' );
673
+
674
+ $url = add_query_arg( array('page'=>'trp_update_database'), site_url('wp-admin/admin.php') );
675
+ echo '<meta http-equiv="refresh" content="0; url=' . esc_url( $url ) . '" />';
676
+ echo '<br> ' . esc_html__( 'If the page does not redirect automatically', 'translatepress-multilingual' ) . ' <a href="' . esc_url( $url ) . '" >' . esc_html__( 'click here', 'translatepress-multilingual' ) . '.</a>';
677
+ exit;
678
+ }
679
+
680
+ public function trp_regenerate_original_meta_table($language_code, $inferior_limit, $batch_size ){
681
+
682
+ if ( $language_code != $this->settings['default-language']) {
683
+ // perform regeneration of original meta table only once
684
+ return true;
685
+ }
686
+ if ( ! $this->trp_query ) {
687
+ $trp = TRP_Translate_Press::get_trp_instance();
688
+ /* @var TRP_Query */
689
+ $this->trp_query = $trp->get_component( 'query' );
690
+ }
691
+ $this->trp_query->regenerate_original_meta_table($inferior_limit, $batch_size);
692
+
693
+ $last_id = $this->db->get_var("SELECT MAX(meta_id) FROM " . $this->trp_query->get_table_name_for_original_meta() );
694
+ if ( $last_id < $inferior_limit ){
695
+ // reached end of table
696
+ return true;
697
+ }else{
698
+ // not done. get another batch
699
+ return false;
700
+ }
701
+ }
702
+
703
+ public function trp_clean_original_meta_table($language_code, $inferior_limit, $batch_size){
704
+ if ( $language_code != $this->settings['default-language']) {
705
+ // perform regeneration of original meta table only once
706
+ return true;
707
+ }
708
+ if ( ! $this->trp_query ) {
709
+ $trp = TRP_Translate_Press::get_trp_instance();
710
+ /* @var TRP_Query */
711
+ $this->trp_query = $trp->get_component( 'query' );
712
+ }
713
+ $rows_affected = $this->trp_query->clean_original_meta( $batch_size );
714
+ if ( $rows_affected > 0 ){
715
+ return false;
716
+ }else{
717
+ $old_originals_table = get_option( 'trp_original_strings_table_for_recovery', '' );
718
+ if ( !empty ( $old_originals_table) && strpos($old_originals_table, 'trp_original_strings1') !== false ) {
719
+ delete_option('trp_original_strings_table_for_recovery');
720
+ $this->trp_query->drop_table( $old_originals_table );
721
+ }
722
+ return true;
723
+ }
724
+ }
725
  }
includes/class-url-converter.php CHANGED
@@ -397,7 +397,7 @@ class TRP_Url_Converter {
397
  if( $current_slug === false ){
398
  $current_slug = trp_x( $english_woocommerce_slug, 'slug', 'woocommerce', $this->settings['default-language'] );
399
 
400
- //check that it is the same as the one saved in the database
401
  $wc_options = get_option('woocommerce_permalinks');
402
  switch($english_woocommerce_slug){
403
  case 'product-category':
@@ -412,7 +412,7 @@ class TRP_Url_Converter {
412
  default:
413
  $option_index = '';
414
  }
415
- if( !empty( $wc_options ) && !empty( $wc_options[$option_index] ) && $current_slug != $wc_options[$option_index] )
416
  $current_slug = $wc_options[$option_index];
417
 
418
  set_transient( 'tp_'.$english_woocommerce_slug.'_'. $this->settings['default-language'], $current_slug, 12 * HOUR_IN_SECONDS );
397
  if( $current_slug === false ){
398
  $current_slug = trp_x( $english_woocommerce_slug, 'slug', 'woocommerce', $this->settings['default-language'] );
399
 
400
+ //check that it is the same as the one saved in the database or it was manually set to the default in english
401
  $wc_options = get_option('woocommerce_permalinks');
402
  switch($english_woocommerce_slug){
403
  case 'product-category':
412
  default:
413
  $option_index = '';
414
  }
415
+ if( !empty( $wc_options ) && !empty( $wc_options[$option_index] ) && $current_slug != $wc_options[$option_index] && in_array( $wc_options[$option_index], $english_woocommerce_slugs ) )
416
  $current_slug = $wc_options[$option_index];
417
 
418
  set_transient( 'tp_'.$english_woocommerce_slug.'_'. $this->settings['default-language'], $current_slug, 12 * HOUR_IN_SECONDS );
includes/compatibility-functions.php CHANGED
@@ -825,14 +825,28 @@ if( function_exists('ct_is_show_builder') ) {
825
  }
826
 
827
  /**
828
- * Used to redirect Oxygen Builder front-end to the default language.
829
- * Hooked before TRP_Language_Switcher::redirect_to_correct_language() so we don't redirect twice
830
  */
831
- add_action( 'template_redirect', 'trp_oxygen_redirect_to_default_language', 10 );
832
- function trp_oxygen_redirect_to_default_language(){
833
 
834
- if( is_admin() || !isset( $_GET['ct_builder'] ) || $_GET['ct_builder'] != 'true' )
835
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
836
 
837
  $trp = TRP_Translate_Press::get_trp_instance();
838
  $url_converter = $trp->get_component('url_converter');
@@ -850,23 +864,8 @@ if( function_exists('ct_is_show_builder') ) {
850
 
851
  }
852
 
853
- /**
854
- * Hide Floating Language Switcher when the Oxygen builder is being shown
855
- * @var [type]
856
- */
857
- add_filter( 'trp_floating_ls_html', 'trp_oxygen_disable_language_switcher' );
858
- function trp_oxygen_disable_language_switcher( $html ){
859
-
860
- if( isset( $_GET['ct_builder'] ) && $_GET['ct_builder'] == 'true' )
861
- return '';
862
-
863
- return $html;
864
-
865
- }
866
  }
867
 
868
-
869
-
870
  /**
871
  * Compatibility with Brizy editor
872
  */
825
  }
826
 
827
  /**
828
+ * Hide Floating Language Switcher when the Oxygen is shown
 
829
  */
830
+ add_filter( 'trp_floating_ls_html', 'trp_page_builder_compatibility_disable_language_switcher' );
831
+ function trp_page_builder_compatibility_disable_language_switcher( $html ){
832
 
833
+ if( isset( $_GET['ct_builder'] ) && $_GET['ct_builder'] == 'true' )
834
+ return '';
835
+
836
+ return $html;
837
+
838
+ }
839
+
840
+ }
841
+
842
+ /**
843
+ * Used to redirect Oxygen Builder front-end to the default language.
844
+ * Hooked before TRP_Language_Switcher::redirect_to_correct_language() so we don't redirect twice
845
+ */
846
+ add_action( 'template_redirect', 'trp_page_builder_compatibility_redirect_to_default_language', 10 );
847
+ function trp_page_builder_compatibility_redirect_to_default_language(){
848
+
849
+ if( !is_admin() && ( ( isset( $_GET['ct_builder'] ) && $_GET['ct_builder'] == 'true' ) || isset( $_GET['fl_builder'] ) ) ){
850
 
851
  $trp = TRP_Translate_Press::get_trp_instance();
852
  $url_converter = $trp->get_component('url_converter');
864
 
865
  }
866
 
 
 
 
 
 
 
 
 
 
 
 
 
 
867
  }
868
 
 
 
869
  /**
870
  * Compatibility with Brizy editor
871
  */
index.php CHANGED
@@ -3,7 +3,7 @@
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: 1.9.0
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
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: 1.9.1
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
languages/translatepress-multilingual.catalog.php CHANGED
@@ -180,6 +180,8 @@
180
  <?php __("Inserting original strings for language %s...", "translatepress-multilingual"); ?>
181
  <?php __("Cleaning original strings table for language %s...", "translatepress-multilingual"); ?>
182
  <?php __("Updating original string ids for language %s...", "translatepress-multilingual"); ?>
 
 
183
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
184
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
185
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
@@ -199,6 +201,7 @@
199
  <?php __("%s duplicates removed", "translatepress-multilingual"); ?>
200
  <?php __("If the page does not redirect automatically", "translatepress-multilingual"); ?>
201
  <?php __("click here", "translatepress-multilingual"); ?>
 
202
  <?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"); ?>
203
  <?php __("Advanced Addons", "translatepress-multilingual"); ?>
204
  <?php __("These addons extend your translation plugin and are available in the Developer, Business and Personal plans.", "translatepress-multilingual"); ?>
@@ -281,6 +284,7 @@
281
  <?php __("The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size.", "translatepress-multilingual"); ?>
282
  <?php __("Remove duplicate dictionary rows", "translatepress-multilingual"); ?>
283
  <?php __("Remove duplicate gettext rows", "translatepress-multilingual"); ?>
 
284
  <?php __("TranslatePress Database Updater", "translatepress-multilingual"); ?>
285
  <?php __("Updating TranslatePress tables", "translatepress-multilingual"); ?>
286
  <?php __("URL Slugs Translation", "translatepress-multilingual"); ?>
180
  <?php __("Inserting original strings for language %s...", "translatepress-multilingual"); ?>
181
  <?php __("Cleaning original strings table for language %s...", "translatepress-multilingual"); ?>
182
  <?php __("Updating original string ids for language %s...", "translatepress-multilingual"); ?>
183
+ <?php __("Regenerating original meta table for language %s...", "translatepress-multilingual"); ?>
184
+ <?php __("Cleaning original meta table for language %s...", "translatepress-multilingual"); ?>
185
  <?php __("TranslatePress data update", "translatepress-multilingual"); ?>
186
  <?php __("We need to update your translations database to the latest version.", "translatepress-multilingual"); ?>
187
  <?php __("IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?", "translatepress-multilingual"); ?>
201
  <?php __("%s duplicates removed", "translatepress-multilingual"); ?>
202
  <?php __("If the page does not redirect automatically", "translatepress-multilingual"); ?>
203
  <?php __("click here", "translatepress-multilingual"); ?>
204
+ <?php __("Recreated original strings table.", "translatepress-multilingual"); ?>
205
  <?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"); ?>
206
  <?php __("Advanced Addons", "translatepress-multilingual"); ?>
207
  <?php __("These addons extend your translation plugin and are available in the Developer, Business and Personal plans.", "translatepress-multilingual"); ?>
284
  <?php __("The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error \"Page took too long to respond\" on large databases.<br>May take several minutes depending on the database size.", "translatepress-multilingual"); ?>
285
  <?php __("Remove duplicate dictionary rows", "translatepress-multilingual"); ?>
286
  <?php __("Remove duplicate gettext rows", "translatepress-multilingual"); ?>
287
+ <?php __("Remove duplicate original strings", "translatepress-multilingual"); ?>
288
  <?php __("TranslatePress Database Updater", "translatepress-multilingual"); ?>
289
  <?php __("Updating TranslatePress tables", "translatepress-multilingual"); ?>
290
  <?php __("URL Slugs Translation", "translatepress-multilingual"); ?>
languages/translatepress-multilingual.pot CHANGED
@@ -689,39 +689,39 @@ msgstr ""
689
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
690
  msgstr ""
691
 
692
- #: includes/class-translation-render.php:147
693
  msgid "Description"
694
  msgstr ""
695
 
696
- #: includes/class-translation-render.php:153
697
  msgid "OG Title"
698
  msgstr ""
699
 
700
- #: includes/class-translation-render.php:159
701
  msgid "OG Site Name"
702
  msgstr ""
703
 
704
- #: includes/class-translation-render.php:165
705
  msgid "OG Description"
706
  msgstr ""
707
 
708
- #: includes/class-translation-render.php:171
709
  msgid "Twitter Title"
710
  msgstr ""
711
 
712
- #: includes/class-translation-render.php:177
713
  msgid "Twitter Description"
714
  msgstr ""
715
 
716
- #: includes/class-translation-render.php:181
717
  msgid "Page Title"
718
  msgstr ""
719
 
720
- #: includes/class-translation-render.php:187
721
  msgid "Dublin Core Title"
722
  msgstr ""
723
 
724
- #: includes/class-translation-render.php:193
725
  msgid "Dublin Core Description"
726
  msgstr ""
727
 
@@ -737,82 +737,94 @@ msgstr ""
737
  msgid "Updating original string ids for language %s..."
738
  msgstr ""
739
 
740
- #: includes/class-upgrade.php:166
 
 
 
 
 
 
 
 
741
  msgid "TranslatePress data update"
742
  msgstr ""
743
 
744
- #: includes/class-upgrade.php:166
745
  msgid "We need to update your translations database to the latest version."
746
  msgstr ""
747
 
748
- #: includes/class-upgrade.php:167
749
  msgid "IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?"
750
  msgstr ""
751
 
752
- #: includes/class-upgrade.php:167
753
  msgid "Run the updater"
754
  msgstr ""
755
 
756
- #: includes/class-upgrade.php:183
757
  msgid "Update aborted! Your user account doesn't have the capability to perform database updates."
758
  msgstr ""
759
 
760
- #: includes/class-upgrade.php:188
761
  msgid "Update aborted! Invalid nonce."
762
  msgstr ""
763
 
764
- #: includes/class-upgrade.php:227
765
  msgid "Update aborted! Incorrect action."
766
  msgstr ""
767
 
768
- #: includes/class-upgrade.php:230
769
  msgid "Update aborted! Incorrect language code."
770
  msgstr ""
771
 
772
- #: includes/class-upgrade.php:216
773
  msgid "Updating database to version %s+"
774
  msgstr ""
775
 
776
- #: includes/class-upgrade.php:220, includes/class-upgrade.php:280
777
  msgid "Processing table for language %s..."
778
  msgstr ""
779
 
780
- #: includes/class-upgrade.php:203, includes/class-upgrade.php:309, includes/class-upgrade.php:457, includes/class-upgrade.php:462
781
  msgid "Back to TranslatePress Settings"
782
  msgstr ""
783
 
784
- #: includes/class-upgrade.php:207
785
  msgid "Successfully updated database!"
786
  msgstr ""
787
 
788
- #: includes/class-upgrade.php:284, includes/class-upgrade.php:277
789
  msgid " done."
790
  msgstr ""
791
 
792
- #: includes/class-upgrade.php:457
793
  msgid "Done."
794
  msgstr ""
795
 
796
- #: includes/class-upgrade.php:462
797
  msgid "Invalid nonce."
798
  msgstr ""
799
 
800
- #: includes/class-upgrade.php:486
801
  msgid "Querying table <strong>%s</strong>"
802
  msgstr ""
803
 
804
- #: includes/class-upgrade.php:528
805
  msgid "%s duplicates removed"
806
  msgstr ""
807
 
808
- #: includes/class-upgrade.php:566
809
  msgid "If the page does not redirect automatically"
810
  msgstr ""
811
 
812
- #: includes/class-upgrade.php:566
813
  msgid "click here"
814
  msgstr ""
815
 
 
 
 
 
816
  #: includes/compatibility-functions.php:28
817
  msgid "<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."
818
  msgstr ""
@@ -1141,6 +1153,10 @@ msgstr ""
1141
  msgid "Remove duplicate gettext rows"
1142
  msgstr ""
1143
 
 
 
 
 
1144
  #: partials/trp-update-database.php:3
1145
  msgid "TranslatePress Database Updater"
1146
  msgstr ""
689
  msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
690
  msgstr ""
691
 
692
+ #: includes/class-translation-render.php:150
693
  msgid "Description"
694
  msgstr ""
695
 
696
+ #: includes/class-translation-render.php:156
697
  msgid "OG Title"
698
  msgstr ""
699
 
700
+ #: includes/class-translation-render.php:162
701
  msgid "OG Site Name"
702
  msgstr ""
703
 
704
+ #: includes/class-translation-render.php:168
705
  msgid "OG Description"
706
  msgstr ""
707
 
708
+ #: includes/class-translation-render.php:174
709
  msgid "Twitter Title"
710
  msgstr ""
711
 
712
+ #: includes/class-translation-render.php:180
713
  msgid "Twitter Description"
714
  msgstr ""
715
 
716
+ #: includes/class-translation-render.php:184
717
  msgid "Page Title"
718
  msgstr ""
719
 
720
+ #: includes/class-translation-render.php:190
721
  msgid "Dublin Core Title"
722
  msgstr ""
723
 
724
+ #: includes/class-translation-render.php:196
725
  msgid "Dublin Core Description"
726
  msgstr ""
727
 
737
  msgid "Updating original string ids for language %s..."
738
  msgstr ""
739
 
740
+ #: includes/class-upgrade.php:140
741
+ msgid "Regenerating original meta table for language %s..."
742
+ msgstr ""
743
+
744
+ #: includes/class-upgrade.php:148
745
+ msgid "Cleaning original meta table for language %s..."
746
+ msgstr ""
747
+
748
+ #: includes/class-upgrade.php:182
749
  msgid "TranslatePress data update"
750
  msgstr ""
751
 
752
+ #: includes/class-upgrade.php:182
753
  msgid "We need to update your translations database to the latest version."
754
  msgstr ""
755
 
756
+ #: includes/class-upgrade.php:183
757
  msgid "IMPORTANT: It is strongly recommended to first backup the database!\nAre you sure you want to continue?"
758
  msgstr ""
759
 
760
+ #: includes/class-upgrade.php:183
761
  msgid "Run the updater"
762
  msgstr ""
763
 
764
+ #: includes/class-upgrade.php:199
765
  msgid "Update aborted! Your user account doesn't have the capability to perform database updates."
766
  msgstr ""
767
 
768
+ #: includes/class-upgrade.php:204
769
  msgid "Update aborted! Invalid nonce."
770
  msgstr ""
771
 
772
+ #: includes/class-upgrade.php:243
773
  msgid "Update aborted! Incorrect action."
774
  msgstr ""
775
 
776
+ #: includes/class-upgrade.php:246
777
  msgid "Update aborted! Incorrect language code."
778
  msgstr ""
779
 
780
+ #: includes/class-upgrade.php:232
781
  msgid "Updating database to version %s+"
782
  msgstr ""
783
 
784
+ #: includes/class-upgrade.php:236, includes/class-upgrade.php:296
785
  msgid "Processing table for language %s..."
786
  msgstr ""
787
 
788
+ #: includes/class-upgrade.php:219, includes/class-upgrade.php:325, includes/class-upgrade.php:478, includes/class-upgrade.php:483
789
  msgid "Back to TranslatePress Settings"
790
  msgstr ""
791
 
792
+ #: includes/class-upgrade.php:223
793
  msgid "Successfully updated database!"
794
  msgstr ""
795
 
796
+ #: includes/class-upgrade.php:300, includes/class-upgrade.php:293
797
  msgid " done."
798
  msgstr ""
799
 
800
+ #: includes/class-upgrade.php:478
801
  msgid "Done."
802
  msgstr ""
803
 
804
+ #: includes/class-upgrade.php:483
805
  msgid "Invalid nonce."
806
  msgstr ""
807
 
808
+ #: includes/class-upgrade.php:507
809
  msgid "Querying table <strong>%s</strong>"
810
  msgstr ""
811
 
812
+ #: includes/class-upgrade.php:549
813
  msgid "%s duplicates removed"
814
  msgstr ""
815
 
816
+ #: includes/class-upgrade.php:587, includes/class-upgrade.php:676
817
  msgid "If the page does not redirect automatically"
818
  msgstr ""
819
 
820
+ #: includes/class-upgrade.php:587, includes/class-upgrade.php:676
821
  msgid "click here"
822
  msgstr ""
823
 
824
+ #: includes/class-upgrade.php:665
825
+ msgid "Recreated original strings table."
826
+ msgstr ""
827
+
828
  #: includes/compatibility-functions.php:28
829
  msgid "<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."
830
  msgstr ""
1153
  msgid "Remove duplicate gettext rows"
1154
  msgstr ""
1155
 
1156
+ #: partials/trp-remove-duplicate-rows.php:30
1157
+ msgid "Remove duplicate original strings"
1158
+ msgstr ""
1159
+
1160
  #: partials/trp-update-database.php:3
1161
  msgid "TranslatePress Database Updater"
1162
  msgstr ""
partials/trp-remove-duplicate-rows.php CHANGED
@@ -27,6 +27,7 @@
27
  <input type="hidden" name="trp_rm_duplicates" value="<?php echo esc_attr( $this->settings['translation-languages'][0] ); ?>">
28
  <input type="submit" class="button-primary" name="trp_rm_duplicates_dictionary" value="<?php esc_attr_e( 'Remove duplicate dictionary rows', 'translatepress-multilingual' ); ?>">
29
  <input type="submit" class="button-primary" name="trp_rm_duplicates_gettext" value="<?php esc_attr_e( 'Remove duplicate gettext rows', 'translatepress-multilingual' ); ?>">
 
30
  </form>
31
  <?php } ?>
32
 
27
  <input type="hidden" name="trp_rm_duplicates" value="<?php echo esc_attr( $this->settings['translation-languages'][0] ); ?>">
28
  <input type="submit" class="button-primary" name="trp_rm_duplicates_dictionary" value="<?php esc_attr_e( 'Remove duplicate dictionary rows', 'translatepress-multilingual' ); ?>">
29
  <input type="submit" class="button-primary" name="trp_rm_duplicates_gettext" value="<?php esc_attr_e( 'Remove duplicate gettext rows', 'translatepress-multilingual' ); ?>">
30
+ <input type="submit" class="button-primary" name="trp_rm_duplicates_original_strings" value="<?php esc_attr_e( 'Remove duplicate original strings', 'translatepress-multilingual' ); ?>">
31
  </form>
32
  <?php } ?>
33
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: translate, translation, multilingual, automatic translation, bilingual, fr
5
  Requires at least: 3.1.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.6.20
8
- Stable tag: 1.9.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -138,6 +138,12 @@ For more information please check out our [documentation](https://translatepress
138
 
139
 
140
  == Changelog ==
 
 
 
 
 
 
141
  = 1.9.0 =
142
  * Fixed some cases of multiple requests for finding out supported languages for automatic translation
143
 
5
  Requires at least: 3.1.0
6
  Tested up to: 5.6
7
  Requires PHP: 5.6.20
8
+ Stable tag: 1.9.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
138
 
139
 
140
  == Changelog ==
141
+ = 1.9.1 =
142
+ * Fixing issue with WooCommerce slugs resulting in 404 if they were changed manually from the defaults in certain cases
143
+ * Added a new cleanup option in settings
144
+ * Fixed some issues with extra characters appearing on translated languages in certain conditions
145
+ * Always load Beaver Builder in default language.
146
+
147
  = 1.9.0 =
148
  * Fixed some cases of multiple requests for finding out supported languages for automatic translation
149