Lingotek Translation - Version 1.2

Version Description

(2016-3-29) =

  • Fixed a bug that prevented the language of translated taxonomies to be set
  • Other minor fixes
Download this release

Release Info

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

Code changes from version 1.1.11 to 1.2

admin/filters-columns.php CHANGED
@@ -116,7 +116,7 @@ class Lingotek_Filters_Columns extends PLL_Admin_Filters_Columns {
116
  }
117
 
118
  // if language is set to copy and profile is manual
119
- elseif ((isset($source_profile['targets'][$language->slug]) && $source_profile['targets'][$language->slug] == 'copy') || (isset($profile['targets'][$language->slug]) && $profile['targets'][$language->slug] == 'copy') && isset($document->source)) {
120
  if (isset($document->desc_array[$language->slug])) {
121
  return 'post' == $type ? parent::post_column($column, $object_id) : parent::term_column('', $column, $object_id);
122
  }
116
  }
117
 
118
  // if language is set to copy and profile is manual
119
+ elseif (($type == 'post') && ((isset($source_profile['targets'][$language->slug]) && $source_profile['targets'][$language->slug] == 'copy') || (isset($profile['targets'][$language->slug]) && $profile['targets'][$language->slug] == 'copy') && isset($document->source))) {
120
  if (isset($document->desc_array[$language->slug])) {
121
  return 'post' == $type ? parent::post_column($column, $object_id) : parent::term_column('', $column, $object_id);
122
  }
include/group-post.php CHANGED
@@ -232,6 +232,7 @@ class Lingotek_Group_Post extends Lingotek_Group {
232
  * @return string json encoded content to translate
233
  */
234
  public static function get_content($post) {
 
235
  $fields = self::get_content_type_fields($post->post_type, $post->ID);
236
  $content_types = get_option('lingotek_content_type');
237
  foreach (array_keys($fields) as $key) {
232
  * @return string json encoded content to translate
233
  */
234
  public static function get_content($post) {
235
+ $arr = array();
236
  $fields = self::get_content_type_fields($post->post_type, $post->ID);
237
  $content_types = get_option('lingotek_content_type');
238
  foreach (array_keys($fields) as $key) {
include/model.php CHANGED
@@ -248,7 +248,7 @@ class Lingotek_Model {
248
  $new_term = wp_insert_term($cp_term['name'], $taxonomy, $cp_term);
249
 
250
  if (!is_wp_error($new_term)) {
251
- PLL()->model->post->set_language($new_term['term_id'], $cp_lang);
252
  wp_set_object_terms($new_term['term_id'], $document->term_id, 'term_translations');
253
  $document->desc_array[$target] = $new_term['term_id'];
254
  $document->save();
248
  $new_term = wp_insert_term($cp_term['name'], $taxonomy, $cp_term);
249
 
250
  if (!is_wp_error($new_term)) {
251
+ PLL()->model->term->set_language($new_term['term_id'], $cp_lang);
252
  wp_set_object_terms($new_term['term_id'], $document->term_id, 'term_translations');
253
  $document->desc_array[$target] = $new_term['term_id'];
254
  $document->save();
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.11
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/lingotek-translation
15
  if (!function_exists('add_action'))
16
  exit();
17
 
18
- define('LINGOTEK_VERSION', '1.1.11'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.8');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'lingotek-translation');// plugin slug (should match above meta: Text Domain)
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.2
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.2'); // plugin version (should match above meta)
19
  define('LINGOTEK_MIN_PLL_VERSION', '1.8');
20
  define('LINGOTEK_BASENAME', plugin_basename(__FILE__)); // plugin name as known by WP
21
  define('LINGOTEK_PLUGIN_SLUG', 'lingotek-translation');// plugin slug (should match above meta: Text Domain)
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.4
7
- Stable tag: 1.1.11
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.11 (2016-2-16) =
126
 
127
  * Improved the copy source feature by allowing manual copying when using a manual Translation Profile
4
  Tags: automation, bilingual, international, language, Lingotek, localization, multilanguage, multilingual, translate, translation
5
  Requires at least: 3.8
6
  Tested up to: 4.4
7
+ Stable tag: 1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 1.2 (2016-3-29) =
126
+
127
+ * Fixed a bug that prevented the language of translated taxonomies to be set
128
+ * Other minor fixes
129
+
130
  = 1.1.11 (2016-2-16) =
131
 
132
  * Improved the copy source feature by allowing manual copying when using a manual Translation Profile