Version Description
- Fix for images not appearing in WooCommerce PDF Invoices after translation
- Converted get parameters encoding from rfc1738 to rfc3986
- Replaced gzdecode with zlib_decode to be zlib encoding type independent
Download this release
Release Info
| Developer | edo888 |
| Plugin | |
| Version | 2.9.14 |
| Comparing to | |
| See all releases | |
Code changes from version 2.9.13 to 2.9.14
- gtranslate.php +3 -3
- readme.txt +7 -2
- url_addon/config.php +1 -1
- url_addon/gtranslate.php +4 -4
gtranslate.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
| 5 |
Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
|
| 6 |
-
Version: 2.9.
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
| 9 |
Text Domain: gtranslate
|
|
@@ -2753,7 +2753,7 @@ if($data['pro_version'] or $data['enterprise_version']) {
|
|
| 2753 |
GTranslate::load_defaults($data);
|
| 2754 |
|
| 2755 |
// add notranslate for addresses
|
| 2756 |
-
$html = str_replace('-address"', '
|
| 2757 |
|
| 2758 |
include dirname(__FILE__) . '/url_addon/config.php';
|
| 2759 |
$server_id = intval(substr(md5(preg_replace('/^www\./', '', $_SERVER['HTTP_HOST'])), 0, 5), 16) % count($servers);
|
|
@@ -2830,7 +2830,7 @@ if($data['pro_version'] or $data['enterprise_version']) {
|
|
| 2830 |
$html = $matches[2][0];
|
| 2831 |
|
| 2832 |
// fix image
|
| 2833 |
-
$html = str_replace('
|
| 2834 |
|
| 2835 |
if($data['email_translation_debug']) {
|
| 2836 |
file_put_contents(dirname(__FILE__) . '/url_addon/debug.txt', 'Translated PDF HTML: ' . $html . "\n", FILE_APPEND);
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
| 5 |
Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
|
| 6 |
+
Version: 2.9.14
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
| 9 |
Text Domain: gtranslate
|
| 2753 |
GTranslate::load_defaults($data);
|
| 2754 |
|
| 2755 |
// add notranslate for addresses
|
| 2756 |
+
$html = str_replace('-address"', '-address notranslate"', $html);
|
| 2757 |
|
| 2758 |
include dirname(__FILE__) . '/url_addon/config.php';
|
| 2759 |
$server_id = intval(substr(md5(preg_replace('/^www\./', '', $_SERVER['HTTP_HOST'])), 0, 5), 16) % count($servers);
|
| 2830 |
$html = $matches[2][0];
|
| 2831 |
|
| 2832 |
// fix image
|
| 2833 |
+
$html = str_replace(' src="https://' . $_SERVER['HTTP_HOST'], ' src="', $html);
|
| 2834 |
|
| 2835 |
if($data['email_translation_debug']) {
|
| 2836 |
file_put_contents(dirname(__FILE__) . '/url_addon/debug.txt', 'Translated PDF HTML: ' . $html . "\n", FILE_APPEND);
|
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: edo888
|
|
| 3 |
Author: Translate AI Multilingual Solutions
|
| 4 |
Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
-
Tested up to: 6.
|
| 7 |
-
Stable tag: 2.9.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
|
@@ -251,6 +251,11 @@ If you want us to translate your website professionally or provide you a proofre
|
|
| 251 |
8. User Dashboard
|
| 252 |
|
| 253 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
= 2.9.13 =
|
| 255 |
* Added translation support for PDF invoices in WooCommerce PDF Invoices plugin
|
| 256 |
* Fixed email translation issue with custom domains
|
| 3 |
Author: Translate AI Multilingual Solutions
|
| 4 |
Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
+
Tested up to: 6.1
|
| 7 |
+
Stable tag: 2.9.14
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
| 251 |
8. User Dashboard
|
| 252 |
|
| 253 |
== Changelog ==
|
| 254 |
+
= 2.9.14 =
|
| 255 |
+
* Fix for images not appearing in WooCommerce PDF Invoices after translation
|
| 256 |
+
* Converted get parameters encoding from rfc1738 to rfc3986
|
| 257 |
+
* Replaced gzdecode with zlib_decode to be zlib encoding type independent
|
| 258 |
+
|
| 259 |
= 2.9.13 =
|
| 260 |
* Added translation support for PDF invoices in WooCommerce PDF Invoices plugin
|
| 261 |
* Fixed email translation issue with custom domains
|
url_addon/config.php
CHANGED
|
@@ -111,7 +111,7 @@ fy -> Frisian
|
|
| 111 |
xh -> Xhosa
|
| 112 |
*/
|
| 113 |
|
| 114 |
-
$servers = array('van', 'kars', 'sis', 'dvin', 'ani', 'evn', 'vagh', 'step', 'sis', 'tigr', 'ani', '
|
| 115 |
|
| 116 |
// IMPORTANT: If you turn debugging on, then sensitive information will be written into debug.txt file.
|
| 117 |
// It is your responsibility to turn the debugging off and clear the debug.txt file.
|
| 111 |
xh -> Xhosa
|
| 112 |
*/
|
| 113 |
|
| 114 |
+
$servers = array('van', 'kars', 'sis', 'dvin', 'ani', 'evn', 'vagh', 'step', 'sis', 'tigr', 'ani', 'van');
|
| 115 |
|
| 116 |
// IMPORTANT: If you turn debugging on, then sensitive information will be written into debug.txt file.
|
| 117 |
// It is your responsibility to turn the debugging off and clear the debug.txt file.
|
url_addon/gtranslate.php
CHANGED
|
@@ -27,7 +27,7 @@ if(isset($get_params['gurl']))
|
|
| 27 |
unset($get_params['gurl']);
|
| 28 |
|
| 29 |
if(count($get_params)) {
|
| 30 |
-
$page_url .= '?' . rtrim(str_replace('=&', '&', http_build_query($get_params)), '=');
|
| 31 |
}
|
| 32 |
|
| 33 |
$main_lang = isset($data['default_language']) ? $data['default_language'] : $main_lang;
|
|
@@ -75,7 +75,7 @@ $request_headers['Host'] = $host;
|
|
| 75 |
if(isset($request_headers['HOST'])) unset($request_headers['HOST']);
|
| 76 |
if(isset($request_headers['host'])) unset($request_headers['host']);
|
| 77 |
|
| 78 |
-
if(!function_exists('
|
| 79 |
$request_headers['Accept-Encoding'] = '';
|
| 80 |
else
|
| 81 |
$request_headers['Accept-Encoding'] = 'gzip';
|
|
@@ -199,9 +199,9 @@ $header_size = $response_info['header_size'];
|
|
| 199 |
$header = substr($response, 0, $header_size);
|
| 200 |
$html = substr($response, $header_size);
|
| 201 |
|
| 202 |
-
if(function_exists('
|
| 203 |
$return_gz = false;
|
| 204 |
-
$html_gunzip = @
|
| 205 |
|
| 206 |
if($html_gunzip !== false) {
|
| 207 |
$html = $html_gunzip;
|
| 27 |
unset($get_params['gurl']);
|
| 28 |
|
| 29 |
if(count($get_params)) {
|
| 30 |
+
$page_url .= '?' . rtrim(str_replace('=&', '&', http_build_query($get_params, '', '&', PHP_QUERY_RFC3986)), '=');
|
| 31 |
}
|
| 32 |
|
| 33 |
$main_lang = isset($data['default_language']) ? $data['default_language'] : $main_lang;
|
| 75 |
if(isset($request_headers['HOST'])) unset($request_headers['HOST']);
|
| 76 |
if(isset($request_headers['host'])) unset($request_headers['host']);
|
| 77 |
|
| 78 |
+
if(!function_exists('zlib_decode'))
|
| 79 |
$request_headers['Accept-Encoding'] = '';
|
| 80 |
else
|
| 81 |
$request_headers['Accept-Encoding'] = 'gzip';
|
| 199 |
$header = substr($response, 0, $header_size);
|
| 200 |
$html = substr($response, $header_size);
|
| 201 |
|
| 202 |
+
if(function_exists('zlib_decode')) {
|
| 203 |
$return_gz = false;
|
| 204 |
+
$html_gunzip = @zlib_decode($html);
|
| 205 |
|
| 206 |
if($html_gunzip !== false) {
|
| 207 |
$html = $html_gunzip;
|
