Version Description
- Fixed some cases of missing spaces between words in different html tags on translated pages
- Fixed conflict with Scriptless Social Sharing plugin
Download this release
Release Info
Developer | razvan.mo |
Plugin | TranslatePress – Translate Multilingual sites |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 2.1.0
- class-translate-press.php +1 -1
- includes/class-translation-manager.php +1 -1
- includes/class-translation-render.php +1 -1
- includes/class-url-converter.php +5 -2
- index.php +2 -2
- readme.txt +5 -1
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.0
|
62 |
|
63 |
wp_cache_add_non_persistent_groups(array('trp'));
|
64 |
|
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.0' );
|
62 |
|
63 |
wp_cache_add_non_persistent_groups(array('trp'));
|
64 |
|
includes/class-translation-manager.php
CHANGED
@@ -822,7 +822,7 @@ class TRP_Translation_Manager
|
|
822 |
$trp_translated_gettext_text = $trp_translated_gettext_texts[$domain . '::' . $text];
|
823 |
|
824 |
if (!empty($trp_translated_gettext_text['translated']) && $translation != $trp_translated_gettext_text['translated']) {
|
825 |
-
$translation =
|
826 |
}
|
827 |
$db_id = $trp_translated_gettext_text['id'];
|
828 |
$found_in_db = true;
|
822 |
$trp_translated_gettext_text = $trp_translated_gettext_texts[$domain . '::' . $text];
|
823 |
|
824 |
if (!empty($trp_translated_gettext_text['translated']) && $translation != $trp_translated_gettext_text['translated']) {
|
825 |
+
$translation = str_replace(trim($text), trp_sanitize_string($trp_translated_gettext_text['translated']), $text);
|
826 |
}
|
827 |
$db_id = $trp_translated_gettext_text['id'];
|
828 |
$found_in_db = true;
|
includes/class-translation-render.php
CHANGED
@@ -785,7 +785,7 @@ class TRP_Translation_Render{
|
|
785 |
do_action( 'trp_set_translation_for_attribute', $nodes[$i]['node'], $accessor, $translated_strings[$i] );
|
786 |
}else{
|
787 |
$translateable_string = $this->maybe_correct_translatable_string( $translateable_string, $nodes[$i]['node']->$accessor );
|
788 |
-
$nodes[$i]['node']->$accessor =
|
789 |
}
|
790 |
|
791 |
}
|
785 |
do_action( 'trp_set_translation_for_attribute', $nodes[$i]['node'], $accessor, $translated_strings[$i] );
|
786 |
}else{
|
787 |
$translateable_string = $this->maybe_correct_translatable_string( $translateable_string, $nodes[$i]['node']->$accessor );
|
788 |
+
$nodes[$i]['node']->$accessor = str_replace( $translateable_string, trp_sanitize_string($translated_strings[$i]), $nodes[$i]['node']->$accessor );
|
789 |
}
|
790 |
|
791 |
}
|
includes/class-url-converter.php
CHANGED
@@ -77,11 +77,14 @@ class TRP_Url_Converter {
|
|
77 |
$admin_url = strtolower( admin_url() );
|
78 |
|
79 |
// we can't use wp_get_referer() It looks like it creates an infinite loop because it calls home_url() and we're filtering that
|
|
|
|
|
|
|
80 |
$referrer = '';
|
81 |
if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
|
82 |
-
$referrer = wp_unslash( esc_url_raw( $_REQUEST['_wp_http_referer'] ) );
|
83 |
} else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
|
84 |
-
$referrer = wp_unslash( esc_url_raw( $_SERVER['HTTP_REFERER'] ) );
|
85 |
}
|
86 |
|
87 |
//consider an admin request a call to the rest api that came from the admin area
|
77 |
$admin_url = strtolower( admin_url() );
|
78 |
|
79 |
// we can't use wp_get_referer() It looks like it creates an infinite loop because it calls home_url() and we're filtering that
|
80 |
+
// array('http','https') is added because of a compatibility issue with Scriptless Social Sharing that created an infinite loop
|
81 |
+
//because this function is hooked to 'locale' and reaches at a certain point a function hooked to 'kses_allowed_protocols'
|
82 |
+
//Scriptless Social Sharing had a function hooked to the same filter and it created an infinit loop
|
83 |
$referrer = '';
|
84 |
if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
|
85 |
+
$referrer = wp_unslash( esc_url_raw( $_REQUEST['_wp_http_referer'], array( 'http', 'https' ) ) );
|
86 |
} else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
|
87 |
+
$referrer = wp_unslash( esc_url_raw( $_SERVER['HTTP_REFERER'], array( 'http', 'https' ) ) );
|
88 |
}
|
89 |
|
90 |
//consider an admin request a call to the rest api that came from the admin area
|
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.0
|
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: 5.6
|
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.0
|
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: 5.6
|
14 |
|
15 |
== Copyright ==
|
16 |
Copyright 2017 Cozmoslabs (www.cozmoslabs.com)
|
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.8
|
7 |
Requires PHP: 5.6.20
|
8 |
-
Stable tag: 2.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -140,6 +140,10 @@ For more information please check out our [documentation](https://translatepress
|
|
140 |
|
141 |
|
142 |
== Changelog ==
|
|
|
|
|
|
|
|
|
143 |
= 2.0.9 =
|
144 |
* Security improvements
|
145 |
* Added option to translate content restricted by language in Elementor
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.8
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 2.1.0
|
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.0 =
|
144 |
+
* Fixed some cases of missing spaces between words in different html tags on translated pages
|
145 |
+
* Fixed conflict with Scriptless Social Sharing plugin
|
146 |
+
|
147 |
= 2.0.9 =
|
148 |
* Security improvements
|
149 |
* Added option to translate content restricted by language in Elementor
|