Version Description
- Fixed Exclude words from automatic translation when many excluded words are added
- Compatibility with WooCommerce Fondy payment gateway
- Added filter to allow disabling of error manager
- Fixed a bug where you couldn't deactivate a license to add a new one
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | TranslatePress – Translate Multilingual sites |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
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.5' );
|
56 |
|
57 |
wp_cache_add_non_persistent_groups(array('trp'));
|
58 |
|
includes/class-edd-sl-plugin-updater.php
CHANGED
@@ -793,7 +793,8 @@ class TRP_Plugin_Updater{
|
|
793 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
794 |
|
795 |
// $license_data->license will be either "deactivated" or "failed"
|
796 |
-
if
|
|
|
797 |
delete_option( 'trp_license_status' );
|
798 |
}
|
799 |
|
793 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
794 |
|
795 |
// $license_data->license will be either "deactivated" or "failed"
|
796 |
+
// regardless, we delete the record in the client website. Otherwise, if he tries to add a new license, he can't.
|
797 |
+
if( $license_data->license == 'deactivated' || $license_data->license == 'failed') {
|
798 |
delete_option( 'trp_license_status' );
|
799 |
}
|
800 |
|
includes/class-error-manager.php
CHANGED
@@ -12,6 +12,10 @@ class TRP_Error_Manager{
|
|
12 |
$this->settings = $settings;
|
13 |
}
|
14 |
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
* Record specified error in trp_db_errors option
|
17 |
*
|
@@ -21,6 +25,10 @@ class TRP_Error_Manager{
|
|
21 |
'disable_automatic_translations' => bool
|
22 |
*/
|
23 |
public function record_error( $error_details ){
|
|
|
|
|
|
|
|
|
24 |
$option = get_option('trp_db_errors', array(
|
25 |
'notifications' => array(),
|
26 |
'errors' => array()
|
@@ -106,6 +114,9 @@ class TRP_Error_Manager{
|
|
106 |
* Hooked to admin_init
|
107 |
*/
|
108 |
public function show_notification_about_errors(){
|
|
|
|
|
|
|
109 |
$option = get_option( 'trp_db_errors', false );
|
110 |
if ( $option !== false ) {
|
111 |
foreach( $option['notifications'] as $logged_notification ) {
|
12 |
$this->settings = $settings;
|
13 |
}
|
14 |
|
15 |
+
public function is_error_manager_disabled(){
|
16 |
+
return apply_filters( 'trp_disable_error_manager', false );
|
17 |
+
}
|
18 |
+
|
19 |
/**
|
20 |
* Record specified error in trp_db_errors option
|
21 |
*
|
25 |
'disable_automatic_translations' => bool
|
26 |
*/
|
27 |
public function record_error( $error_details ){
|
28 |
+
if ( $this->is_error_manager_disabled() ){
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
$option = get_option('trp_db_errors', array(
|
33 |
'notifications' => array(),
|
34 |
'errors' => array()
|
114 |
* Hooked to admin_init
|
115 |
*/
|
116 |
public function show_notification_about_errors(){
|
117 |
+
if ( $this->is_error_manager_disabled() ){
|
118 |
+
return;
|
119 |
+
}
|
120 |
$option = get_option( 'trp_db_errors', false );
|
121 |
if ( $option !== false ) {
|
122 |
foreach( $option['notifications'] as $logged_notification ) {
|
includes/class-machine-translator.php
CHANGED
@@ -139,7 +139,7 @@ class TRP_Machine_Translator {
|
|
139 |
private function get_placeholders( $count ){
|
140 |
$placeholders = array();
|
141 |
for( $i = 1 ; $i <= $count; $i++ ){
|
142 |
-
$placeholders[] = '1TP' . $i;
|
143 |
}
|
144 |
return $placeholders;
|
145 |
}
|
139 |
private function get_placeholders( $count ){
|
140 |
$placeholders = array();
|
141 |
for( $i = 1 ; $i <= $count; $i++ ){
|
142 |
+
$placeholders[] = '1TP' . $i . 'T';
|
143 |
}
|
144 |
return $placeholders;
|
145 |
}
|
includes/compatibility-functions.php
CHANGED
@@ -505,3 +505,20 @@ function trp_woo_checkout_exclude_strings( $return, $translation, $text, $domain
|
|
505 |
}
|
506 |
return $return;
|
507 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
}
|
506 |
return $return;
|
507 |
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Compatibility with WooCommerce Fondy Payment gateway
|
511 |
+
*/
|
512 |
+
add_action('init', 'trp_woo_fondy_payment_gateway_add_gettext_filter');
|
513 |
+
function trp_woo_fondy_payment_gateway_add_gettext_filter(){
|
514 |
+
if ( class_exists( 'WC_fondy' ) ){
|
515 |
+
add_filter('gettext', 'trp_woo_fondy_payment_gateway_exclude_gettext_strings', 1000, 3 );
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
function trp_woo_fondy_payment_gateway_exclude_gettext_strings($translation, $text, $domain){
|
520 |
+
if ( $domain == 'fondy-woocommerce-payment-gateway' && $text == 'Order: ' ){
|
521 |
+
return TRP_Translation_Manager::strip_gettext_tags( $translation );
|
522 |
+
}
|
523 |
+
return $translation;
|
524 |
+
}
|
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.5
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
languages/translatepress-multilingual.pot
CHANGED
@@ -169,15 +169,15 @@ msgstr ""
|
|
169 |
msgid "Others"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: ../translatepress/includes/class-error-manager.php:
|
173 |
msgid "<strong>TranslatePress</strong> encountered SQL errors. <a href=\"%s\" title=\"View TranslatePress SQL Errors\">Check out the errors</a>."
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: ../translatepress/includes/class-error-manager.php:
|
177 |
msgid "Automatic translation has been disabled."
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: ../translatepress/includes/class-error-manager.php:
|
181 |
msgid "Dismiss this notice."
|
182 |
msgstr ""
|
183 |
|
169 |
msgid "Others"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: ../translatepress/includes/class-error-manager.php:50
|
173 |
msgid "<strong>TranslatePress</strong> encountered SQL errors. <a href=\"%s\" title=\"View TranslatePress SQL Errors\">Check out the errors</a>."
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: ../translatepress/includes/class-error-manager.php:59
|
177 |
msgid "Automatic translation has been disabled."
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: ../translatepress/includes/class-error-manager.php:129, ../translatepress/includes/class-plugin-notices.php:340, ../translatepress/includes/class-plugin-notices.php:371, ../translatepress/includes/class-plugin-notices.php:390, ../translatepress/includes/class-plugin-notices.php:404, ../translatepress/includes/class-plugin-notices.php:429
|
181 |
msgid "Dismiss this notice."
|
182 |
msgstr ""
|
183 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: translate, translation, multilingual, automatic translation, bilingual, fr
|
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.3.2
|
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,12 @@ For more information please check out [TranslatePress - Multilingual plugin docu
|
|
143 |
|
144 |
|
145 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
= 1.6.4 =
|
147 |
* Added a conditional Elementor block for language.
|
148 |
* Fixed Google Translate breaking some characters such as & #8220;
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.3.2
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 1.6.5
|
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.5 =
|
147 |
+
* Fixed Exclude words from automatic translation when many excluded words are added
|
148 |
+
* Compatibility with WooCommerce Fondy payment gateway
|
149 |
+
* Added filter to allow disabling of error manager
|
150 |
+
* Fixed a bug where you couldn't deactivate a license to add a new one
|
151 |
+
|
152 |
= 1.6.4 =
|
153 |
* Added a conditional Elementor block for language.
|
154 |
* Fixed Google Translate breaking some characters such as & #8220;
|