Translate WordPress with GTranslate - Version 2.8.13

Version Description

  • Fixed bug with Globe widget look
  • Disables conflicting similar translation plugins
  • Fixed bug appeared in the latest version with the number of available languages
Download this release

Release Info

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

Code changes from version 2.8.12 to 2.8.13

Files changed (2) hide show
  1. gtranslate.php +9 -3
  2. readme.txt +6 -1
gtranslate.php CHANGED
@@ -3,7 +3,7 @@
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.8.12
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -158,6 +158,8 @@ class GTranslate extends WP_Widget {
158
 
159
  public static function admin_menu() {
160
  add_options_page(__('GTranslate Options', 'gtranslate'), 'GTranslate', 'administrator', 'gtranslate_options', array('GTranslate', 'options'));
 
 
161
  }
162
 
163
  public static function options() {
@@ -399,7 +401,7 @@ function RefreshDoWidgetCode() {
399
  centerPosition.left += Math.floor($('.gglobe').width() / 2) - 10;
400
  centerPosition.top += Math.floor($('.gglobe').height() / 2) - 10;
401
 
402
- var language_codes = `+JSON.stringify(jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray())+`;
403
  var languages = `+JSON.stringify((function(){var langs = [], selected_lang_codes = jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray();for(var key in selected_lang_codes)langs.push(gt_lang_array[selected_lang_codes[key]]);return langs;})())+`;
404
  var us_flag = `+(jQuery('#alt_us:checked').length ? 'true' : 'false')+`;
405
  var ca_flag = `+(jQuery('#alt_ca:checked').length ? 'true' : 'false')+`;
@@ -407,7 +409,7 @@ function RefreshDoWidgetCode() {
407
  var mx_flag = `+(jQuery('#alt_mx:checked').length ? 'true' : 'false')+`;
408
  var qc_flag = `+(jQuery('#alt_qc:checked').length ? 'true' : 'false')+`;
409
 
410
- var count = language_codes.length, r0 = 55, r = r0, d = 34, cntpc = 12, nc = 0, m = 1.75;
411
  cntpc = 2 * Math.PI * r0 / 34;
412
  for (var i = 0, j = 0; i < count; i++, j++) {
413
  var x, y, angle;
@@ -1197,6 +1199,10 @@ foreach($alt_flags as $flag)
1197
  $data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
1198
  $data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1199
  $data['language_codes2'] = (isset($data['language_codes2']) and !empty($data['language_codes2'])) ? $data['language_codes2'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
 
 
 
 
1200
  }
1201
  }
1202
 
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.8.13
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
158
 
159
  public static function admin_menu() {
160
  add_options_page(__('GTranslate Options', 'gtranslate'), 'GTranslate', 'administrator', 'gtranslate_options', array('GTranslate', 'options'));
161
+
162
+ deactivate_plugins(array('wptranslator/WPTranslator.php', 'google-language-translator/google-language-translator.php', 'google-website-translator/google-website-translator.php', 'weglot/weglot.php'), true);
163
  }
164
 
165
  public static function options() {
401
  centerPosition.left += Math.floor($('.gglobe').width() / 2) - 10;
402
  centerPosition.top += Math.floor($('.gglobe').height() / 2) - 10;
403
 
404
+ var language_codes2 = `+JSON.stringify(jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray())+`;
405
  var languages = `+JSON.stringify((function(){var langs = [], selected_lang_codes = jQuery(".connectedSortable2 li input:checked").map(function() {return jQuery(this).val();}).toArray();for(var key in selected_lang_codes)langs.push(gt_lang_array[selected_lang_codes[key]]);return langs;})())+`;
406
  var us_flag = `+(jQuery('#alt_us:checked').length ? 'true' : 'false')+`;
407
  var ca_flag = `+(jQuery('#alt_ca:checked').length ? 'true' : 'false')+`;
409
  var mx_flag = `+(jQuery('#alt_mx:checked').length ? 'true' : 'false')+`;
410
  var qc_flag = `+(jQuery('#alt_qc:checked').length ? 'true' : 'false')+`;
411
 
412
+ var count = language_codes2.length, r0 = 55, r = r0, d = 34, cntpc = 12, nc = 0, m = 1.75;
413
  cntpc = 2 * Math.PI * r0 / 34;
414
  for (var i = 0, j = 0; i < count; i++, j++) {
415
  var x, y, angle;
1199
  $data['alt_flags'] = isset($data['alt_flags']) ? $data['alt_flags'] : array();
1200
  $data['language_codes'] = (isset($data['language_codes']) and !empty($data['language_codes'])) ? $data['language_codes'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1201
  $data['language_codes2'] = (isset($data['language_codes2']) and !empty($data['language_codes2'])) ? $data['language_codes2'] : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1202
+
1203
+ // add missing languages once
1204
+ if(strlen($data['language_codes']) < strlen($data['language_codes2']))
1205
+ $data['language_codes'] = $data['language_codes2'];
1206
  }
1207
  }
1208
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Author: Edvard Ananyan
4
  Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8
6
  Tested up to: 4.7
7
- Stable tag: 2.8.12
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
@@ -203,6 +203,11 @@ You need to go to the language you want to edit, for instance, French: http://do
203
 
204
  == Changelog ==
205
 
 
 
 
 
 
206
  = 2.8.12 =
207
  * Tweaks to make it work better with WooCommerce
208
  * Fixed bug when turning off native language names option
4
  Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8
6
  Tested up to: 4.7
7
+ Stable tag: 2.8.13
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
203
 
204
  == Changelog ==
205
 
206
+ = 2.8.13 =
207
+ * Fixed bug with Globe widget look
208
+ * Disables conflicting similar translation plugins
209
+ * Fixed bug appeared in the latest version with the number of available languages
210
+
211
  = 2.8.12 =
212
  * Tweaks to make it work better with WooCommerce
213
  * Fixed bug when turning off native language names option