Translate WordPress with GTranslate - Version 2.9.8

Version Description

  • Fix for email translation issue related to new base64 encoding format introduced in v2.9.7
  • Added new fields into woocommerce script data for translation
  • Removed script_loader_tag format modification, which is not necessary any more
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.9.8
Comparing to
See all releases

Code changes from version 2.9.7 to 2.9.8

Files changed (3) hide show
  1. gtranslate.php +14 -10
  2. readme.txt +7 -2
  3. url_addon/gtranslate-email.php +1 -1
gtranslate.php CHANGED
@@ -2,15 +2,15 @@
2
  /*
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
- Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
- Version: 2.9.7
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
10
 
11
  */
12
 
13
- /* Copyright 2010 - 2021 GTranslate Inc. ( website: https://gtranslate.com )
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -2511,8 +2511,8 @@ if($data['pro_version'] or $data['enterprise_version']) {
2511
  case 'wc-address-i18n': {
2512
  $data['gt_translate_keys'] = array(
2513
  array('key' => 'locale', 'format' => 'json'),
2514
- 'i18n_required_text',
2515
- 'i18n_optional_text',
2516
  );
2517
 
2518
  $locale = json_decode($data['locale']);
@@ -2553,6 +2553,10 @@ if($data['pro_version'] or $data['enterprise_version']) {
2553
  $data['locale'] = json_encode($locale);
2554
  } break;
2555
 
 
 
 
 
2556
  case 'wc-checkout': {
2557
  $data['gt_translate_keys'] = array('i18n_checkout_error');
2558
  } break;
@@ -2565,6 +2569,10 @@ if($data['pro_version'] or $data['enterprise_version']) {
2565
  $data['gt_translate_keys'] = array('i18n_view_cart', array('key' => 'cart_url', 'format' => 'url'));
2566
  } break;
2567
 
 
 
 
 
2568
  case 'wc-password-strength-meter': {
2569
  $data['gt_translate_keys'] = array('i18n_password_error', 'i18n_password_hint', '');
2570
  } break;
@@ -2584,11 +2592,7 @@ if($data['pro_version'] or $data['enterprise_version']) {
2584
  return $false;
2585
  }
2586
 
2587
- //add_action('wp_print_scripts', 'gtranslate_filter_l10n_scripts', 1);
2588
- //add_action('wp_print_header_scripts', 'gtranslate_filter_l10n_scripts', 1);
2589
- //add_action('wp_print_footer_scripts', 'gtranslate_filter_l10n_scripts', 1);
2590
-
2591
- add_filter('script_loader_tag', 'gtranslate_add_script_attributes', 100, 2);
2592
 
2593
  add_filter('woocommerce_get_script_data', 'gt_filter_woocommerce_scripts_data', 10, 2 );
2594
 
2
  /*
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.8
7
  Author: Translate AI Multilingual Solutions
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
10
 
11
  */
12
 
13
+ /* Copyright 2010 - 2022 GTranslate Inc. ( website: https://gtranslate.com )
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
2511
  case 'wc-address-i18n': {
2512
  $data['gt_translate_keys'] = array(
2513
  array('key' => 'locale', 'format' => 'json'),
2514
+ array('key' => 'i18n_required_text', 'format' => 'text'),
2515
+ array('key' => 'i18n_optional_text', 'format' => 'html'),
2516
  );
2517
 
2518
  $locale = json_decode($data['locale']);
2553
  $data['locale'] = json_encode($locale);
2554
  } break;
2555
 
2556
+ case 'wc-single-product': {
2557
+ $data['gt_translate_keys'] = array('i18n_required_rating_text');
2558
+ } break;
2559
+
2560
  case 'wc-checkout': {
2561
  $data['gt_translate_keys'] = array('i18n_checkout_error');
2562
  } break;
2569
  $data['gt_translate_keys'] = array('i18n_view_cart', array('key' => 'cart_url', 'format' => 'url'));
2570
  } break;
2571
 
2572
+ case 'wc-add-to-cart-variation': {
2573
+ $data['gt_translate_keys'] = array('i18n_no_matching_variations_text', 'i18n_make_a_selection_text', 'i18n_unavailable_text');
2574
+ } break;
2575
+
2576
  case 'wc-password-strength-meter': {
2577
  $data['gt_translate_keys'] = array('i18n_password_error', 'i18n_password_hint', '');
2578
  } break;
2592
  return $false;
2593
  }
2594
 
2595
+ //add_filter('script_loader_tag', 'gtranslate_add_script_attributes', 100, 2);
 
 
 
 
2596
 
2597
  add_filter('woocommerce_get_script_data', 'gt_filter_woocommerce_scripts_data', 10, 2 );
2598
 
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: 5.8
7
- Stable tag: 2.9.7
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.7 =
255
  * Happy New Year! :)
256
  * Fixed language selector issue when using custom domains for different languages
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: 5.9
7
+ Stable tag: 2.9.8
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.8 =
255
+ * Fix for email translation issue related to new base64 encoding format introduced in v2.9.7
256
+ * Added new fields into woocommerce script data for translation
257
+ * Removed script_loader_tag format modification, which is not necessary any more
258
+
259
  = 2.9.7 =
260
  * Happy New Year! :)
261
  * Fixed language selector issue when using custom domains for different languages
url_addon/gtranslate-email.php CHANGED
@@ -8,7 +8,7 @@ if(!isset($_GET['glang']) or !isset($_POST['body']))
8
  exit;
9
 
10
  // check if body is base64_encoded
11
- if(!preg_match('/^[a-zA-Z0-9+/]+={0,2}$/', $_POST['body']))
12
  exit;
13
 
14
  $glang = $_GET['glang'];
8
  exit;
9
 
10
  // check if body is base64_encoded
11
+ if(!preg_match('/^[a-zA-Z0-9+\/]+={0,2}$/', $_POST['body']))
12
  exit;
13
 
14
  $glang = $_GET['glang'];