Version Description
(2015-10-5) =
- Fixed a bug that prevented the ability to add new Translation profiles
Download this release
Release Info
Developer | erichie |
Plugin | Lingotek Translation |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- admin/manage/view-profiles.php +1 -1
- lingotek.php +28 -2
- readme.txt +5 -1
admin/manage/view-profiles.php
CHANGED
@@ -28,7 +28,7 @@ if (!empty($_POST)) {
|
|
28 |
add_settings_error('lingotek_profile', 'default', __('You must provide a name for your translation profile.', 'wp-lingotek'), 'error');
|
29 |
}
|
30 |
else {
|
31 |
-
$profile_id =
|
32 |
$profiles[$profile_id]['profile'] = $profile_id;
|
33 |
if (!empty($_POST['name']))
|
34 |
$profiles[$profile_id]['name'] = strip_tags($_POST['name']);
|
28 |
add_settings_error('lingotek_profile', 'default', __('You must provide a name for your translation profile.', 'wp-lingotek'), 'error');
|
29 |
}
|
30 |
else {
|
31 |
+
$profile_id = empty($_POST['profile']) ? uniqid(rand()) : $_POST['profile'];
|
32 |
$profiles[$profile_id]['profile'] = $profile_id;
|
33 |
if (!empty($_POST['name']))
|
34 |
$profiles[$profile_id]['name'] = strip_tags($_POST['name']);
|
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.
|
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.
|
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)
|
@@ -231,7 +231,32 @@ class Lingotek {
|
|
231 |
* @return array
|
232 |
*/
|
233 |
public static function get_profiles() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
$profiles = get_option('lingotek_profiles');
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
|
236 |
//localize canned profile names
|
237 |
foreach($profiles as $k=>$v){
|
@@ -241,6 +266,7 @@ class Lingotek {
|
|
241 |
}
|
242 |
}
|
243 |
|
|
|
244 |
return $profiles;
|
245 |
}
|
246 |
|
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.4
|
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.4'); // 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)
|
231 |
* @return array
|
232 |
*/
|
233 |
public static function get_profiles() {
|
234 |
+
$default_profiles = array(
|
235 |
+
'automatic' => array(
|
236 |
+
'profile' => 'automatic',
|
237 |
+
'name' => __('Automatic', 'wp-lingotek'),
|
238 |
+
'upload' => 'automatic',
|
239 |
+
'download' => 'automatic'
|
240 |
+
),
|
241 |
+
'manual' => array(
|
242 |
+
'profile' => 'manual',
|
243 |
+
'name' => __('Manual', 'wp-lingotek'),
|
244 |
+
'upload' => 'manual',
|
245 |
+
'download' => 'manual'
|
246 |
+
),
|
247 |
+
'disabled' => array(
|
248 |
+
'profile' => 'disabled',
|
249 |
+
'name' => __('Disabled', 'wp-lingotek'),
|
250 |
+
),
|
251 |
+
);
|
252 |
+
|
253 |
$profiles = get_option('lingotek_profiles');
|
254 |
+
if (is_array($profiles)) {
|
255 |
+
$profiles = array_merge($default_profiles, $profiles);
|
256 |
+
}
|
257 |
+
else {
|
258 |
+
$profiles = $default_profiles;
|
259 |
+
}
|
260 |
|
261 |
//localize canned profile names
|
262 |
foreach($profiles as $k=>$v){
|
266 |
}
|
267 |
}
|
268 |
|
269 |
+
update_option('lingotek_profiles', $profiles);
|
270 |
return $profiles;
|
271 |
}
|
272 |
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -118,6 +118,10 @@ For more, visit the [Lingotek documentation site](https://lingotek.atlassian.net
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
121 |
= 1.1.3 (2015-10-2) =
|
122 |
|
123 |
* Greatly improved API 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.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.1.4 (2015-10-5) =
|
122 |
+
|
123 |
+
* Fixed a bug that prevented the ability to add new Translation profiles
|
124 |
+
|
125 |
= 1.1.3 (2015-10-2) =
|
126 |
|
127 |
* Greatly improved API error reporting
|