Version Description
- Fixed issue with gettext when TranslatePress default language is different from WordPress default language
- Fixed Monthly/Yearly archives showing incorrect month/year
- Added message to activate Extra languages add-on when trying to add a new language.
Download this release
Release Info
| Developer | madalin.ungureanu |
| Plugin | |
| Version | 1.7.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.7.0 to 1.7.1
class-translate-press.php
CHANGED
|
@@ -53,7 +53,7 @@ class TRP_Translate_Press{
|
|
| 53 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 54 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
| 55 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
| 56 |
-
define( 'TRP_PLUGIN_VERSION', '1.7.
|
| 57 |
|
| 58 |
wp_cache_add_non_persistent_groups(array('trp'));
|
| 59 |
|
| 53 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 54 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
| 55 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
| 56 |
+
define( 'TRP_PLUGIN_VERSION', '1.7.1' );
|
| 57 |
|
| 58 |
wp_cache_add_non_persistent_groups(array('trp'));
|
| 59 |
|
includes/class-languages.php
CHANGED
|
@@ -43,18 +43,12 @@ class TRP_Languages{
|
|
| 43 |
$this->is_admin_request= $trp_is_admin_request->is_admin_request();
|
| 44 |
}
|
| 45 |
|
| 46 |
-
if ( !$this->settings ){
|
| 47 |
-
$trp = TRP_Translate_Press::get_trp_instance();
|
| 48 |
-
$trp_settings = $trp->get_component( 'settings' );
|
| 49 |
-
$this->settings = $trp_settings->get_settings();
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
if ( $this->is_admin_request )
|
| 53 |
return $locale;
|
| 54 |
|
| 55 |
|
| 56 |
global $TRP_LANGUAGE;
|
| 57 |
-
if( !empty($TRP_LANGUAGE)
|
| 58 |
$locale = $TRP_LANGUAGE;
|
| 59 |
}
|
| 60 |
return $locale;
|
| 43 |
$this->is_admin_request= $trp_is_admin_request->is_admin_request();
|
| 44 |
}
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
if ( $this->is_admin_request )
|
| 47 |
return $locale;
|
| 48 |
|
| 49 |
|
| 50 |
global $TRP_LANGUAGE;
|
| 51 |
+
if( !empty($TRP_LANGUAGE) ){
|
| 52 |
$locale = $TRP_LANGUAGE;
|
| 53 |
}
|
| 54 |
return $locale;
|
includes/compatibility-functions.php
CHANGED
|
@@ -554,4 +554,26 @@ function trp_skip_elementor_popup_action_from_url_converter($value, $url){
|
|
| 554 |
if(strpos($url, '%23elementor-action') !== false){
|
| 555 |
return true;
|
| 556 |
}
|
| 557 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 554 |
if(strpos($url, '%23elementor-action') !== false){
|
| 555 |
return true;
|
| 556 |
}
|
| 557 |
+
return $value;
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
/**
|
| 561 |
+
* Strip gettext wrapping from get_the_date function parameter $d
|
| 562 |
+
*/
|
| 563 |
+
add_filter('get_the_date','trp_strip_gettext_from_get_the_date', 1, 3);
|
| 564 |
+
function trp_strip_gettext_from_get_the_date($the_date, $d, $post){
|
| 565 |
+
$d = TRP_Translation_Manager::strip_gettext_tags( $d );
|
| 566 |
+
$post = get_post( $post );
|
| 567 |
+
|
| 568 |
+
if ( ! $post ) {
|
| 569 |
+
return false;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
if ( '' == $d ) {
|
| 573 |
+
$the_date = get_post_time( get_option( 'date_format' ), false, $post, true );
|
| 574 |
+
} else {
|
| 575 |
+
$the_date = get_post_time( $d, false, $post, true );
|
| 576 |
+
}
|
| 577 |
+
|
| 578 |
+
return $the_date;
|
| 579 |
+
}
|
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.7.
|
| 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.7.1
|
| 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
|
@@ -215,8 +215,9 @@
|
|
| 215 |
<?php __("Log machine translation queries.", "translatepress-multilingual"); ?>
|
| 216 |
<?php __("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.)", "translatepress-multilingual"); ?>
|
| 217 |
<?php __("Select the language you wish to make your website available in.", "translatepress-multilingual"); ?>
|
| 218 |
-
<?php __("To add <strong>more
|
| 219 |
-
<?php __("
|
|
|
|
| 220 |
<?php __("Default Language", "translatepress-multilingual"); ?>
|
| 221 |
<?php __("Select the original language of your content.", "translatepress-multilingual"); ?>
|
| 222 |
<?php __("WARNING. Changing the default language will invalidate existing translations.", "translatepress-multilingual"); ?>
|
| 215 |
<?php __("Log machine translation queries.", "translatepress-multilingual"); ?>
|
| 216 |
<?php __("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.)", "translatepress-multilingual"); ?>
|
| 217 |
<?php __("Select the language you wish to make your website available in.", "translatepress-multilingual"); ?>
|
| 218 |
+
<?php __("To add <strong>more than two languages</strong> download and install the <strong>Extra Languages Add-on</strong> from <a href=\"%s\" class=\"trp-translatepress-account-page\" target=\"_blank\" title=\"TranslatePress Account page\">your account</a>. Once activated, you'll be able to add unlimited languages.", "translatepress-multilingual"); ?>
|
| 219 |
+
<?php __("To add <strong>more than two languages</strong> and support for SEO Title, Description, Slug and more check out <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>", "translatepress-multilingual"); ?>
|
| 220 |
+
<?php __("Not only are you getting extra features and premium support, but you also help fund the future development of TranslatePress.", "translatepress-multilingual"); ?>
|
| 221 |
<?php __("Default Language", "translatepress-multilingual"); ?>
|
| 222 |
<?php __("Select the original language of your content.", "translatepress-multilingual"); ?>
|
| 223 |
<?php __("WARNING. Changing the default language will invalidate existing translations.", "translatepress-multilingual"); ?>
|
languages/translatepress-multilingual.pot
CHANGED
|
@@ -17,11 +17,11 @@ msgstr ""
|
|
| 17 |
msgid "Error! Duplicate URL slug values."
|
| 18 |
msgstr ""
|
| 19 |
|
| 20 |
-
#: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:
|
| 21 |
msgid "Limit this menu item to the following languages"
|
| 22 |
msgstr ""
|
| 23 |
|
| 24 |
-
#: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:
|
| 25 |
msgid "All Languages"
|
| 26 |
msgstr ""
|
| 27 |
|
|
@@ -877,12 +877,16 @@ msgstr ""
|
|
| 877 |
msgid "Select the language you wish to make your website available in."
|
| 878 |
msgstr ""
|
| 879 |
|
| 880 |
-
#: ../translatepress/partials/main-settings-language-selector.php:
|
| 881 |
-
msgid "To add <strong>more
|
| 882 |
msgstr ""
|
| 883 |
|
| 884 |
-
#: ../translatepress/partials/main-settings-language-selector.php:
|
| 885 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 886 |
msgstr ""
|
| 887 |
|
| 888 |
#: ../translatepress/partials/main-settings-page.php:10
|
| 17 |
msgid "Error! Duplicate URL slug values."
|
| 18 |
msgstr ""
|
| 19 |
|
| 20 |
+
#: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:75
|
| 21 |
msgid "Limit this menu item to the following languages"
|
| 22 |
msgstr ""
|
| 23 |
|
| 24 |
+
#: ../tp-add-on-navigation-based-on-language/class-navigation-based-on-language.php:81, ../tp-add-on-extra-languages/partials/language-selector-pro.php:2, ../translatepress/partials/main-settings-language-selector.php:2
|
| 25 |
msgid "All Languages"
|
| 26 |
msgstr ""
|
| 27 |
|
| 877 |
msgid "Select the language you wish to make your website available in."
|
| 878 |
msgstr ""
|
| 879 |
|
| 880 |
+
#: ../translatepress/partials/main-settings-language-selector.php:66
|
| 881 |
+
msgid "To add <strong>more than two languages</strong> download and install the <strong>Extra Languages Add-on</strong> from <a href=\"%s\" class=\"trp-translatepress-account-page\" target=\"_blank\" title=\"TranslatePress Account page\">your account</a>. Once activated, you'll be able to add unlimited languages."
|
| 882 |
msgstr ""
|
| 883 |
|
| 884 |
+
#: ../translatepress/partials/main-settings-language-selector.php:69
|
| 885 |
+
msgid "To add <strong>more than two languages</strong> and support for SEO Title, Description, Slug and more check out <a href=\"%s\" class=\"button button-primary\" target=\"_blank\" title=\"TranslatePress Pro\">TranslatePress PRO</a>"
|
| 886 |
+
msgstr ""
|
| 887 |
+
|
| 888 |
+
#: ../translatepress/partials/main-settings-language-selector.php:70
|
| 889 |
+
msgid "Not only are you getting extra features and premium support, but you also help fund the future development of TranslatePress."
|
| 890 |
msgstr ""
|
| 891 |
|
| 892 |
#: ../translatepress/partials/main-settings-page.php:10
|
partials/main-settings-language-selector.php
CHANGED
|
@@ -61,9 +61,14 @@
|
|
| 61 |
</p>
|
| 62 |
<p class="trp-upsell-multiple-languages" style="display: none;">
|
| 63 |
<?php
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
echo $lnk;
|
| 68 |
?>
|
| 69 |
</p>
|
| 61 |
</p>
|
| 62 |
<p class="trp-upsell-multiple-languages" style="display: none;">
|
| 63 |
<?php
|
| 64 |
+
if ( trp_is_paid_version() ){
|
| 65 |
+
$url = 'https://translatepress.com/account/';
|
| 66 |
+
$lnk = sprintf( wp_kses( __( 'To add <strong>more than two languages</strong> download and install the <strong>Extra Languages Add-on</strong> from <a href="%s" class="trp-translatepress-account-page" target="_blank" title="TranslatePress Account page">your account</a>. Once activated, you\'ll be able to add unlimited languages.', 'translatepress-multilingual' ), array( 'strong' => array(), 'br' => array(), 'a' => array( 'href' => array(), 'title' => array(), 'target' => array(), 'class' => array() ) ) ), esc_url( $url ) );
|
| 67 |
+
}else {
|
| 68 |
+
$url = trp_add_affiliate_id_to_link('https://translatepress.com/?utm_source=wpbackend&utm_medium=clientsite&utm_content=multiple_languages&utm_campaign=tpfree');
|
| 69 |
+
$lnk = sprintf( wp_kses( __( 'To add <strong>more than two languages</strong> and support for SEO Title, Description, Slug and more check out <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 ) );
|
| 70 |
+
$lnk .= '<br/>' . __('Not only are you getting extra features and premium support, but you also help fund the future development of TranslatePress.', 'translatepress-multilingual');
|
| 71 |
+
}
|
| 72 |
echo $lnk;
|
| 73 |
?>
|
| 74 |
</p>
|
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.4.0
|
| 7 |
Requires PHP: 5.6.20
|
| 8 |
-
Stable tag: 1.7.
|
| 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.7.0 =
|
| 147 |
* Fixed compatibility issue with JetPack plugin in some cases
|
| 148 |
* Fixed JS undefined controls error for some setups
|
| 5 |
Requires at least: 3.1.0
|
| 6 |
Tested up to: 5.4.0
|
| 7 |
Requires PHP: 5.6.20
|
| 8 |
+
Stable tag: 1.7.1
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 143 |
|
| 144 |
|
| 145 |
== Changelog ==
|
| 146 |
+
= 1.7.1 =
|
| 147 |
+
* Fixed issue with gettext when TranslatePress default language is different from WordPress default language
|
| 148 |
+
* Fixed Monthly/Yearly archives showing incorrect month/year
|
| 149 |
+
* Added message to activate Extra languages add-on when trying to add a new language.
|
| 150 |
+
|
| 151 |
= 1.7.0 =
|
| 152 |
* Fixed compatibility issue with JetPack plugin in some cases
|
| 153 |
* Fixed JS undefined controls error for some setups
|
