Version Description
= 0.5.3 = Support URL translation = 0.5.2 = Improved lang attribute support, changed default language translation option = 0.5.1 = Improved speed and database structure = 0.5.0 = Ability to translate all content, backup service for human translations = 0.4.3 = Minor bug fixes, more compatability = 0.4.2 = This version provides Haitian support, auto translate with bing support = 0.4.0 = This version provides integration with google-sitemaps-xml and wp-super-cache = 0.3.9 = This version allows sorting of languages within the widget
Download this release
Release Info
Developer | oferwald |
Plugin | Transposh WordPress Translation |
Version | 0.5.4 |
Comparing to | |
See all releases |
Code changes from version 0.5.3 to 0.5.4
- core/constants.php +1 -1
- core/utils.php +2 -2
- readme.txt +6 -3
- transposh.php +1 -1
- wp/transposh_ajax.php +5 -3
- wp/transposh_widget.php +1 -2
core/constants.php
CHANGED
@@ -99,7 +99,7 @@ $bing_languages = array("en", "ar", "bg", "zh", "zh-tw", "cs", "da", "nl", "ht",
|
|
99 |
//Define the new capability that will be assigned to roles - translator
|
100 |
define("TRANSLATOR", 'translator');
|
101 |
|
102 |
-
define("TRANSPOSH_PLUGIN_VER",'0.5.
|
103 |
|
104 |
//Define segment id prefix, will be included in span tag. also used as class identifier
|
105 |
define("SPAN_PREFIX", "tr_");
|
99 |
//Define the new capability that will be assigned to roles - translator
|
100 |
define("TRANSLATOR", 'translator');
|
101 |
|
102 |
+
define("TRANSPOSH_PLUGIN_VER",'0.5.4');
|
103 |
|
104 |
//Define segment id prefix, will be included in span tag. also used as class identifier
|
105 |
define("SPAN_PREFIX", "tr_");
|
core/utils.php
CHANGED
@@ -257,7 +257,7 @@ function translate_url($href, $home_url, $target_language,$fetch_translation_fun
|
|
257 |
list ($href,$querypart) = explode('?', $href);
|
258 |
$querypart = '?'.$querypart;
|
259 |
}
|
260 |
-
$href = substr($href,strlen($home_url)
|
261 |
$parts = explode('/', $href);
|
262 |
foreach ($parts as $part) {
|
263 |
if (!$part) continue;
|
@@ -288,7 +288,7 @@ function translate_url($href, $home_url, $target_language,$fetch_translation_fun
|
|
288 |
* @return string
|
289 |
*/
|
290 |
function get_original_url($href, $home_url, $target_language,$fetch_translation_func) {
|
291 |
-
$href = substr($href,strlen($home_url)
|
292 |
$url = urldecode($href);
|
293 |
$url = (($pos=strpos($url, '?')) ? substr($url, 0, $pos) : $url);
|
294 |
$parts = explode('/', $url);
|
257 |
list ($href,$querypart) = explode('?', $href);
|
258 |
$querypart = '?'.$querypart;
|
259 |
}
|
260 |
+
$href = substr($href,strlen($home_url));
|
261 |
$parts = explode('/', $href);
|
262 |
foreach ($parts as $part) {
|
263 |
if (!$part) continue;
|
288 |
* @return string
|
289 |
*/
|
290 |
function get_original_url($href, $home_url, $target_language,$fetch_translation_func) {
|
291 |
+
$href = substr($href,strlen($home_url));
|
292 |
$url = urldecode($href);
|
293 |
$url = (($pos=strpos($url, '?')) ? substr($url, 0, $pos) : $url);
|
294 |
$parts = explode('/', $url);
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: oferwald
|
|
3 |
Donate link: http://transposh.org/donate/
|
4 |
Tags: translation, widget, filter, bilingual, multilingual, transposh, translate, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to: 3.0 rc-
|
7 |
-
Stable tag: 0.5.
|
8 |
|
9 |
Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
|
10 |
|
@@ -177,7 +177,10 @@ This version provides integration with google-sitemaps-xml and wp-super-cache
|
|
177 |
This version allows sorting of languages within the widget
|
178 |
|
179 |
== Changelog ==
|
180 |
-
= 2010
|
|
|
|
|
|
|
181 |
* Support translation of URLs
|
182 |
* Mark language used to comment
|
183 |
* Improved wp-super-cache integration
|
3 |
Donate link: http://transposh.org/donate/
|
4 |
Tags: translation, widget, filter, bilingual, multilingual, transposh, translate, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
|
5 |
Requires at least: 2.7
|
6 |
+
Tested up to: 3.0 rc-2
|
7 |
+
Stable tag: 0.5.4
|
8 |
|
9 |
Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
|
10 |
|
177 |
This version allows sorting of languages within the widget
|
178 |
|
179 |
== Changelog ==
|
180 |
+
= 2010/06/06 - 0.5.4 =
|
181 |
+
* Fix some issues with the widget regarding url translation
|
182 |
+
* Fix some inclusion issue with transposh_ajax.php file
|
183 |
+
= 2010/05/30 - 0.5.3 =
|
184 |
* Support translation of URLs
|
185 |
* Mark language used to comment
|
186 |
* Improved wp-super-cache integration
|
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.5.
|
8 |
Author URI: http://transposh.org/
|
9 |
License: GPL (http://www.gnu.org/licenses/gpl.txt)
|
10 |
*/
|
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.5.4
|
8 |
Author URI: http://transposh.org/
|
9 |
License: GPL (http://www.gnu.org/licenses/gpl.txt)
|
10 |
*/
|
wp/transposh_ajax.php
CHANGED
@@ -31,13 +31,15 @@ if (strtolower($_SERVER['REQUEST_METHOD']) == 'options') {
|
|
31 |
}
|
32 |
|
33 |
// we need wordpress and us...
|
34 |
-
//require_once('../../../../wp-load.php');
|
35 |
$root = $_SERVER["DOCUMENT_ROOT"];
|
36 |
$self = $_SERVER["SCRIPT_NAME"];
|
37 |
// go down 4 dirs...
|
38 |
for ($i = 0;$i<5;$i++) $self = substr($self,0,-strlen(strrchr($self,"/")));
|
39 |
-
require_once $root.$self.'/wp-load.php'
|
40 |
-
//
|
|
|
|
|
|
|
41 |
if (isset($_POST['translation_posted'])) {
|
42 |
// supercache invalidation of pages - first lets find if supercache is here
|
43 |
if (function_exists('wp_super_cache_init')) {
|
31 |
}
|
32 |
|
33 |
// we need wordpress and us...
|
|
|
34 |
$root = $_SERVER["DOCUMENT_ROOT"];
|
35 |
$self = $_SERVER["SCRIPT_NAME"];
|
36 |
// go down 4 dirs...
|
37 |
for ($i = 0;$i<5;$i++) $self = substr($self,0,-strlen(strrchr($self,"/")));
|
38 |
+
if (!@require_once $root.$self.'/wp-load.php') {
|
39 |
+
// fallback plan
|
40 |
+
require_once('../../../../wp-load.php');
|
41 |
+
}
|
42 |
+
// the case of posted translation
|
43 |
if (isset($_POST['translation_posted'])) {
|
44 |
// supercache invalidation of pages - first lets find if supercache is here
|
45 |
if (function_exists('wp_super_cache_init')) {
|
wp/transposh_widget.php
CHANGED
@@ -57,8 +57,6 @@ class transposh_plugin_widget {
|
|
57 |
//remove existing language settings.
|
58 |
$ref = cleanup_url($ref,$this->transposh->home_url);
|
59 |
|
60 |
-
|
61 |
-
$ref = rewrite_url_lang_param($ref,$this->transposh->home_url,$this->transposh->enable_permalinks_rewrite, $lang, $_POST[EDIT_PARAM]);
|
62 |
|
63 |
if($lang && $this->transposh->options->get_enable_url_translate()) {
|
64 |
// and then, we might have to translate it
|
@@ -70,6 +68,7 @@ class transposh_plugin_widget {
|
|
70 |
//decoded when used in the http header (i.e. 302 redirect)
|
71 |
//$ref = html_entity_decode($ref, ENT_NOQUOTES);
|
72 |
}
|
|
|
73 |
|
74 |
|
75 |
|
57 |
//remove existing language settings.
|
58 |
$ref = cleanup_url($ref,$this->transposh->home_url);
|
59 |
|
|
|
|
|
60 |
|
61 |
if($lang && $this->transposh->options->get_enable_url_translate()) {
|
62 |
// and then, we might have to translate it
|
68 |
//decoded when used in the http header (i.e. 302 redirect)
|
69 |
//$ref = html_entity_decode($ref, ENT_NOQUOTES);
|
70 |
}
|
71 |
+
$ref = rewrite_url_lang_param($ref,$this->transposh->home_url,$this->transposh->enable_permalinks_rewrite, $lang, $_POST[EDIT_PARAM]);
|
72 |
|
73 |
|
74 |
|