Version Description
Download this release
Release Info
Developer | oferwald |
Plugin | Transposh WordPress Translation |
Version | 0.3.4 |
Comparing to | |
See all releases |
Code changes from version 0.3.3 to 0.3.4
- core/parser.php +4 -2
- readme.txt +6 -2
- transposh.php +9 -4
- transposh_admin.php +1 -1
- transposh_db.php +2 -2
- transposh_widget.php +3 -3
core/parser.php
CHANGED
@@ -357,6 +357,8 @@ class parser {
|
|
357 |
// first fix the html tag itself - we might need to to the same for all such attributes with flipping
|
358 |
if ($this->dir_rtl)
|
359 |
$this->html->find('html',0)->dir="rtl";
|
|
|
|
|
360 |
|
361 |
if ($this->lang)
|
362 |
$this->html->find('html',0)->lang=$this->lang;
|
@@ -394,11 +396,11 @@ class parser {
|
|
394 |
}
|
395 |
}
|
396 |
if ($newtext) {
|
397 |
-
|
398 |
if (substr($newtext, 0, 4) == '<') {
|
399 |
$newtext = html_entity_decode($newtext);
|
400 |
}
|
401 |
-
}
|
402 |
$e->outertext = $newtext.$right;
|
403 |
|
404 |
}
|
357 |
// first fix the html tag itself - we might need to to the same for all such attributes with flipping
|
358 |
if ($this->dir_rtl)
|
359 |
$this->html->find('html',0)->dir="rtl";
|
360 |
+
else
|
361 |
+
$this->html->find('html',0)->dir="ltr";
|
362 |
|
363 |
if ($this->lang)
|
364 |
$this->html->find('html',0)->lang=$this->lang;
|
396 |
}
|
397 |
}
|
398 |
if ($newtext) {
|
399 |
+
/* if ($this->feed_fix) {
|
400 |
if (substr($newtext, 0, 4) == '<') {
|
401 |
$newtext = html_entity_decode($newtext);
|
402 |
}
|
403 |
+
}*/
|
404 |
$e->outertext = $newtext.$right;
|
405 |
|
406 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: oferwald, amirperlman
|
|
3 |
Donate link: http://transposh.org/donate/
|
4 |
Tags: translation, widget, filter, bilingual, multilingual, transposh, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to: 2.8.
|
7 |
-
Stable tag: 0.3.
|
8 |
|
9 |
Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
|
10 |
|
@@ -115,6 +115,10 @@ change the .css from transparent background to your page background color. And l
|
|
115 |
5. Widget style selection
|
116 |
|
117 |
== Changelog ==
|
|
|
|
|
|
|
|
|
118 |
= 2009/09/06 - 0.3.3 =
|
119 |
* 9 More languages supported by google translate
|
120 |
* Further compressed images with punypng (808 bytes saved!)
|
3 |
Donate link: http://transposh.org/donate/
|
4 |
Tags: translation, widget, filter, bilingual, multilingual, transposh, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
|
5 |
Requires at least: 2.7
|
6 |
+
Tested up to: 2.8.5
|
7 |
+
Stable tag: 0.3.4
|
8 |
|
9 |
Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
|
10 |
|
115 |
5. Widget style selection
|
116 |
|
117 |
== Changelog ==
|
118 |
+
= 2009/11/05 - 0.3.4 =
|
119 |
+
* Fix for nextgen gallery issue
|
120 |
+
* Force LTR for wordpress blogs originiating in RTL
|
121 |
+
* Avoid loading Bing Translate javascript when it is not needed
|
122 |
= 2009/09/06 - 0.3.3 =
|
123 |
* 9 More languages supported by google translate
|
124 |
* Further compressed images with punypng (808 bytes saved!)
|
transposh.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: http://transposh.org/
|
5 |
Description: Translation filter for WordPress, After enabling please set languages at the <a href="options-general.php?page=transposh">the options page</a> Want to help? visit our development site at <a href="http://trac.transposh.org/">trac.transposh.org</a>.
|
6 |
Author: Team Transposh
|
7 |
-
Version: 0.3.
|
8 |
Author URI: http://transposh.org/
|
9 |
License: GPL (http://www.gnu.org/licenses/gpl.txt)
|
10 |
*/
|
@@ -52,6 +52,10 @@ function process_page(&$buffer) {
|
|
52 |
return $buffer;
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
55 |
|
56 |
// Don't translate the default language unless specifically allowed to...
|
57 |
$default_lang = get_default_lang();
|
@@ -356,7 +360,7 @@ function add_transposh_css() {
|
|
356 |
return;
|
357 |
}
|
358 |
//include the transposh.css
|
359 |
-
wp_enqueue_style("transposh","$tr_plugin_url/css/transposh.css",array(),'0.3.
|
360 |
wp_enqueue_style("jquery","http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css",array(),'1.0');
|
361 |
|
362 |
}
|
@@ -397,10 +401,11 @@ function add_transposh_js() {
|
|
397 |
// jQuery pushing below might cause issues
|
398 |
//wp_enqueue_script("jquery","http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",array(),'1.3.2', get_option(ENABLE_FOOTER_SCRIPTS));
|
399 |
wp_enqueue_script("google","http://www.google.com/jsapi",array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
|
400 |
-
|
|
|
401 |
wp_enqueue_script("mstranslate","http://api.microsofttranslator.com/V1/Ajax.svc/Embed?appId=".get_option(MSN_TRANSLATE_KEY),array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
|
402 |
}
|
403 |
-
wp_enqueue_script("transposh","$tr_plugin_url/js/transposh.js?post_url=$post_url{$edit_mode}&lang={$GLOBALS['lang']}&prefix=".SPAN_PREFIX,array("jquery"),'0.3.
|
404 |
}
|
405 |
}
|
406 |
|
4 |
Plugin URI: http://transposh.org/
|
5 |
Description: Translation filter for WordPress, After enabling please set languages at the <a href="options-general.php?page=transposh">the options page</a> Want to help? visit our development site at <a href="http://trac.transposh.org/">trac.transposh.org</a>.
|
6 |
Author: Team Transposh
|
7 |
+
Version: 0.3.4
|
8 |
Author URI: http://transposh.org/
|
9 |
License: GPL (http://www.gnu.org/licenses/gpl.txt)
|
10 |
*/
|
52 |
return $buffer;
|
53 |
}
|
54 |
|
55 |
+
// This one fixed a bug transposh created with other pages (xml generator for other plugins - such as the nextgen gallery)
|
56 |
+
// TODO: need to further investigate
|
57 |
+
if($GLOBALS['lang'] == "")
|
58 |
+
return $buffer;
|
59 |
|
60 |
// Don't translate the default language unless specifically allowed to...
|
61 |
$default_lang = get_default_lang();
|
360 |
return;
|
361 |
}
|
362 |
//include the transposh.css
|
363 |
+
wp_enqueue_style("transposh","$tr_plugin_url/css/transposh.css",array(),'0.3.4');
|
364 |
wp_enqueue_style("jquery","http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css",array(),'1.0');
|
365 |
|
366 |
}
|
401 |
// jQuery pushing below might cause issues
|
402 |
//wp_enqueue_script("jquery","http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",array(),'1.3.2', get_option(ENABLE_FOOTER_SCRIPTS));
|
403 |
wp_enqueue_script("google","http://www.google.com/jsapi",array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
|
404 |
+
// Make sure msn translate is not needlessly loaded when we are only auto translating
|
405 |
+
if (get_option(ENABLE_MSN_TRANSLATE) && $GLOBALS['is_edit_mode']) {
|
406 |
wp_enqueue_script("mstranslate","http://api.microsofttranslator.com/V1/Ajax.svc/Embed?appId=".get_option(MSN_TRANSLATE_KEY),array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
|
407 |
}
|
408 |
+
wp_enqueue_script("transposh","$tr_plugin_url/js/transposh.js?post_url=$post_url{$edit_mode}&lang={$GLOBALS['lang']}&prefix=".SPAN_PREFIX,array("jquery"),'0.3.4',get_option(ENABLE_FOOTER_SCRIPTS));
|
409 |
}
|
410 |
}
|
411 |
|
transposh_admin.php
CHANGED
@@ -281,7 +281,7 @@ class transposh_plugin {
|
|
281 |
//constructor of class, PHP4 compatible construction for backward compatibility
|
282 |
function transposh_plugin() {
|
283 |
if (get_option(ENABLE_CSS_FLAGS))
|
284 |
-
wp_enqueue_style("transposh-flags",plugins_url('', __FILE__)."/css/transposh_flags.css",array(),'0.3.
|
285 |
//add filter for WordPress 2.8 changed backend box system !
|
286 |
add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
|
287 |
//add some help
|
281 |
//constructor of class, PHP4 compatible construction for backward compatibility
|
282 |
function transposh_plugin() {
|
283 |
if (get_option(ENABLE_CSS_FLAGS))
|
284 |
+
wp_enqueue_style("transposh-flags",plugins_url('', __FILE__)."/css/transposh_flags.css",array(),'0.3.4');
|
285 |
//add filter for WordPress 2.8 changed backend box system !
|
286 |
add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
|
287 |
//add some help
|
transposh_db.php
CHANGED
@@ -119,7 +119,7 @@ function update_translation() {
|
|
119 |
}
|
120 |
|
121 |
//add our own custom header - so we will know that we got here
|
122 |
-
header("Transposh: ver-0.3.
|
123 |
|
124 |
// transaction log stuff
|
125 |
global $user_ID;
|
@@ -227,7 +227,7 @@ function get_translation_history($token, $lang) {
|
|
227 |
$original = $wpdb->escape(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8'));
|
228 |
|
229 |
//add our own custom header - so we will know that we got here
|
230 |
-
header("Transposh: ver-0.3.
|
231 |
|
232 |
$query = "SELECT translated, translated_by, timestamp, source, user_login ".
|
233 |
"FROM $table_name ".
|
119 |
}
|
120 |
|
121 |
//add our own custom header - so we will know that we got here
|
122 |
+
header("Transposh: ver-0.3.4 db_version-". DB_VERSION);
|
123 |
|
124 |
// transaction log stuff
|
125 |
global $user_ID;
|
227 |
$original = $wpdb->escape(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8'));
|
228 |
|
229 |
//add our own custom header - so we will know that we got here
|
230 |
+
header("Transposh: ver-0.3.4 db_version-". DB_VERSION);
|
231 |
|
232 |
$query = "SELECT translated, translated_by, timestamp, source, user_login ".
|
233 |
"FROM $table_name ".
|
transposh_widget.php
CHANGED
@@ -85,11 +85,11 @@ function add_transposh_widget_css() {
|
|
85 |
// TODO: user generated version
|
86 |
$options = get_option(WIDGET_TRANSPOSH);
|
87 |
if ($options['style'] == 1 || $options['style'] == 2) {
|
88 |
-
wp_enqueue_style("transposh_widget","{$GLOBALS['tr_plugin_url']}/css/transposh_widget.css",array(),'0.3.
|
89 |
if (get_option(ENABLE_CSS_FLAGS)) {
|
90 |
-
wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags.css",array(),'0.3.
|
91 |
if (file_exists("{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css"))
|
92 |
-
wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css",array(),'0.3.
|
93 |
}
|
94 |
}
|
95 |
|
85 |
// TODO: user generated version
|
86 |
$options = get_option(WIDGET_TRANSPOSH);
|
87 |
if ($options['style'] == 1 || $options['style'] == 2) {
|
88 |
+
wp_enqueue_style("transposh_widget","{$GLOBALS['tr_plugin_url']}/css/transposh_widget.css",array(),'0.3.4');
|
89 |
if (get_option(ENABLE_CSS_FLAGS)) {
|
90 |
+
wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags.css",array(),'0.3.4');
|
91 |
if (file_exists("{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css"))
|
92 |
+
wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css",array(),'0.3.4');
|
93 |
}
|
94 |
}
|
95 |
|