TranslatePress – Translate Multilingual sites - Version 1.4.3

Version Description

  • Fixed an issue with the Language by Get Parameter add-on
  • Added compatibility with WooCommerce PDF invoice and WooCommerce's order notes.
  • Added stop_translating_page and before_running_hooks hooks.
  • Refactored hooks-loader to easily remove hook
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

assets/js/trp-translate-dom-changes.js CHANGED
@@ -105,7 +105,9 @@ function TRP_Translator(){
105
  }
106
 
107
  if ( ! translation_found ){
 
108
  queried_string.node.textContent = initial_value;
 
109
  }
110
  }
111
  // this should always be outside the for loop
@@ -139,17 +141,7 @@ function TRP_Translator(){
139
  jQuery(mutation.addedNodes[i]).find('a').context.href = _this.update_query_string('trp-edit-translation', 'preview', jQuery(mutation.addedNodes[i]).find('a').context.href);
140
  }
141
 
142
- // skip nodes containing these attributes
143
- var attr_array = ['data-no-translation', 'data-no-dynamic-translation', 'data-trpgettextoriginal', 'data-trp-translate-id'];
144
- var skip_string = false;
145
- for (var at = 0; at < attr_array.length ; at++ ){
146
- var current_attribute = node.attr( attr_array[ at ] );
147
- if ( (typeof current_attribute !== typeof undefined && current_attribute !== false) || node.parents( '[' + attr_array[ at ] + ']').length > 0 ){
148
- skip_string = true;
149
- break;
150
- }
151
- }
152
- if ( skip_string ){
153
  continue;
154
  }
155
 
@@ -170,7 +162,7 @@ function TRP_Translator(){
170
  var all_nodes = jQuery( mutation.addedNodes[i]).find( '*').addBack();
171
  var all_strings = all_nodes.contents().filter(function(){
172
  if( this.nodeType === 3 && /\S/.test(this.nodeValue) ){
173
- if ( jQuery(this).closest( '[data-trpgettextoriginal]').length == 0 && jQuery(this).closest( '[data-trp-translate-id]').length == 0 && jQuery(this).parents( '[data-no-translation]' ).length == 0 ){
174
  return this;
175
  }
176
  }});
@@ -196,9 +188,20 @@ function TRP_Translator(){
196
  }
197
  };
