Weglot Translate – Translate your WP website - Version 1.12.2

Version Description

(04/05/2018) = * Bugfix : Limitation on the number of characters translated at the same time

Download this release

Release Info

Developer remyb92
Plugin Icon 128x128 Weglot Translate – Translate your WP website
Version 1.12.2
Comparing to
See all releases

Code changes from version 1.12.1 to 1.12.2

Files changed (3) hide show
  1. readme.txt +4 -1
  2. src/Client/WeglotClient.php +2 -2
  3. weglot.php +3 -3
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: translate,translation,language,multilingual,bilingual,international,locali
4
  Requires at least: 4.5
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
- Stable tag: 1.12.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -152,6 +152,9 @@ See changelog for upgrade changes.
152
 
153
  == Changelog ==
154
 
 
 
 
155
  = 1.12.1 (03/05/2018) =
156
  * Bugfix : error for users with a version lower than PHP 5.4 . [] => array()
157
 
4
  Requires at least: 4.5
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
+ Stable tag: 1.12.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 1.12.2 (04/05/2018) =
156
+ * Bugfix : Limitation on the number of characters translated at the same time
157
+
158
  = 1.12.1 (03/05/2018) =
159
  * Bugfix : error for users with a version lower than PHP 5.4 . [] => array()
160
 
src/Client/WeglotClient.php CHANGED
@@ -409,7 +409,7 @@ class WeglotClient
409
  $this->full_trim($row->$property) != '' &&
410
  ! $this->hasAncestorAttribute($row, 'data-wg-notranslate') &&
411
  $checkType &&
412
- strlen($row->$property) <= self::NUMBER_MAX_CHARS
413
  ) {
414
  array_push(
415
  $words,
@@ -481,7 +481,7 @@ class WeglotClient
481
 
482
  if (!empty($otherWords) && is_array($otherWords)) {
483
  foreach ($otherWords as $otherWord) {
484
- if (strlen($otherWord) > self::NUMBER_MAX_CHARS) {
485
  continue;
486
  }
487
 
409
  $this->full_trim($row->$property) != '' &&
410
  ! $this->hasAncestorAttribute($row, 'data-wg-notranslate') &&
411
  $checkType &&
412
+ (strlen($row->$property) <= self::NUMBER_MAX_CHARS || strpos($row->$property, ' ') !== false)
413
  ) {
414
  array_push(
415
  $words,
481
 
482
  if (!empty($otherWords) && is_array($otherWords)) {
483
  foreach ($otherWords as $otherWord) {
484
+ if (strlen($otherWord) > self::NUMBER_MAX_CHARS && strpos($otherWord, ' ') === false) {
485
  continue;
486
  }
487
 
weglot.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * @package Weglot
4
- * @version 1.12.1
5
  */
6
 
7
  /*
@@ -12,7 +12,7 @@ Author: Weglot Translate team
12
  Author URI: https://weglot.com/
13
  Text Domain: weglot
14
  Domain Path: /languages/
15
- Version: 1.12.1
16
  */
17
 
18
  /*
@@ -41,7 +41,7 @@ if (! defined('ABSPATH')) {
41
  }
42
 
43
 
44
- define('WEGLOT_VERSION', '1.12.1');
45
  define('WEGLOT_DIR', dirname(__FILE__));
46
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
47
  define('WEGLOT_DIRURL', plugin_dir_url(__FILE__));
1
  <?php
2
  /**
3
  * @package Weglot
4
+ * @version 1.12.2
5
  */
6
 
7
  /*
12
  Author URI: https://weglot.com/
13
  Text Domain: weglot
14
  Domain Path: /languages/
15
+ Version: 1.12.2
16
  */
17
 
18
  /*
41
  }
42
 
43
 
44
+ define('WEGLOT_VERSION', '1.12.2');
45
  define('WEGLOT_DIR', dirname(__FILE__));
46
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
47
  define('WEGLOT_DIRURL', plugin_dir_url(__FILE__));