Lingotek Translation - Version 1.1.6

Version Description

(2015-10-30) =

  • Removed debugging code that was causing conflicts with other plugins and themes
  • Other minor bug fixes
Download this release

Release Info

Developer erichie
Plugin Icon 128x128 Lingotek Translation
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5 to 1.1.6

admin/manage/view-profiles.php CHANGED
@@ -33,7 +33,7 @@ if (!empty($_POST)) {
33
  if (!empty($_POST['name']))
34
  $profiles[$profile_id]['name'] = strip_tags($_POST['name']);
35
 
36
- foreach (array('upload', 'download', 'project_id', 'workflow_id') as $key) {
37
  if (isset($_POST[$key]) && in_array($_POST[$key], array_keys($settings[$key]['options'])))
38
  $profiles[$profile_id][$key] = $_POST[$key];
39
 
33
  if (!empty($_POST['name']))
34
  $profiles[$profile_id]['name'] = strip_tags($_POST['name']);
35
 
36
+ foreach (array('upload', 'download', 'project_id', 'workflow_id', 'primary_filter_id', 'secondary_filter_id') as $key) {
37
  if (isset($_POST[$key]) && in_array($_POST[$key], array_keys($settings[$key]['options'])))
38
  $profiles[$profile_id][$key] = $_POST[$key];
39
 
include/api.php CHANGED
@@ -112,10 +112,12 @@ class Lingotek_API extends Lingotek_HTTP {
112
  }
113
  }
114
  else if (is_wp_error($response)) {
115
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
116
  }
117
  else if (400 == wp_remote_retrieve_response_code($response)) {
118
- $arr[$wp_id]['upload_document'] = __('There was an error uploading WordPress item ') . $wp_id;
 
 
119
  }
120
  update_option('lingotek_log_errors', $arr);
121
  }
@@ -150,10 +152,12 @@ class Lingotek_API extends Lingotek_HTTP {
150
  }
151
  }
152
  else if (is_wp_error($response)) {
153
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
154
  }
155
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
156
- $arr[$wp_id]['patch_document'] = __('There was an error updating WordPress item ') . $wp_id;
 
 
157
  }
158
  update_option('lingotek_log_errors', $arr);
159
  }
@@ -221,10 +225,12 @@ class Lingotek_API extends Lingotek_HTTP {
221
  }
222
  }
223
  else if (is_wp_error($response)) {
224
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
225
  }
226
  else if (400 == wp_remote_retrieve_response_code($response)) {
227
- $arr[$wp_id]['document_exists'] = __('There was an error updating the translations status for WordPress item ') . $wp_id;
 
 
228
  }
229
  update_option('lingotek_log_errors', $arr);
230
  }
@@ -258,10 +264,12 @@ class Lingotek_API extends Lingotek_HTTP {
258
  }
259
  }
260
  else if (is_wp_error($response)) {
261
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
262
  }
263
  else if (400 == wp_remote_retrieve_response_code($response)) {
264
- $arr[$wp_id]['get_translations_status'] = __('There was an error updating the translations status for WordPress item ') . $wp_id;
 
 
265
  }
266
  update_option('lingotek_log_errors', $arr);
267
  }
@@ -297,10 +305,12 @@ class Lingotek_API extends Lingotek_HTTP {
297
  }
298
  }
299
  else if (is_wp_error($response)) {
300
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
301
  }
302
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
303
- $arr[$wp_id]['request_translation'][$locale] = __('There was an error requesting translation ') . $locale . __(' for WordPress item ') . $wp_id;
 
 
304
  }
305
  update_option('lingotek_log_errors', $arr);
306
  }
@@ -333,10 +343,12 @@ class Lingotek_API extends Lingotek_HTTP {
333
  }
334
  }
335
  else if (is_wp_error($response)) {
336
- $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity');
337
  }
338
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
339
- $arr[$wp_id]['get_translation'][$locale] = __('There was an error downloading translation ') . $locale . __(' for WordPress item ') . $wp_id;
 
 
340
  }
341
  update_option('lingotek_log_errors', $arr);
342
  }
112
  }
113
  }
114
  else if (is_wp_error($response)) {
115
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
116
  }
117
  else if (400 == wp_remote_retrieve_response_code($response)) {
118
+ $arr[$wp_id]['upload_document'] = sprintf(
119
+ __('There was an error uploading WordPress item %1$s', 'wp-lingotek'), $wp_id
120
+ );
121
  }
122
  update_option('lingotek_log_errors', $arr);
123
  }
152
  }
153
  }
154
  else if (is_wp_error($response)) {
155
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
156
  }
157
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
158
+ $arr[$wp_id]['patch_document'] = sprintf(
159
+ __('There was an error updating WordPress item %1$s', 'wp-lingotek') ,$wp_id
160
+ );
161
  }
162
  update_option('lingotek_log_errors', $arr);
163
  }
225
  }
226
  }
227
  else if (is_wp_error($response)) {
228
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
229
  }
230
  else if (400 == wp_remote_retrieve_response_code($response)) {
231
+ $arr[$wp_id]['document_exists'] = sprintf(
232
+ __('There was an error updating the translations status for WordPress item %1$s', 'wp-lingotek'), $wp_id
233
+ );
234
  }
