Skip to content

Commit

Permalink
2.9.8.8 alpha pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclause committed Feb 10, 2015
1 parent a90ec6e commit a5d1cfb
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
36 changes: 36 additions & 0 deletions admin/activation_hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,40 @@ function qtranxf_admin_notices_plugin_conflicts()
qtranxf_admin_notice_plugin_conflict('zTranslate','ztranslate/ztranslate.php');
}
add_action('admin_notices', 'qtranxf_admin_notices_plugin_conflicts');

function qtranxf_admin_notices_survey_request()
{
$messages = get_option('qtranslate_admin_notices');
if(isset($messages['survey-translation-service'])) return;
?>
<script type="text/javascript">
function qtranxj_dismiss_admin_notice(id) {
jQuery('#qtranxs_'+id).css('display','none');
jQuery.post(ajaxurl, { action: 'qtranslate_admin_notice', notice_id: id }
//,function(response) { eval(response); }
);
}
</script>
<?php
echo '<div class="updated" id="qtranxs_survey-translation-service"><p style="font-size: larger;">';// text-align: center;
printf(__('Thank you for using %s plugin!','qtranslate'), '<a href="https://wordpress.org/plugins/qtranslate-x/" style="color:blue" target="_blank">qTranslate&#8209;X</a>');
echo '<br>';
printf(__('Please, help us to make decision on "%s" feature, press the button below.','qtranslate'),__('Translation Service', 'qtranslate'));
echo '</p><p><a class="button" href="http://www.marius-siroen.com/qTranslate-X/TranslateServices/" target="_blank">';
printf(__('Survey on "%s" feature','qtranslate'),__('Translation Service', 'qtranslate'));
echo '</a>&nbsp;&nbsp;&nbsp;<a class="button" href="javascript:qtranxj_dismiss_admin_notice(\'survey-translation-service\');">'.__('I have already done it, dismiss this message.', 'qtranslate');
echo '</a></p></div>';
}
add_action('admin_notices', 'qtranxf_admin_notices_survey_request');

function qtranxf_ajax_qtranslate_admin_notice()
{
if(!isset($_POST['notice_id'])) return;
$id = $_POST['notice_id'];
$messages = get_option('qtranslate_admin_notices',array());
$messages[$id] = time();
update_option('qtranslate_admin_notices',$messages);
//echo "jQuery('#qtranxs_+$id').css('display','none');"; die();
}
add_action('wp_ajax_qtranslate_admin_notice', 'qtranxf_ajax_qtranslate_admin_notice');
?>
6 changes: 3 additions & 3 deletions qtranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: qTranslate-X
Plugin URI: http://wordpress.org/plugins/qtranslate-x/
Description: Adds user-friendly and database-friendly multilingual content support into WordPress.
Version: 2.9.8.7
Version: 2.9.8.8
Author: John Clause based on original code by Qian Qin
Author URI: http://qtranslatexteam.wordpress.com/about
Tags: multilingual, multi, language, admin, tinymce, Polyglot, bilingual, widget, switcher, professional, human, translation, service, qTranslate, zTranslate, mqTranslate, qTranslate Plus, WPML
Expand Down Expand Up @@ -101,7 +101,7 @@
define( 'QTRANSLATE_FILE', __FILE__ );
}

define('QTX_VERSION','2.9.8.7');
define('QTX_VERSION','2.9.8.8');

/* DEFAULT CONFIGURATION PART BEGINS HERE */

Expand Down Expand Up @@ -512,7 +512,7 @@
require_once(dirname(__FILE__)."/qtranslate_core.php");
require_once(dirname(__FILE__)."/qtranslate_widget.php");

