Version Description
- Fixed information disclosure security issue through url_addon/debug.txt
- Added admin notification when translation debug mode is on
- Fixed typo in Irish language name in native alphabet
- Added is_readable check for config.php file before modifying it
- Added conflict notice for WPML Multilingual CMS plugin
Download this release
Release Info
| Developer | edo888 |
| Plugin | |
| Version | 2.9.9 |
| Comparing to | |
| See all releases | |
Code changes from version 2.9.8 to 2.9.9
- gtranslate-notices.css +1 -0
- gtranslate.php +33 -4
- native_names_map.php +1 -1
- readme.txt +8 -1
- url_addon/config.php +3 -0
- url_addon/gtranslate-email.php +1 -1
- url_addon/gtranslate.php +1 -1
gtranslate-notices.css
CHANGED
|
@@ -49,6 +49,7 @@
|
|
| 49 |
}
|
| 50 |
.gt-notice-body .dashicons {
|
| 51 |
font-size: 17px;
|
|
|
|
| 52 |
}
|
| 53 |
.gt-red {
|
| 54 |
color: #ED494D;
|
| 49 |
}
|
| 50 |
.gt-notice-body .dashicons {
|
| 51 |
font-size: 17px;
|
| 52 |
+
vertical-align: middle;
|
| 53 |
}
|
| 54 |
.gt-red {
|
| 55 |
color: #ED494D;
|
gtranslate.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
| 5 |
Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
|
| 6 |
-
Version: 2.9.
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
| 9 |
Text Domain: gtranslate
|
|
@@ -82,7 +82,7 @@ class GTranslate extends WP_Widget {
|
|
| 82 |
|
| 83 |
if($main_lang != $data['default_language']) { // update main_lang in config.php
|
| 84 |
$config_file = dirname(__FILE__) . '/url_addon/config.php';
|
| 85 |
-
if(is_writable($config_file)) {
|
| 86 |
$config = file_get_contents($config_file);
|
| 87 |
$config = preg_replace('/\$main_lang = \'[a-z-]{2,5}\'/i', '$main_lang = \''.$data['default_language'].'\'', $config);
|
| 88 |
file_put_contents($config_file, $config);
|
|
@@ -1688,7 +1688,7 @@ EOT;
|
|
| 1688 |
|
| 1689 |
// update main_lang in config.php
|
| 1690 |
$config_file = dirname(__FILE__) . '/url_addon/config.php';
|
| 1691 |
-
if(is_writable($config_file)) {
|
| 1692 |
$config = file_get_contents($config_file);
|
| 1693 |
$config = preg_replace('/\$main_lang = \'[a-z-]{2,5}\'/i', '$main_lang = \''.$data['default_language'].'\'', $config);
|
| 1694 |
file_put_contents($config_file, $config);
|
|
@@ -2036,7 +2036,7 @@ class GTranslate_Notices {
|
|
| 2036 |
|
| 2037 |
public function gt_admin_notices() {
|
| 2038 |
|
| 2039 |
-
$deactivate_plugins= array('WP Translator' => 'wptranslator/WPTranslator.php', 'TranslatePress' => 'translatepress-multilingual/index.php', 'Google Language Translator' => 'google-language-translator/google-language-translator.php', 'Google Website Translator' => 'google-website-translator/google-website-translator.php', 'Weglot' => 'weglot/weglot.php', 'TransPosh' => 'transposh-translation-filter-for-wordpress/transposh.php', 'Advanced Google Translate' => 'advanced-google-translate/advanced-google-translate.php', 'My WP Translate' => 'my-wp-translate/my-wp-translate.php');
|
| 2040 |
foreach($deactivate_plugins as $name => $plugin_file) {
|
| 2041 |
if(is_plugin_active($plugin_file)) {
|
| 2042 |
$deactivate_link = wp_nonce_url('plugins.php?action=deactivate&plugin='.urlencode($plugin_file ).'&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $plugin_file);
|
|
@@ -2080,6 +2080,35 @@ class GTranslate_Notices {
|
|
| 2080 |
$data = get_option('GTranslate');
|
| 2081 |
GTranslate::load_defaults($data);
|
| 2082 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2083 |
$upgrade_tips_ignore = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'upgrade_tips')));
|
| 2084 |
$upgrade_tips_temp = esc_url(add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'upgrade_tips', 'gt_int' => 7)));
|
| 2085 |
|
| 3 |
Plugin Name: GTranslate
|
| 4 |
Plugin URI: https://gtranslate.io/?xyz=998
|
| 5 |
Description: Translate your website and make it multilingual. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support Forum</a>.
|
| 6 |
+
Version: 2.9.9
|
| 7 |
Author: Translate AI Multilingual Solutions
|
| 8 |
Author URI: https://gtranslate.io
|
| 9 |
Text Domain: gtranslate
|
| 82 |
|
| 83 |
if($main_lang != $data['default_language']) { // update main_lang in config.php
|
| 84 |
$config_file = dirname(__FILE__) . '/url_addon/config.php';
|
| 85 |
+
if(is_readable($config_file) and is_writable($config_file)) {
|
| 86 |
$config = file_get_contents($config_file);
|
| 87 |
$config = preg_replace('/\$main_lang = \'[a-z-]{2,5}\'/i', '$main_lang = \''.$data['default_language'].'\'', $config);
|
| 88 |
file_put_contents($config_file, $config);
|
| 1688 |
|
| 1689 |
// update main_lang in config.php
|
| 1690 |
$config_file = dirname(__FILE__) . '/url_addon/config.php';
|
| 1691 |
+
if(is_readable($config_file) and is_writable($config_file)) {
|
| 1692 |
$config = file_get_contents($config_file);
|
| 1693 |
$config = preg_replace('/\$main_lang = \'[a-z-]{2,5}\'/i', '$main_lang = \''.$data['default_language'].'\'', $config);
|
| 1694 |
file_put_contents($config_file, $config);
|
| 2036 |
|
| 2037 |
public function gt_admin_notices() {
|
| 2038 |
|
| 2039 |
+
$deactivate_plugins= array('WP Translator' => 'wptranslator/WPTranslator.php', 'TranslatePress' => 'translatepress-multilingual/index.php', 'Google Language Translator' => 'google-language-translator/google-language-translator.php', 'Google Website Translator' => 'google-website-translator/google-website-translator.php', 'Weglot' => 'weglot/weglot.php', 'TransPosh' => 'transposh-translation-filter-for-wordpress/transposh.php', 'Advanced Google Translate' => 'advanced-google-translate/advanced-google-translate.php', 'My WP Translate' => 'my-wp-translate/my-wp-translate.php', 'WPML Multilingual CMS' => 'sitepress-multilingual-cms/sitepress.php');
|
| 2040 |
foreach($deactivate_plugins as $name => $plugin_file) {
|
| 2041 |
if(is_plugin_active($plugin_file)) {
|
| 2042 |
$deactivate_link = wp_nonce_url('plugins.php?action=deactivate&plugin='.urlencode($plugin_file ).'&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $plugin_file);
|
| 2080 |
$data = get_option('GTranslate');
|
| 2081 |
GTranslate::load_defaults($data);
|
| 2082 |
|
| 2083 |
+
// check if email debug is on and add a notice
|
| 2084 |
+
if($data['email_translation_debug']) {
|
| 2085 |
+
$settings_link = admin_url('options-general.php?page=gtranslate_options');
|
| 2086 |
+
$view_debug_link = admin_url('plugin-editor.php?file=gtranslate%2Furl_addon%2Fdebug.txt&plugin=gtranslate%2Fgtranslate.php');
|
| 2087 |
+
$notices['gt_debug_notice'] = array(
|
| 2088 |
+
'title' => __('Email translation debug mode is ON.', 'gtranslate'),
|
| 2089 |
+
'msg' => __('Please note that sensitive information can be written into gtranslate/url_addon/debug.txt file, which can be accessed publicly. It is your responsibility to deny public access to it and clean debug information after you are done.', 'gtranslate'),
|
| 2090 |
+
'link' => '<li><span class="dashicons dashicons-admin-settings"></span><a href="'.$settings_link.'">' . __('GTranslate Settings', 'gtranslate') . '</a></li>' .
|
| 2091 |
+
'<li><span class="dashicons dashicons-visibility"></span><a href="'.$view_debug_link.'">' . __('View debug.txt', 'gtranslate') . '</a></li>',
|
| 2092 |
+
'dismissible' => false,
|
| 2093 |
+
'int' => 0
|
| 2094 |
+
);
|
| 2095 |
+
}
|
| 2096 |
+
|
| 2097 |
+
// check if translation debug is on and add a notice
|
| 2098 |
+
include dirname(__FILE__) . '/url_addon/config.php';
|
| 2099 |
+
if($debug) {
|
| 2100 |
+
$edit_file_link = admin_url('plugin-editor.php?file=gtranslate%2Furl_addon%2Fconfig.php&plugin=gtranslate%2Fgtranslate.php');
|
| 2101 |
+
$view_debug_link = admin_url('plugin-editor.php?file=gtranslate%2Furl_addon%2Fdebug.txt&plugin=gtranslate%2Fgtranslate.php');
|
| 2102 |
+
$notices['gt_debug_notice'] = array(
|
| 2103 |
+
'title' => __('Translation debug mode is ON.', 'gtranslate'),
|
| 2104 |
+
'msg' => __('Please note that sensitive information can be written into gtranslate/url_addon/debug.txt file, which can be accessed publicly. It is your responsibility to deny public access to it and clean debug information after you are done.', 'gtranslate'),
|
| 2105 |
+
'link' => '<li><span class="dashicons dashicons-edit"></span><a href="'.$edit_file_link.'">' . __('Edit config.php', 'gtranslate') . '</a></li>' .
|
| 2106 |
+
'<li><span class="dashicons dashicons-visibility"></span><a href="'.$view_debug_link.'">' . __('View debug.txt', 'gtranslate') . '</a></li>',
|
| 2107 |
+
'dismissible' => false,
|
| 2108 |
+
'int' => 0
|
| 2109 |
+
);
|
| 2110 |
+
}
|
| 2111 |
+
|
| 2112 |
$upgrade_tips_ignore = esc_url(add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'upgrade_tips')));
|
| 2113 |
$upgrade_tips_temp = esc_url(add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'upgrade_tips', 'gt_int' => 7)));
|
| 2114 |
|
native_names_map.php
CHANGED
|
@@ -43,7 +43,7 @@ $native_names_map = array(
|
|
| 43 |
'is' => 'Íslenska',
|
| 44 |
'ig' => 'Igbo',
|
| 45 |
'id' => 'Bahasa Indonesia',
|
| 46 |
-
'ga' => '
|
| 47 |
'it' => 'Italiano',
|
| 48 |
'ja' => '日本語',
|
| 49 |
'jw' => 'Basa Jawa',
|
| 43 |
'is' => 'Íslenska',
|
| 44 |
'ig' => 'Igbo',
|
| 45 |
'id' => 'Bahasa Indonesia',
|
| 46 |
+
'ga' => 'Gaeilge',
|
| 47 |
'it' => 'Italiano',
|
| 48 |
'ja' => '日本語',
|
| 49 |
'jw' => 'Basa Jawa',
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Author: Translate AI Multilingual Solutions
|
|
| 4 |
Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
Tested up to: 5.9
|
| 7 |
-
Stable tag: 2.9.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
|
@@ -251,6 +251,13 @@ If you want us to translate your website professionally or provide you a proofre
|
|
| 251 |
8. User Dashboard
|
| 252 |
|
| 253 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
= 2.9.8 =
|
| 255 |
* Fix for email translation issue related to new base64 encoding format introduced in v2.9.7
|
| 256 |
* Added new fields into woocommerce script data for translation
|
| 4 |
Tags: translate, translate wordpress, multilingual, translation, translate language, bilingual, localization, translation proxy, localisation, multilanguage, google translate
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
Tested up to: 5.9
|
| 7 |
+
Stable tag: 2.9.9
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
Donate link: https://gtranslate.io/?xyz=998#pricing
|
| 251 |
8. User Dashboard
|
| 252 |
|
| 253 |
== Changelog ==
|
| 254 |
+
= 2.9.9 =
|
| 255 |
+
* Fixed information disclosure security issue through url_addon/debug.txt
|
| 256 |
+
* Added admin notification when translation debug mode is on
|
| 257 |
+
* Fixed typo in Irish language name in native alphabet
|
| 258 |
+
* Added is_readable check for config.php file before modifying it
|
| 259 |
+
* Added conflict notice for WPML Multilingual CMS plugin
|
| 260 |
+
|
| 261 |
= 2.9.8 =
|
| 262 |
* Fix for email translation issue related to new base64 encoding format introduced in v2.9.7
|
| 263 |
* Added new fields into woocommerce script data for translation
|
url_addon/config.php
CHANGED
|
@@ -112,4 +112,7 @@ xh -> Xhosa
|
|
| 112 |
*/
|
| 113 |
|
| 114 |
$servers = array('van', 'kars', 'sis', 'dvin', 'ani', 'evn', 'vagh', 'step', 'sis', 'tigr', 'ani', 'tigr');
|
|
|
|
|
|
|
|
|
|
| 115 |
$debug = false;
|
| 112 |
*/
|
| 113 |
|
| 114 |
$servers = array('van', 'kars', 'sis', 'dvin', 'ani', 'evn', 'vagh', 'step', 'sis', 'tigr', 'ani', 'tigr');
|
| 115 |
+
|
| 116 |
+
// IMPORTANT: If you turn debugging on, then sensitive information will be written into debug.txt file.
|
| 117 |
+
// It is your responsibility to turn the debugging off and clear the debug.txt file.
|
| 118 |
$debug = false;
|
url_addon/gtranslate-email.php
CHANGED
|
@@ -51,7 +51,7 @@ curl_setopt($ch, CURLOPT_POST, 1);
|
|
| 51 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
|
| 52 |
|
| 53 |
// Debug
|
| 54 |
-
if($debug
|
| 55 |
$fh = fopen(dirname(__FILE__).'/debug.txt', 'a');
|
| 56 |
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
| 57 |
curl_setopt($ch, CURLOPT_STDERR, $fh);
|
| 51 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
|
| 52 |
|
| 53 |
// Debug
|
| 54 |
+
if($debug) {
|
| 55 |
$fh = fopen(dirname(__FILE__).'/debug.txt', 'a');
|
| 56 |
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
| 57 |
curl_setopt($ch, CURLOPT_STDERR, $fh);
|
url_addon/gtranslate.php
CHANGED
|
@@ -183,7 +183,7 @@ switch($_SERVER['REQUEST_METHOD']) {
|
|
| 183 |
}
|
| 184 |
|
| 185 |
// Debug
|
| 186 |
-
if($debug
|
| 187 |
$fh = fopen(dirname(__FILE__).'/debug.txt', 'a');
|
| 188 |
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
| 189 |
curl_setopt($ch, CURLOPT_STDERR, $fh);
|
| 183 |
}
|
| 184 |
|
| 185 |
// Debug
|
| 186 |
+
if($debug) {
|
| 187 |
$fh = fopen(dirname(__FILE__).'/debug.txt', 'a');
|
| 188 |
curl_setopt($ch, CURLOPT_VERBOSE, true);
|
| 189 |
curl_setopt($ch, CURLOPT_STDERR, $fh);
|