235
  update_option('lingotek_log_errors', $arr);
236
  }
264
  }
265
  }
266
  else if (is_wp_error($response)) {
267
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
268
  }
269
  else if (400 == wp_remote_retrieve_response_code($response)) {
270
+ $arr[$wp_id]['get_translations_status'] = sprintf(
271
+ __('There was an error updating the translations status for WordPress item %1$s', 'wp-lingotek'), $wp_id
272
+ );
273
  }
274
  update_option('lingotek_log_errors', $arr);
275
  }
305
  }
306
  }
307
  else if (is_wp_error($response)) {
308
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
309
  }
310
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
311
+ $arr[$wp_id]['request_translation'][$locale] = sprintf(
312
+ __('There was an error requesting translation %1$s for WordPress item %2$s', 'wp-lingotek'), $locale, $wp_id
313
+ );
314
  }
315
  update_option('lingotek_log_errors', $arr);
316
  }
343
  }
344
  }
345
  else if (is_wp_error($response)) {
346
+ $arr[$wp_id]['wp_error'] = __('Make sure you have internet connectivity', 'wp-lingotek');
347
  }
348
  else if (400 == wp_remote_retrieve_response_code($response) || 404 == wp_remote_retrieve_response_code($response)) {
349
+ $arr[$wp_id]['get_translation'][$locale] = sprintf(
350
+ __('There was an error downloading translation %1$s for WordPress item %2$s'), $locale, $wp_id
351
+ );
352
  }
353
  update_option('lingotek_log_errors', $arr);
354
  }
include/group-post.php CHANGED
@@ -63,7 +63,7 @@ class Lingotek_Group_Post extends Lingotek_Group {
63
  // add the custom fields from the lingotek_custom_fields option
64
  $custom_fields = get_option('lingotek_custom_fields', array());
65
 
66
- if (isset($custom_fields)) {
67
  foreach ($custom_fields as $cf => $setting) {
68
  if ('translate' == $setting)
69
  $arr['metas'][$cf] = $cf;
63
  // add the custom fields from the lingotek_custom_fields option
64
  $custom_fields = get_option('lingotek_custom_fields', array());
65
 
66
+ if (!empty($custom_fields)) {
67
  foreach ($custom_fields as $cf => $setting) {
68
  if ('translate' == $setting)
69
  $arr['metas'][$cf] = $cf;
lingotek.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin name: Lingotek Translation
4
  Plugin URI: http://lingotek.com/wordpress#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wplingotektranslationplugin
5
- Version: 1.1.5
6
  Author: Lingotek and Frédéric Demarle
7
  Author uri: http://lingotek.com
8
  Description: Lingotek offers convenient cloud-based localization and translation.
@@ -15,7 +15,7 @@ GitHub Plugin URI: https://github.com/lingotek/wp-lingotek
15
  if (!function_exists('add_action'))
16
  exit();
17
 
18
- define('LINGOTEK_VERSION', '1.1.5'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.7.4.2');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'wp-lingotek');// plugin slug (should match above meta: Text Domain)
@@ -585,22 +585,4 @@ class Lingotek {
585
  }
586
  }
587
 
588
- // Helpers - development functions
589
- if (!function_exists('dc')) {
590
- function dc($data, $label = NULL, $die = FALSE) {
591
- echo '<pre style="background: #f3f3f3; color: #000">';
592
- if (is_string($label))
593
- echo '<h1>' . $label . '</h1>';
594
- print_r($data);
595
- echo '</pre>';
596
- if ($die || (is_bool($label) && $label))
597
- die();
598
- }
599
- }
600
- if (!function_exists('dd')) {
601
- function dd($data, $label = NULL, $die = FALSE) {
602
- return dc($data, $label, TRUE);
603
- }
604
- }
605
-
606
  $GLOBALS['wp_lingotek'] = Lingotek::get_instance();
2
  /*
3
  Plugin name: Lingotek Translation
4
  Plugin URI: http://lingotek.com/wordpress#utm_source=wpadmin&utm_medium=plugin&utm_campaign=wplingotektranslationplugin
5
+ Version: 1.1.6
6
  Author: Lingotek and Frédéric Demarle
7
  Author uri: http://lingotek.com
8
  Description: Lingotek offers convenient cloud-based localization and translation.
15
  if (!function_exists('add_action'))
16
  exit();
17
 
18
+ define('LINGOTEK_VERSION', '1.1.6'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.7.4.2');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'wp-lingotek');// plugin slug (should match above meta: Text Domain)
585
  }
586
  }
587
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
  $GLOBALS['wp_lingotek'] = Lingotek::get_instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://lingotek.com/
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.3
7
- Stable tag: 1.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,11 @@ For more, visit the [Lingotek documentation site](https://lingotek.atlassian.net
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
125
  = 1.1.5 (2015-10-9) =
126
 
127
  * Fixed some minor bugs related to error reporting
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.3
7
+ Stable tag: 1.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 1.1.6 (2015-10-30) =
126
+
127
+ * Removed debugging code that was causing conflicts with other plugins and themes
128
+ * Other minor bug fixes
129
+
130
  = 1.1.5 (2015-10-9) =
131
 
132
  * Fixed some minor bugs related to error reporting