Version Description
- Fixed bug not being able to disable block crawlers option
- Improved UI on settings navigation tab
- Added extra information about how Deepl usage is paid
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | TranslatePress – Translate Multilingual sites |
Version | 1.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.2 to 1.6.3
- class-translate-press.php +1 -1
- includes/class-machine-translation-tab.php +10 -0
- includes/class-machine-translator-logger.php +6 -0
- includes/class-settings.php +5 -0
- index.php +1 -1
- languages/translatepress-multilingual.catalog.php +1 -0
- languages/translatepress-multilingual.pot +23 -19
- partials/machine-translation-settings-page.php +1 -0
- partials/settings-navigation-tabs.php +2 -2
- readme.txt +7 -2
class-translate-press.php
CHANGED
@@ -52,7 +52,7 @@ class TRP_Translate_Press{
|
|
52 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
53 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
54 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
55 |
-
define( 'TRP_PLUGIN_VERSION', '1.6.
|
56 |
|
57 |
wp_cache_add_non_persistent_groups(array('trp'));
|
58 |
|
52 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
53 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
54 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
55 |
+
define( 'TRP_PLUGIN_VERSION', '1.6.3' );
|
56 |
|
57 |
wp_cache_add_non_persistent_groups(array('trp'));
|
58 |
|
includes/class-machine-translation-tab.php
CHANGED
@@ -65,6 +65,16 @@ class TRP_Machine_Translation_Tab {
|
|
65 |
else
|
66 |
$mt_settings['machine-translation'] = 'no';
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
return apply_filters( 'trp_machine_translation_sanitize_settings', $mt_settings );
|
69 |
}
|
70 |
|
65 |
else
|
66 |
$mt_settings['machine-translation'] = 'no';
|
67 |
|
68 |
+
if( !empty( $mt_settings['translation-engine'] ) )
|
69 |
+
$mt_settings['translation-engine'] = sanitize_text_field( $mt_settings['translation-engine'] );
|
70 |
+
else
|
71 |
+
$mt_settings['translation-engine'] = 'google_translate_v2';
|
72 |
+
|
73 |
+
if( !empty( $mt_settings['block-crawlers'] ) )
|
74 |
+
$mt_settings['block-crawlers'] = sanitize_text_field( $mt_settings['block-crawlers'] );
|
75 |
+
else
|
76 |
+
$mt_settings['block-crawlers'] = 'no';
|
77 |
+
|
78 |
return apply_filters( 'trp_machine_translation_sanitize_settings', $mt_settings );
|
79 |
}
|
80 |
|
includes/class-machine-translator-logger.php
CHANGED
@@ -156,6 +156,12 @@ class TRP_Machine_Translator_Logger {
|
|
156 |
if( isset( $machine_translation_settings['machine_translation_counter_date'] ) )
|
157 |
$mt_settings['machine_translation_counter_date'] = $machine_translation_settings['machine_translation_counter_date'];
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
return $mt_settings;
|
160 |
}
|
161 |
}
|
156 |
if( isset( $machine_translation_settings['machine_translation_counter_date'] ) )
|
157 |
$mt_settings['machine_translation_counter_date'] = $machine_translation_settings['machine_translation_counter_date'];
|
158 |
|
159 |
+
if( !empty( $mt_settings['machine_translation_log'] ) )
|
160 |
+
$mt_settings['machine_translation_log'] = sanitize_text_field( $mt_settings['machine_translation_log'] );
|
161 |
+
else
|
162 |
+
$mt_settings['machine_translation_log'] = 'no';
|
163 |
+
|
164 |
+
|
165 |
return $mt_settings;
|
166 |
}
|
167 |
}
|
includes/class-settings.php
CHANGED
@@ -337,6 +337,11 @@ class TRP_Settings{
|
|
337 |
'machine_translation_counter_date' => date ("Y-m-d" ),
|
338 |
'machine_translation_counter' => 0,
|
339 |
'machine_translation_limit' => 1000000
|
|
|
|
|
|
|
|
|
|
|
340 |
));
|
341 |
}
|
342 |
|
337 |
'machine_translation_counter_date' => date ("Y-m-d" ),
|
338 |
'machine_translation_counter' => 0,
|
339 |
'machine_translation_limit' => 1000000
|
340 |
+
/*
|
341 |
+
* These settings are merged into the saved DB option.
|
342 |
+
* Be sure to set any checkboxes options to 'no' in sanitize_settings.
|
343 |
+
* Unchecked checkboxes don't have a POST value when saving settings so they will be overwritten by merging.
|
344 |
+
*/
|
345 |
));
|
346 |
}
|
347 |
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: TranslatePress - Multilingual
|
4 |
Plugin URI: https://translatepress.com/
|
5 |
Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
|
6 |
-
Version: 1.6.
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
3 |
Plugin Name: TranslatePress - Multilingual
|
4 |
Plugin URI: https://translatepress.com/
|
5 |
Description: Experience a better way of translating your WordPress site using a visual front-end translation editor, with full support for WooCommerce and site builders.
|
6 |
+
Version: 1.6.3
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
languages/translatepress-multilingual.catalog.php
CHANGED
@@ -185,6 +185,7 @@
|
|
185 |
<?php __("Choose which engine you want to use in order to automatically translate your website.", "translatepress-multilingual"); ?>
|
186 |
<?php __("<strong>DeepL</strong> automatic translation is available as a premium add-on in <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>", "translatepress-multilingual"); ?>
|
187 |
<?php __("By upgrading you'll get access to all paid add-ons, premium support and help fund the future development of TranslatePress.", "translatepress-multilingual"); ?>
|
|
|
188 |
<?php __("Test API credentials", "translatepress-multilingual"); ?>
|
189 |
<?php __("Click here to check if the selected translation engine is configured correctly.", "translatepress-multilingual"); ?>
|
190 |
<?php __("Block Crawlers", "translatepress-multilingual"); ?>
|
185 |
<?php __("Choose which engine you want to use in order to automatically translate your website.", "translatepress-multilingual"); ?>
|
186 |
<?php __("<strong>DeepL</strong> automatic translation is available as a premium add-on in <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>", "translatepress-multilingual"); ?>
|
187 |
<?php __("By upgrading you'll get access to all paid add-ons, premium support and help fund the future development of TranslatePress.", "translatepress-multilingual"); ?>
|
188 |
+
<?php __("Please note that DeepL API usage is paid separately. See <a href=\"https://www.deepl.com/pro.html#developer\">DeepL pricing information</a>.", "translatepress-multilingual"); ?>
|
189 |
<?php __("Test API credentials", "translatepress-multilingual"); ?>
|
190 |
<?php __("Click here to check if the selected translation engine is configured correctly.", "translatepress-multilingual"); ?>
|
191 |
<?php __("Block Crawlers", "translatepress-multilingual"); ?>
|
languages/translatepress-multilingual.pot
CHANGED
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
-
#: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:
|
17 |
msgid "Error! Duplicate URL slug values."
|
18 |
msgstr ""
|
19 |
|
@@ -125,7 +125,7 @@ msgstr ""
|
|
125 |
msgid "Advanced"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: ../translatepress/includes/class-advanced-tab.php:216, ../translatepress/partials/machine-translation-settings-page.php:13, ../translatepress/partials/machine-translation-settings-page.php:
|
129 |
msgid "Yes"
|
130 |
msgstr ""
|
131 |
|
@@ -185,7 +185,7 @@ msgstr ""
|
|
185 |
msgid "Automatic Translation"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: ../translatepress/includes/class-machine-translation-tab.php:
|
189 |
msgid "DeepL"
|
190 |
msgstr ""
|
191 |
|
@@ -253,31 +253,31 @@ msgstr ""
|
|
253 |
msgid "Top Left"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: ../translatepress/includes/class-settings.php:
|
257 |
msgid "Current Language"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: ../translatepress/includes/class-settings.php:
|
261 |
msgid "General"
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: ../translatepress/includes/class-settings.php:
|
265 |
msgid "Translate Site"
|
266 |
msgstr ""
|
267 |
|
268 |
-
#: ../translatepress/includes/class-settings.php:
|
269 |
msgid "Addons"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: ../translatepress/includes/class-settings.php:
|
273 |
msgid "License"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: ../translatepress/includes/class-settings.php:
|
277 |
msgid "Settings"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: ../translatepress/includes/class-settings.php:
|
281 |
msgid "Pro Features"
|
282 |
msgstr ""
|
283 |
|
@@ -757,39 +757,43 @@ msgstr ""
|
|
757 |
msgid "By upgrading you'll get access to all paid add-ons, premium support and help fund the future development of TranslatePress."
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
|
|
|
|
|
|
|
|
761 |
msgid "Test API credentials"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
765 |
msgid "Click here to check if the selected translation engine is configured correctly."
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
769 |
msgid "Block Crawlers"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
773 |
msgid "Block crawlers from triggering automatic translations on your website."
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
777 |
msgid "Limit machine translation / characters per day"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
781 |
msgid "Add a limit to the number of automatically translated characters so you can better budget your project."
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
785 |
msgid "Today's character count:"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
789 |
msgid "Log machine translation queries."
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: ../translatepress/partials/machine-translation-settings-page.php:
|
793 |
msgid "Only enable for testing purposes. Can impact performance.<br>All records are stored in the wp_trp_machine_translation_log database table. Use a plugin like <a href=\"https://wordpress.org/plugins/wp-data-access/\">WP Data Access</a> to browse the logs or directly from your database manager (PHPMyAdmin, etc.)"
|
794 |
msgstr ""
|
795 |
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
+
#: ../tp-add-on-extra-languages/class-extra-languages.php:57, ../translatepress/includes/class-settings.php:374
|
17 |
msgid "Error! Duplicate URL slug values."
|
18 |
msgstr ""
|
19 |
|
125 |
msgid "Advanced"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: ../translatepress/includes/class-advanced-tab.php:216, ../translatepress/partials/machine-translation-settings-page.php:13, ../translatepress/partials/machine-translation-settings-page.php:78, ../translatepress/partials/machine-translation-settings-page.php:111, ../translatepress/partials/main-settings-page.php:41, ../translatepress/partials/main-settings-page.php:54, ../translatepress/partials/main-settings-page.php:67
|
129 |
msgid "Yes"
|
130 |
msgstr ""
|
131 |
|
185 |
msgid "Automatic Translation"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: ../translatepress/includes/class-machine-translation-tab.php:129
|
189 |
msgid "DeepL"
|
190 |
msgstr ""
|
191 |
|
253 |
msgid "Top Left"
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: ../translatepress/includes/class-settings.php:410
|
257 |
msgid "Current Language"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: ../translatepress/includes/class-settings.php:451
|
261 |
msgid "General"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: ../translatepress/includes/class-settings.php:456, ../translatepress/includes/class-translation-manager.php:244
|
265 |
msgid "Translate Site"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: ../translatepress/includes/class-settings.php:461
|
269 |
msgid "Addons"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: ../translatepress/includes/class-settings.php:469
|
273 |
msgid "License"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: ../translatepress/includes/class-settings.php:497, ../translatepress/includes/class-translation-manager.php:276
|
277 |
msgid "Settings"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: ../translatepress/includes/class-settings.php:501
|
281 |
msgid "Pro Features"
|
282 |
msgstr ""
|
283 |
|
757 |
msgid "By upgrading you'll get access to all paid add-ons, premium support and help fund the future development of TranslatePress."
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:49
|
761 |
+
msgid "Please note that DeepL API usage is paid separately. See <a href=\"https://www.deepl.com/pro.html#developer\">DeepL pricing information</a>."
|
762 |
+
msgstr ""
|
763 |
+
|
764 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:63
|
765 |
msgid "Test API credentials"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:65
|
769 |
msgid "Click here to check if the selected translation engine is configured correctly."
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:74
|
773 |
msgid "Block Crawlers"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:81
|
777 |
msgid "Block crawlers from triggering automatic translations on your website."
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:87
|
781 |
msgid "Limit machine translation / characters per day"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:93
|
785 |
msgid "Add a limit to the number of automatically translated characters so you can better budget your project."
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:99
|
789 |
msgid "Today's character count:"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:107
|
793 |
msgid "Log machine translation queries."
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: ../translatepress/partials/machine-translation-settings-page.php:114
|
797 |
msgid "Only enable for testing purposes. Can impact performance.<br>All records are stored in the wp_trp_machine_translation_log database table. Use a plugin like <a href=\"https://wordpress.org/plugins/wp-data-access/\">WP Data Access</a> to browse the logs or directly from your database manager (PHPMyAdmin, etc.)"
|
798 |
msgstr ""
|
799 |
|
partials/machine-translation-settings-page.php
CHANGED
@@ -46,6 +46,7 @@
|
|
46 |
$url = trp_add_affiliate_id_to_link('https://translatepress.com/?utm_source=wpbackend&utm_medium=clientsite&utm_content=deepl_upsell&utm_campaign=tpfree');
|
47 |
$lnk = sprintf( wp_kses( __( '<strong>DeepL</strong> automatic translation is available as a premium add-on in <a href="%s" class="button button-primary" target="_blank" title="TranslatePress Pro">TranslatePress PRO</a>', 'translatepress-multilingual' ), array( 'strong' => array(), 'br' => array(), 'a' => array( 'href' => array(), 'title' => array(), 'target'=> array(), 'class' => array() ) ) ), esc_url( $url ) );
|
48 |
$lnk .= '<br/>' . __( 'By upgrading you\'ll get access to all paid add-ons, premium support and help fund the future development of TranslatePress.', 'translatepress-multilingual' );
|
|
|
49 |
echo $lnk;
|
50 |
?>
|
51 |
</p>
|
46 |
$url = trp_add_affiliate_id_to_link('https://translatepress.com/?utm_source=wpbackend&utm_medium=clientsite&utm_content=deepl_upsell&utm_campaign=tpfree');
|
47 |
$lnk = sprintf( wp_kses( __( '<strong>DeepL</strong> automatic translation is available as a premium add-on in <a href="%s" class="button button-primary" target="_blank" title="TranslatePress Pro">TranslatePress PRO</a>', 'translatepress-multilingual' ), array( 'strong' => array(), 'br' => array(), 'a' => array( 'href' => array(), 'title' => array(), 'target'=> array(), 'class' => array() ) ) ), esc_url( $url ) );
|
48 |
$lnk .= '<br/>' . __( 'By upgrading you\'ll get access to all paid add-ons, premium support and help fund the future development of TranslatePress.', 'translatepress-multilingual' );
|
49 |
+
$lnk .= '<br/>' . __( 'Please note that DeepL API usage is paid separately. See <a href="https://www.deepl.com/pro.html#developer">DeepL pricing information</a>.', 'translatepress-multilingual' );
|
50 |
echo $lnk;
|
51 |
?>
|
52 |
</p>
|
partials/settings-navigation-tabs.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
<
|
2 |
<?php
|
3 |
foreach( $tabs as $tb ) {
|
4 |
echo '<a href="' . esc_url( $tb['url'] ) . '" '. ( $tb['page'] == 'trp_translation_editor' ? 'target="_blank"' : '' ) .' class="nav-tab ' . ( ( $active_tab == $tb['page'] ) ? 'nav-tab-active' : '' ) . ( ( $tb['page'] == 'trp_translation_editor' ) ? 'trp-translation-editor' : '' ) . '">' . esc_html( $tb['name'] ) . '</a>';
|
5 |
}
|
6 |
?>
|
7 |
-
</
|
1 |
+
<h2 class="nav-tab-wrapper">
|
2 |
<?php
|
3 |
foreach( $tabs as $tb ) {
|
4 |
echo '<a href="' . esc_url( $tb['url'] ) . '" '. ( $tb['page'] == 'trp_translation_editor' ? 'target="_blank"' : '' ) .' class="nav-tab ' . ( ( $active_tab == $tb['page'] ) ? 'nav-tab-active' : '' ) . ( ( $tb['page'] == 'trp_translation_editor' ) ? 'trp-translation-editor' : '' ) . '">' . esc_html( $tb['name'] ) . '</a>';
|
5 |
}
|
6 |
?>
|
7 |
+
</h2>
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: cozmoslabs, razvan.mo, madalin.ungureanu, cristophor
|
|
3 |
Donate link: https://www.translatepress.com/
|
4 |
Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
|
5 |
Requires at least: 3.1.0
|
6 |
-
Tested up to: 5.3
|
7 |
Requires PHP: 5.6.20
|
8 |
-
Stable tag: 1.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -143,6 +143,11 @@ For more information please check out [TranslatePress - Multilingual plugin docu
|
|
143 |
|
144 |
|
145 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
146 |
= 1.6.2 =
|
147 |
* Fixed admin-bar appearing in translation editor
|
148 |
* Nextgen plugin compatibility fix
|
3 |
Donate link: https://www.translatepress.com/
|
4 |
Tags: translate, translation, multilingual, automatic translation, bilingual, front-end translation, google translate, language
|
5 |
Requires at least: 3.1.0
|
6 |
+
Tested up to: 5.3.1
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 1.6.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
143 |
|
144 |
|
145 |
== Changelog ==
|
146 |
+
= 1.6.3 =
|
147 |
+
* Fixed bug not being able to disable block crawlers option
|
148 |
+
* Improved UI on settings navigation tab
|
149 |
+
* Added extra information about how Deepl usage is paid
|
150 |
+
|
151 |
= 1.6.2 =
|
152 |
* Fixed admin-bar appearing in translation editor
|
153 |
* Nextgen plugin compatibility fix
|