if(is_admin() && !defined('DOING_AJAX')){
if(is_admin()){
require_once(dirname(__FILE__).'/admin/activation_hook.php');
register_activation_hook(__FILE__, 'qtranxf_activation_hook');//does not work if inside qtranslate_configuration.php
}
Expand Down
4 changes: 2 additions & 2 deletions qtranslate_core.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function qtranxf_init_language() {
$urlstd = $scheme.$url_info['host'].$url_info['url'];
$urlnew = qtranxf_convertURL($urlstd,$lang);
$target = apply_filters('qtranslate_language_detect_redirect', $urlnew, $urlorg, $url_info);
qtranxf_dbg_log('qtranxf_init_language: doredirect to '.$lang.PHP_EOL.'urlstd:'.$urlstd.PHP_EOL.'urlorg:'.$urlorg.PHP_EOL.'target:'.$target);
//qtranxf_dbg_log('qtranxf_init_language: doredirect to '.$lang.PHP_EOL.'urlstd:'.$urlstd.PHP_EOL.'urlorg:'.$urlorg.PHP_EOL.'target:'.$target);
if($target!==false && $target != $urlorg){
wp_redirect($target);
//header('Location: '.$target);
Expand Down Expand Up @@ -99,7 +99,7 @@ function qtranxf_init_language() {

//allow other plugins to initialize whatever they need for language
do_action('qtranslate_init_language',$url_info);
qtranxf_dbg_log('qtranxf_init_language: url_info: ',$url_info);
//qtranxf_dbg_log('qtranxf_init_language: url_info: ',$url_info);
}

if(!function_exists('qtranxf_detect_language')){
Expand Down
12 changes: 11 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,15 @@ One can find the original qTranslate FAQ [here](https://wordpress.org/plugins/qt

== Changelog ==

= 3.0 =
* Includes all changes after version 2.9.6.
* Please, do not forget to respond to survey on ['Translate Service' feature](http://www.marius-siroen.com/qTranslate-X/TranslateServices/)

= 2.9.8.8 alpha =
* request for survey on ['Translate Service' feature](http://www.marius-siroen.com/qTranslate-X/TranslateServices/)

= 2.9.8.7 alpha =
* the version can be downloaded here: [2.9.8.7 alpha](https://github.com/qTranslate-Team/qtranslate-x/archive/2.9.8.7.zip).
* more on proper detection of front-end vs back-end on AJAX calls.
* 'attr_title' is now translated in menu display

Expand Down Expand Up @@ -354,13 +362,15 @@ One can find the original qTranslate FAQ [here](https://wordpress.org/plugins/qt
== Known Issues ==

* Turn on option "Compatibility Functions", if you use [WooCommerce](https://wordpress.org/plugins/woocommerce/) framework plugins, like [IM8 qTranslate WooCommerce](https://wordpress.org/plugins/im8-qtranslate-woocommerce/), [qTranslate support for WooCommerce](https://wordpress.org/plugins/qtranslate-support-for-woocommerce/), [WooCommerce-qTML](https://wordpress.org/plugins/woocommerce-qtml/), for example. Also it is needed for any theme, which claims its compatibility with former qTranslate.
* If other plugin installs a custom TinyMCE editor on a translatable field served by qTranslate-X, then all kind of problems start to happen. Examples of 'offending' plugins are: [Fusion Page Builder](http://www.theme-fusion.com/), [Page Builder by SiteOrigin](https://wordpress.org/plugins/siteorigin-panels/), [Rich Text Tags](https://wordpress.org/plugins/rich-text-tags/), [Visual Composer](http://vc.wpbakery.com/), [WP Editor](https://wordpress.org/plugins/wp-editor/). We are looking into possibilities to enable integration with those plugins.
* If other plugin installs a custom TinyMCE editor on a translatable field served by qTranslate-X, then all kind of problems start to happen. Examples of 'offending' plugins are: [Crayon Syntax Highlighter](https://wordpress.org/plugins/crayon-syntax-highlighter/), [Fusion Page Builder](http://www.theme-fusion.com/), [Page Builder by SiteOrigin](https://wordpress.org/plugins/siteorigin-panels/), [Rich Text Tags](https://wordpress.org/plugins/rich-text-tags/), [Visual Composer](http://vc.wpbakery.com/), [WP Editor](https://wordpress.org/plugins/wp-editor/). We are looking into possibilities to enable integration with those plugins.
* Editing of menu item description does not work properly on page `/wp-admin/nav-menus.php`.
* Title of the site on admin pages is not displaying correctly [WP topic](https://wordpress.org/support/topic/title-dont-show-the-right-text-in-admin).
* When [Jetpack by WordPress.com](https://wordpress.org/plugins/jetpack/) is enabled, pressing 'Save Changes' at Settings/General (/wp-admin/options-general.php) page, causes fields "Site Title" and "Tagline" to be emptied, if they had multilingual values. It only happens when Jetpack is connected to WordPress. For now, when you need to edit those values, deactivate Jetpack, make your edits, then re-activate JetPack again. Fortunately, that general setting page need not to be changed frequently. [WP topic](https://wordpress.org/support/topic/site-titletagline-disappear-on-general-settings-update)
* Message "The backup of this post in your browser is different from the version below" appears sometimes in the post editor. Clicking on "Restore the backup" may produce unexpected result, since backup has one language only, the one which was active at the time of the last pressing of button "Update". The code which causes this is in /wp-includes/js/autosave.js. Autosave script is currently turned off to avoid this confusion.
* Search in Category/Tags editor works in default language only.
* If field "Alternative Text" on page "Edit Media" is left empty, then caption or title will be used untranslated in 'alt' attribute of image display. There is no WP hook provided to enable translation in such a case (see code of 'function wp_get_attachment_image'). However, if "Alternative Text" is filled with non-empty value, then it is shown translated and correctly. We could only re-implement the WP algorithm to be run for the second time under filter 'wp_get_attachment_image_attributes' with translation, which would hurt performance a little bit. If this is a real problem for you, let us know, we can put it in as an option, or submit pull request with your version of implementation. [WP topic](https://wordpress.org/support/topic/odd-behavior-with-photos-and-photo-galleries)
* Page `/wp-admin/edit-tags.php?taxonomy=category`: if default language name of new category/tag is empty, nothing gets added.
* Title field is overlaid with the prompt "Enter title here", after switching the language from another language with empty value of title. [Watch Video](http://youtu.be/o3HH65bEZ4s) reported by [fotkin](https://wordpress.org/support/profile/fotkin).
* [resolved] Sometimes after a new plugin update is released, the language switching buttons disappear on the first editor page load. Refresh the page to bring them back. Apparently, it has something to do with browse caching mechanism.


Expand Down

0 comments on commit a5d1cfb

Please sign in to comment.