198
 
 
 
 
 
 
 
 
 
 
 
 
199
  function get_string_from_node( node ){
200
  if( node.nodeType === 3 && /\S/.test(node.nodeValue) ){
201
- if ( jQuery(node).closest( '[data-trpgettextoriginal]').length == 0 && jQuery(node).closest( '[data-trp-translate-id]').length == 0 && jQuery(this).parents( '[data-no-translation]' ).length == 0 ){
202
  return node;
203
  }
204
  }
@@ -269,7 +272,7 @@ function TRP_Translator(){
269
  observer.observe( document.body , config );
270
 
271
  jQuery( document ).ajaxComplete(function( event, request, settings ) {
272
- if( window.parent.jQuery('#trp-preview-iframe').length != 0 ) {
273
  var settingsdata = "" + settings.data;
274
  if( typeof settings.data == 'undefined' || jQuery.isEmptyObject( settings.data ) || settingsdata.indexOf('action=trp_') === -1 ) {
275
  window.parent.jQuery('#trp-preview-iframe').trigger('trp_page_loaded');
105
  }
106
 
107
  if ( ! translation_found ){
108
+ _this.pause_observer();
109
  queried_string.node.textContent = initial_value;
110
+ _this.unpause_observer();
111
  }
112
  }
113
  // this should always be outside the for loop
141
  jQuery(mutation.addedNodes[i]).find('a').context.href = _this.update_query_string('trp-edit-translation', 'preview', jQuery(mutation.addedNodes[i]).find('a').context.href);
142
  }
143
 
144
+ if ( skip_string(node) ){
 
 
 
 
 
 
 
 
 
 
145
  continue;
146
  }
147
 
162
  var all_nodes = jQuery( mutation.addedNodes[i]).find( '*').addBack();
163
  var all_strings = all_nodes.contents().filter(function(){
164
  if( this.nodeType === 3 && /\S/.test(this.nodeValue) ){
165
+ if ( ! skip_string(this) ){
166
  return this;
167
  }
168
  }});
188
  }
189
  };
190
 
191
+ function skip_string(node){
192
+ // skip nodes containing these attributes
193
+ var selectors = trp_data.trp_skip_selectors;
194
+ for (var i = 0; i < selectors.length ; i++ ){
195
+ if ( jQuery(node).closest( selectors[ i ] ).length > 0 ){
196
+ return true;
197
+ }
198
+ }
199
+ return false;
200
+ }
201
+
202
  function get_string_from_node( node ){
203
  if( node.nodeType === 3 && /\S/.test(node.nodeValue) ){
204
+ if ( ! skip_string(node) ){
205
  return node;
206
  }
207
  }
272
  observer.observe( document.body , config );
273
 
274
  jQuery( document ).ajaxComplete(function( event, request, settings ) {
275
+ if( typeof window.parent.jQuery !== "undefined" && window.parent.jQuery('#trp-preview-iframe').length != 0 ) {
276
  var settingsdata = "" + settings.data;
277
  if( typeof settings.data == 'undefined' || jQuery.isEmptyObject( settings.data ) || settingsdata.indexOf('action=trp_') === -1 ) {
278
  window.parent.jQuery('#trp-preview-iframe').trigger('trp_page_loaded');
class-translate-press.php CHANGED
@@ -41,7 +41,7 @@ class TRP_Translate_Press{
41
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
43
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
44
- define( 'TRP_PLUGIN_VERSION', '1.4.2' );
45
 
46
  wp_cache_add_non_persistent_groups(array('trp'));
47
 
41
  define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
42
  define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
43
  define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
44
+ define( 'TRP_PLUGIN_VERSION', '1.4.3' );
45
 
46
  wp_cache_add_non_persistent_groups(array('trp'));
47
 
includes/class-hooks-loader.php CHANGED
@@ -47,33 +47,39 @@ class TRP_Hooks_Loader{
47
  $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
48
  }
49
 
50
- /**
51
- * Remove all actions or filters registered functions for this hook.
52
- *
53
- * Should be called before plugins_loaded filter priority 15.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  *
55
  * @param string $hook Hook name.
 
 
56
  */
57
- public function remove_hook( $hook ){
58
 
59
- $this->filters = $this->unset_hook_from_array( $this->filters, $hook );
60
- $this->actions = $this->unset_hook_from_array( $this->actions, $hook );
61
- }
62
-
63
- /**
64
- * Remove $hook from action or filter array
65
- *
66
- * @param array $array Action or filters array.
67
- * @param string $hook Hook to remove.
68
- * @return array Action or filters without the hook.
69
- */
70
- private function unset_hook_from_array( $array, $hook ) {
71
- foreach ( $array as $key => $filter ){
72
- if ( $filter['hook'] == $hook ){
73
- unset( $array[$key] );
74
- }
75
- }
76
- return array_values( $array );
77
  }
78
 
79
  /**
@@ -104,7 +110,7 @@ class TRP_Hooks_Loader{
104
  * Hooked on plugins_loaded filter, priority 15
105
  */
106
  public function run() {
107
-
108
  foreach ( $this->filters as $hook ) {
109
  if ( $hook['component'] == null ){
110
  add_filter( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );
47
  $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
48
  }
49
 
50
+ /**
51
+ * Remove $hook from action or filter array
52
+ *
53
+ * @param array $array Action or filters array.
54
+ * @param string $hook Hook to remove.
55
+ * @param string $callback Function callback to remove (optional). If not set, it will remove all callbacks hooked to $hook.
56
+ * @param string $component Component to remove (optional). If not set, it will remove all components with the callbacks function name $callback.
57
+ * @return array Action or filters without the hook.
58
+ */
59
+ private function unset_hook_from_array( $array, $hook, $callback, $component ) {
60
+ foreach ( $array as $key => $filter ){
61
+ if ( $filter['hook'] == $hook ){
62
+ if ( !$callback || ( $callback && $filter['callback'] == $callback ) ) {
63
+ if ( !$component || ( $component && $filter['component'] == $component ) ) {
64
+ unset( $array[ $key ] );
65
+ }
66
+ }
67
+ }
68
+ }
69
+ return array_values( $array );
70
+ }
71
+
72
+ /**
73
+ * Remove actions or filters registered functions for this hook.
74
  *
75
  * @param string $hook Hook name.
76
+ * @param string $callback Function callback to remove (optional). If not set, it will remove all callbacks hooked to $hook.
77
+ * @param string $component Component to remove (optional). If not set, it will remove all components with the callbacks function name $callback.
78
  */
79
+ public function remove_hook( $hook, $callback = null, $component = null ){
80
 
81
+ $this->filters = $this->unset_hook_from_array( $this->filters, $hook, $callback, $component );
82
+ $this->actions = $this->unset_hook_from_array( $this->actions, $hook, $callback, $component );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
 
85
  /**
110
  * Hooked on plugins_loaded filter, priority 15
111
  */
112
  public function run() {
113
+ do_action( 'trp_before_running_hooks', $this );
114
  foreach ( $this->filters as $hook ) {
115
  if ( $hook['component'] == null ){
116
  add_filter( $hook['hook'], $hook['callback'], $hook['priority'], $hook['accepted_args'] );
includes/class-translation-render.php CHANGED
@@ -261,6 +261,10 @@ class TRP_Translation_Render{
261
  * @return string Translated HTML page.
262
  */
263
  public function translate_page( $output ){
 
 
 
 
264
  global $trp_editor_notices;
265
 
266
  /* replace our special tags so we have valid html */
@@ -1014,11 +1018,12 @@ class TRP_Translation_Render{
1014
  }
1015
  }
1016
  $trp_data = array(
1017
- 'trp_ajax_url' => apply_filters('trp_ajax_url', TRP_PLUGIN_URL . 'includes/trp-ajax.php' ),
1018
- 'trp_wp_ajax_url' => apply_filters('trp_wp_ajax_url', admin_url('admin-ajax.php')),
1019
- 'trp_language_to_query' => $language_to_query,
1020
- 'trp_original_language' => $this->settings['default-language'],
1021
- 'trp_current_language' => $TRP_LANGUAGE
 
1022
  );
1023
  if ( isset( $_REQUEST['trp-edit-translation'] ) && $_REQUEST['trp-edit-translation'] == 'preview' ) {
1024
  $trp_data['trp_ajax_url'] = $trp_data['trp_wp_ajax_url'];
261
  * @return string Translated HTML page.
262
  */
263
  public function translate_page( $output ){
264
+ if ( apply_filters( 'trp_stop_translating_page', false, $output ) ){
265
+ return $output;
266
+ }
267
+
268
  global $trp_editor_notices;
269
 
270
  /* replace our special tags so we have valid html */
1018
  }
1019
  }
1020
  $trp_data = array(
1021
+ 'trp_ajax_url' => apply_filters('trp_ajax_url', TRP_PLUGIN_URL . 'includes/trp-ajax.php' ),
1022
+ 'trp_wp_ajax_url' => apply_filters('trp_wp_ajax_url', admin_url('admin-ajax.php')),
1023
+ 'trp_language_to_query' => $language_to_query,
1024
+ 'trp_original_language' => $this->settings['default-language'],
1025
+ 'trp_current_language' => $TRP_LANGUAGE,
1026
+ 'trp_skip_selectors' => apply_filters( 'trp_skip_selectors_from_dynamic_translation', array( '[data-no-translation]', '[data-no-dynamic-translation]', '[data-trpgettextoriginal]', '[data-trp-translate-id]' ), $TRP_LANGUAGE, $this->settings )
1027
  );
1028
  if ( isset( $_REQUEST['trp-edit-translation'] ) && $_REQUEST['trp-edit-translation'] == 'preview' ) {
1029
  $trp_data['trp_ajax_url'] = $trp_data['trp_wp_ajax_url'];
includes/class-url-converter.php CHANGED
@@ -315,6 +315,7 @@ class TRP_Url_Converter {
315
  $new_url = $url;
316
  }
317
 
 
318
  wp_cache_set('get_url_for_language_' . $hash, $new_url . $trp_link_is_processed, 'trp');
319
  return $new_url . $trp_link_is_processed ;
320
 
315
  $new_url = $url;
316
  }
317
 
318
+ $new_url = apply_filters( 'trp_get_url_for_language', $new_url, $url, $language, $this->get_abs_home(), $this->get_lang_from_url_string($url), $this->get_url_slug( $language ) );
319
  wp_cache_set('get_url_for_language_' . $hash, $new_url . $trp_link_is_processed, 'trp');
320
  return $new_url . $trp_link_is_processed ;
321
 
includes/functions.php CHANGED
@@ -625,15 +625,57 @@ function trp_bulk_debug($debug = false, $logger = array()){
625
  * Compatibility with WooCommerce PDF Invoices & Packing Slips
626
  * https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
627
  *
628
- * @since 1.4.0
629
  *
630
- * @param string $html
631
- * @param object $instance
632
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
 
634
- add_filter( 'wpo_wcpdf_get_html', 'trp_woo_pdf_invoices_and_packing_slips_compatibility', 10, 2);
635
- function trp_woo_pdf_invoices_and_packing_slips_compatibility($html, $instance){
636
- $html = str_replace('#!trpst#', '<', $html);
637
- $html = str_replace('#!trpen#', '>', $html);
638
- return $html;
 
 
 
 
 
639
  }
625
  * Compatibility with WooCommerce PDF Invoices & Packing Slips
626
  * https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/
627
  *
628
+ * @since 1.4.3
629
  *
 
 
630
  */
631
+ // fix attachment name in email
632
+ add_filter( 'wpo_wcpdf_filename', 'trp_woo_pdf_invoices_and_packing_slips_compatibility' );
633
+
634
+ // fix #trpgettext inside invoice pdf
635
+ add_filter( 'wpo_wcpdf_get_html', 'trp_woo_pdf_invoices_and_packing_slips_compatibility');
636
+ function trp_woo_pdf_invoices_and_packing_slips_compatibility($title){
637
+ if ( class_exists( 'TRP_Translation_Manager' ) ) {
638
+ return TRP_Translation_Manager::strip_gettext_tags($title);
639
+ }
640
+ }
641
+
642
+ // fix font of pdf breaking because of str_get_html() call inside translate_page()
643
+ add_filter( 'trp_stop_translating_page', 'trp_woo_pdf_invoices_and_packing_slips_compatibility_dont_translate_pdf', 10, 2 );
644
+ function trp_woo_pdf_invoices_and_packing_slips_compatibility_dont_translate_pdf( $bool, $output ){
645
+ if ( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'generate_wpo_wcpdf' ) {
646
+ return true;
647
+ }
648
+ return $bool;
649
+ }
650
+
651
+
652
+ /**
653
+ * Compatibility with WooCommerce order notes
654
+ *
655
+ * When a new order is placed in secondary languages, in admin area WooCommerce->Orders->Edit Order, the right sidebar contains Order notes which can contain #trpst tags.
656
+ *
657
+ * @since 1.4.3
658
+ */
659
+
660
+ // old orders
661
+ add_filter( 'woocommerce_get_order_note', 'trp_woo_notes_strip_trpst' );
662
+ // new orders
663
+ add_filter( 'woocommerce_new_order_note_data', 'trp_woo_notes_strip_trpst' );
664
+ function trp_woo_notes_strip_trpst( $note_array ){
665
+ foreach ( $note_array as $item => $value ){
666
+ $note_array[$item] = TRP_Translation_Manager::strip_gettext_tags( $value );
667
+ }
668
+ return $note_array;
669
+ }
670
 
671
+ /**
672
+ * Compatibility with WooCommerce country list on checkout.
673
+ *
674
+ * Skip detection by translate-dom-changes of the list of countries
675
+ *
676
+ */
677
+ add_filter( 'trp_skip_selectors_from_dynamic_translation', 'trp_woo_skip_dynamic_translation' );
678
+ function trp_woo_skip_dynamic_translation( $skip_selectors ){
679
+ $add_skip_selectors = array( '#select2-billing_country-results', '#select2-shipping_country-results' );
680
+ return array_merge( $skip_selectors, $add_skip_selectors );
681
  }
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, with full support for WooCommerce and site builders.
6
- Version: 1.4.2
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, with full support for WooCommerce and site builders.
6
+ Version: 1.4.3
7
  Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
8
  Author URI: https://cozmoslabs.com/
9
  Text Domain: translatepress-multilingual
languages/translatepress-multilingual.pot CHANGED
@@ -25,55 +25,55 @@ msgstr ""
25
  msgid "All Languages"
26
  msgstr ""
27
 
28
- #: ../tp-add-on-seo-pack/class-seo-pack.php:167
29
  msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when you submit the sitemap to Google."
30
  msgstr ""
31
 
32
- #: includes/class-ald-settings.php:37
33
  msgid "First by browser language, then IP address (recommended)"
34
  msgstr ""
35
 
36
- #: includes/class-ald-settings.php:38
37
  msgid "First by IP address, then browser language"
38
  msgstr ""
39
 
40
- #: includes/class-ald-settings.php:39
41
  msgid "Only by browser language"
42
  msgstr ""
43
 
44
- #: includes/class-ald-settings.php:40
45
  msgid "Only by IP address"
46
  msgstr ""
47
 
48
- #: includes/class-ald-settings.php:110
49
  msgid "<div class=\"warning\">WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment.</div>"
50
  msgstr ""
51
 
52
- #: partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:4, ../tp-add-on-seo-pack/partials/license-settings-page.php:4, ../translatepress/partials/addons-settings-page.php:3, ../translatepress/partials/main-settings-page.php:5, ../translatepress/partials/test-google-key-settings-page.php:10, ../translatepress/partials/trp-remove-duplicate-rows.php:3, ../translatepress/partials/trp-update-database.php:3, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:4
53
  msgid "TranslatePress Settings"
54
  msgstr ""
55
 
56
- #: partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:10, ../tp-add-on-seo-pack/partials/license-settings-page.php:10, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:10
57
  msgid "License Key"
58
  msgstr ""
59
 
60
- #: partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:15, ../tp-add-on-seo-pack/partials/license-settings-page.php:15, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:15
61
  msgid "Enter your license key."
62
  msgstr ""
63
 
64
- #: partials/license-settings-page.php:22, partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:22, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:31, ../tp-add-on-seo-pack/partials/license-settings-page.php:22, ../tp-add-on-seo-pack/partials/license-settings-page.php:31, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:31
65
  msgid "Activate License"
66
  msgstr ""
67
 
68
- #: partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:28, ../tp-add-on-seo-pack/partials/license-settings-page.php:28, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:28
69
  msgid "Deactivate License"
70
  msgstr ""
71
 
72
- #: partials/settings-option.php:2
73
  msgid "Method of language detection"
74
  msgstr ""
75
 
76
- #: partials/settings-option.php:14
77
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
78
  msgstr ""
79
 
@@ -607,14 +607,14 @@ msgstr ""
607
  msgid "Update database"
608
  msgstr ""
609
 
610
- #: ../trp-add-on-translator-accounts-add-on/includes/class-translator-accounts.php:119
611
  msgid " TranslatePress Settings"
612
  msgstr ""
613
 
614
- #: ../trp-add-on-translator-accounts-add-on/includes/class-translator-accounts.php:123, ../trp-add-on-translator-accounts-add-on/includes/class-translator-accounts.php:124
615
  msgid "Translator"
616
  msgstr ""
617
 
618
- #: ../trp-add-on-translator-accounts-add-on/includes/class-translator-accounts.php:128
619
  msgid "Allow this user to translate the website."
620
  msgstr ""
25
  msgid "All Languages"
26
  msgstr ""
27
 
28
+ #: ../tp-add-on-seo-pack/class-seo-pack.php:171
29
  msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when you submit the sitemap to Google."
30
  msgstr ""
31
 
32
+ #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:37
33
  msgid "First by browser language, then IP address (recommended)"
34
  msgstr ""
35
 
36
+ #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:38
37
  msgid "First by IP address, then browser language"
38
  msgstr ""
39
 
40
+ #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:39
41
  msgid "Only by browser language"
42
  msgstr ""
43
 
44
+ #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:40
45
  msgid "Only by IP address"
46
  msgstr ""
47
 
48
+ #: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:110
49
  msgid "<div class=\"warning\">WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment.</div>"
50
  msgstr ""
51
 
52
+ #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:4, ../tp-add-on-seo-pack/partials/license-settings-page.php:4, ../translatepress/partials/addons-settings-page.php:3, ../translatepress/partials/main-settings-page.php:5, ../translatepress/partials/test-google-key-settings-page.php:10, ../translatepress/partials/trp-remove-duplicate-rows.php:3, ../translatepress/partials/trp-update-database.php:3, partials/license-settings-page.php:4
53
  msgid "TranslatePress Settings"
54
  msgstr ""
55
 
56
+ #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:10, ../tp-add-on-seo-pack/partials/license-settings-page.php:10, partials/license-settings-page.php:10
57
  msgid "License Key"
58
  msgstr ""
59
 
60
+ #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:15, ../tp-add-on-seo-pack/partials/license-settings-page.php:15, partials/license-settings-page.php:15
61
  msgid "Enter your license key."
62
  msgstr ""
63
 
64
+ #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:22, ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:22, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:31, ../tp-add-on-seo-pack/partials/license-settings-page.php:22, ../tp-add-on-seo-pack/partials/license-settings-page.php:31, partials/license-settings-page.php:22, partials/license-settings-page.php:31
65
  msgid "Activate License"
66
  msgstr ""
67
 
68
+ #: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28, ../tp-add-on-navigation-based-on-language/partials/license-settings-page.php:28, ../tp-add-on-seo-pack/partials/license-settings-page.php:28, partials/license-settings-page.php:28
69
  msgid "Deactivate License"
70
  msgstr ""
71
 
72
+ #: ../tp-add-on-automatic-language-detection/partials/settings-option.php:2
73
  msgid "Method of language detection"
74
  msgstr ""
75
 
76
+ #: ../tp-add-on-automatic-language-detection/partials/settings-option.php:14
77
  msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
78
  msgstr ""
79
 
607
  msgid "Update database"
608
  msgstr ""
609
 
610
+ #: includes/class-translator-accounts.php:119
611
  msgid " TranslatePress Settings"
612
  msgstr ""
613
 
614
+ #: includes/class-translator-accounts.php:123, includes/class-translator-accounts.php:124
615
  msgid "Translator"
616
  msgstr ""
617
 
618
+ #: includes/class-translator-accounts.php:128
619
  msgid "Allow this user to translate the website."
620
  msgstr ""
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, cristophor
3
  Donate link: https://www.cozmoslabs.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.0.3
7
- Stable tag: 1.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,12 @@ For more information please check out [TranslatePress - Multilingual plugin docu
125
  6. Menu Language Switcher
126
 
127
  == Changelog ==
 
 
 
 
 
 
128
  = 1.4.2 =
129
  * Fixes the issue with not being able to publish pages when Use subdirectory for default language is set to yes and Gutenberg is installed
130
  * Fixed an issue with Elementor and Use subdirectory for default language set to yes
3
  Donate link: https://www.cozmoslabs.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.1.0
7
+ Stable tag: 1.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
  6. Menu Language Switcher
126
 
127
  == Changelog ==
128
+ = 1.4.3 =
129
+ * Fixed an issue with the Language by Get Parameter add-on
130
+ * Added compatibility with WooCommerce PDF invoice and WooCommerce's order notes.
131
+ * Added stop_translating_page and before_running_hooks hooks.
132
+ * Refactored hooks-loader to easily remove hook
133
+
134
  = 1.4.2 =
135
  * Fixes the issue with not being able to publish pages when Use subdirectory for default language is set to yes and Gutenberg is installed
136
  * Fixed an issue with Elementor and Use subdirectory for default language set to yes