Transposh WordPress Translation - Version 0.8.1

Version Description

= 0.8.0 = The widgets can have multiple instances, you need to change the current instance If you want to use a google/msn API key, it is now possible = 0.7.0 = New edit interface, tons of other fixes = 0.6.6 = Fixed two XSS vulnerabilities = 0.6.3 = Support .po/.mo files = 0.6.0 = Much improved translation interface engine = 0.5.7 = Fix for critical bug in 0.5.6 = 0.5.6 = Support pluggable widgets = 0.5.5 = Support for buddypress URLs = 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 Icon 128x128 Transposh WordPress Translation
Version 0.8.1
Comparing to
See all releases

Code changes from version 0.8.0 to 0.8.1

core/constants.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  //Language indicator in URL. i.e. lang=en
@@ -110,6 +110,17 @@ class transposh_consts {
110
  'cy' => 'Welsh,Cymraeg,wales,',
111
  'yi' => 'Yiddish,ייִדיש,europeanunion,'
112
  );
 
 
 
 
 
 
 
 
 
 
 
113
  // Language which are read from right to left (rtl)
114
  public static $rtl_languages = array('ar', 'he', 'fa', 'ur', 'yi');
115
  // Google supported languages
@@ -140,7 +151,7 @@ class transposh_consts {
140
  define('TRANSLATOR', 'translator');
141
 
142
  //Define for transposh plugin version
143
- define('TRANSPOSH_PLUGIN_VER', '0.8.0');
144
 
145
  //Current jQuery UI
146
  define('JQUERYUI_VER', '1.8.16');
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  //Language indicator in URL. i.e. lang=en
110
  'cy' => 'Welsh,Cymraeg,wales,',
111
  'yi' => 'Yiddish,ייִדיש,europeanunion,'
112
  );
113
+
114
+ public static function get_language_name($lang) {
115
+ list ($langname, $langorigname, $flag) = explode(",", transposh_consts::$languages[$lang]);
116
+ return $langname;
117
+ }
118
+
119
+ public static function get_language_orig_name($lang) {
120
+ list ($langname, $langorigname, $flag) = explode(",", transposh_consts::$languages[$lang]);
121
+ return $langorigname;
122
+ }
123
+
124
  // Language which are read from right to left (rtl)
125
  public static $rtl_languages = array('ar', 'he', 'fa', 'ur', 'yi');
126
  // Google supported languages
151
  define('TRANSLATOR', 'translator');
152
 
153
  //Define for transposh plugin version
154
+ define('TRANSPOSH_PLUGIN_VER', '0.8.1');
155
 
156
  //Current jQuery UI
157
  define('JQUERYUI_VER', '1.8.16');
core/parser.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  require_once("shd/simple_html_dom.php");
@@ -301,6 +301,9 @@ class parser {
301
  function is_sentence_breaker($char, $nextchar, $nextnextchar) {
302
  if (($char == '.' || $char == '-') && ($this->is_white_space($nextchar)))
303
  return 1;
 
 
 
304
  //∙
305
  if (ord($char) == 226 && ord($nextchar) == 136 && ord($nextnextchar) == 153)
306
  return 3;
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  require_once("shd/simple_html_dom.php");
301
  function is_sentence_breaker($char, $nextchar, $nextnextchar) {
302
  if (($char == '.' || $char == '-') && ($this->is_white_space($nextchar)))
303
  return 1;
304
+ //,
305
+ if (ord($char) == 239 && ord($nextchar) == 188 && ord($nextnextchar) == 140)
306
+ return 3;
307
  //∙
308
  if (ord($char) == 226 && ord($nextchar) == 136 && ord($nextnextchar) == 153)
309
  return 3;
core/utils.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /**
@@ -395,8 +395,7 @@ class transposh_utils {
395
  // qvalue = ( "0" [ "." 0*3DIGIT ] )
396
  // | ( "1" [ "." 0*3("0") ] )
397
  preg_match_all("/([[:alpha:]]{1,8})(-([[:alpha:]|-]{1,8}))?" .
398
- "(\s*;\s*q\s*=\s*(1\.0{0,3}|0\.\d{0,3}))?\s*(,|$)/i",
399
- $http_accept_language, $hits, PREG_SET_ORDER);
400
 
401
  // default language (in case of no hits) is the first in the array
402
  if ($default_lang == 'auto') $bestlang = $available_languages[0]; else
@@ -432,6 +431,13 @@ class transposh_utils {
432
  return preg_match("#(bot|yandex|validator|google|jeeves|spider|crawler|slurp)#si", $_SERVER['HTTP_USER_AGENT']);
433
  }
434
 
 
 
 
 
 
 
 
435
  }
436
 
437
  ?>
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /**
395
  // qvalue = ( "0" [ "." 0*3DIGIT ] )
396
  // | ( "1" [ "." 0*3("0") ] )
397
  preg_match_all("/([[:alpha:]]{1,8})(-([[:alpha:]|-]{1,8}))?" .
398
+ "(\s*;\s*q\s*=\s*(1\.0{0,3}|0\.\d{0,3}))?\s*(,|$)/i", $http_accept_language, $hits, PREG_SET_ORDER);
 
399
 
400
  // default language (in case of no hits) is the first in the array
401
  if ($default_lang == 'auto') $bestlang = $available_languages[0]; else
431
  return preg_match("#(bot|yandex|validator|google|jeeves|spider|crawler|slurp)#si", $_SERVER['HTTP_USER_AGENT']);
432
  }
433
 
434
+ public static function allow_cors() {
435
+ header('Access-Control-Allow-Origin: *');
436
+ header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
437
+ header('Access-Control-Allow-Headers: X-Requested-With');
438
+ header('Access-Control-Max-Age: 86400');
439
+ }
440
+
441
  }
442
 
443
  ?>
js/l/de.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Schlie\u00dfen ohne Speichern?","You have made a change to the translation. Are you sure you want to discard it?":"Sie haben die \u00dcbersetzung bearbeitet. Sind Sie sicher, dass Sie abbrechen wollen?",History:"Verlauf","Loading...":"Laden...",Translated:"\u00dcbersetzt",By:"von",At:"\u00fcber",google:"Google",bing:"Bing",apertium:"Apertium","manual translation":"manuelle \u00dcbersetzung","bing suggest":"Bing Suggest","google suggest":"Google Suggest","apertium suggest":"Apertium Suggest",
12
  "Edit Translation":"\u00dcbersetzung bearbeiten","Original text":"Originaltext","read alternate translations":"alternative \u00dcbersetzung lesen","previous translation":"Vorherige","find on page":"Auf Seite suchen","next translation":"N\u00e4chste","Translate to":"\u00dcbersetzen nach","view translation log":"\u00dcbersetzungsprotokoll anzeigen","virtual keyboard":"virtuelle Tastatur","approve translation":"\u00dcbersetzung genehmigen","delete":"L\u00f6schen",Discard:"Verwerfen",Cancel:"Abbrechen"};
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Schlie\u00dfen ohne Speichern?","You have made a change to the translation. Are you sure you want to discard it?":"Sie haben die \u00dcbersetzung bearbeitet. Sind Sie sicher, dass Sie abbrechen wollen?",History:"Verlauf","Loading...":"Laden...",Translated:"\u00dcbersetzt",By:"von",At:"\u00fcber",google:"Google",bing:"Bing",apertium:"Apertium","manual translation":"manuelle \u00dcbersetzung","bing suggest":"Bing Suggest","google suggest":"Google Suggest","apertium suggest":"Apertium Suggest",
12
  "Edit Translation":"\u00dcbersetzung bearbeiten","Original text":"Originaltext","read alternate translations":"alternative \u00dcbersetzung lesen","previous translation":"Vorherige","find on page":"Auf Seite suchen","next translation":"N\u00e4chste","Translate to":"\u00dcbersetzen nach","view translation log":"\u00dcbersetzungsprotokoll anzeigen","virtual keyboard":"virtuelle Tastatur","approve translation":"\u00dcbersetzung genehmigen","delete":"L\u00f6schen",Discard:"Verwerfen",Cancel:"Abbrechen"};
js/l/es.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Cerrar sin guardar?","You have made a change to the translation. Are you sure you want to discard it?":"Has cambiado la traducion. Estas seguro que lo quieres eliminar?",History:"Historia","Loading...":"Cargando...",Translated:"Traducido",By:"Por",At:"En",google:"google",bing:"bing",apertium:"apertium","manual translation":"traducci\u00f3n manual","bing suggest":"sugerencia de bing","google suggest":"sugerencia de google","apertium suggest":"sugerencia de apertium",
12
  "Edit Translation":"Editar traducci\u00f3n","Original text":"Texto original","read alternate translations":"lee traducci\u00f3nes alternativas","previous translation":"traducci\u00f3n anterior","find on page":"encuentra en la pagina","next translation":"siguiente traducci\u00f3n","Translate to":"Traducir a","view translation log":"muestra diario de traducion","virtual keyboard":"teclado virtual","approve translation":"aprueba traducion","delete":"eliminar",Discard:"Descartar",Cancel:"Cancelar"};
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Cerrar sin guardar?","You have made a change to the translation. Are you sure you want to discard it?":"Has cambiado la traducion. Estas seguro que lo quieres eliminar?",History:"Historia","Loading...":"Cargando...",Translated:"Traducido",By:"Por",At:"En",google:"google",bing:"bing",apertium:"apertium","manual translation":"traducci\u00f3n manual","bing suggest":"sugerencia de bing","google suggest":"sugerencia de google","apertium suggest":"sugerencia de apertium",
12
  "Edit Translation":"Editar traducci\u00f3n","Original text":"Texto original","read alternate translations":"lee traducci\u00f3nes alternativas","previous translation":"traducci\u00f3n anterior","find on page":"encuentra en la pagina","next translation":"siguiente traducci\u00f3n","Translate to":"Traducir a","view translation log":"muestra diario de traducion","virtual keyboard":"teclado virtual","approve translation":"aprueba traducion","delete":"eliminar",Discard:"Descartar",Cancel:"Cancelar"};
js/l/fa.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u0628\u062f\u0648\u0646 \u0646\u06af\u0647 \u062f\u0627\u0631\u06cc \u0628\u0628\u0646\u062f\u06cc\u0645\u061f","You have made a change to the translation. Are you sure you want to discard it?":"\u0634\u0645\u0627 \u062f\u0631 \u062a\u0631\u062c\u0645\u0647 \u06cc\u06a9 \u062f\u06af\u0631\u06af\u0648\u0646\u06cc \u0633\u0627\u062e\u062a\u0647 \u0627\u06cc\u062f \u0622\u06cc\u0627 \u0622\u06af\u0627\u0647\u0627\u0646\u0647 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0646 \u0631\u0627 \u062f\u0648\u0631 \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u062f\u061f ",
12
  History:"\u067e\u06cc\u0634\u06cc\u0646\u0647","Loading...":"\u0628\u0627\u0631\u06af\u06cc\u0631\u06cc...",Translated:"\u062a\u0631\u062c\u0645\u0647 \u0634\u062f\u0647",By:"\u0628\u0627",At:"\u062f\u0631",google:"\u06af\u0648\u06af\u0644",bing:"\u0628\u06cc\u0646\u06af",apertium:"\u0627\u0650\u06cc \u067e\u0650\u0631\u0634\u0650\u0645","manual translation":"\u062a\u0631\u062c\u0645\u0647 \u06cc \u062f\u0633\u062a\u06cc","bing suggest":"\u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0628\u06cc\u0646\u06af",
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u0628\u062f\u0648\u0646 \u0646\u06af\u0647 \u062f\u0627\u0631\u06cc \u0628\u0628\u0646\u062f\u06cc\u0645\u061f","You have made a change to the translation. Are you sure you want to discard it?":"\u0634\u0645\u0627 \u062f\u0631 \u062a\u0631\u062c\u0645\u0647 \u06cc\u06a9 \u062f\u06af\u0631\u06af\u0648\u0646\u06cc \u0633\u0627\u062e\u062a\u0647 \u0627\u06cc\u062f \u0622\u06cc\u0627 \u0622\u06af\u0627\u0647\u0627\u0646\u0647 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0646 \u0631\u0627 \u062f\u0648\u0631 \u0628\u06cc\u0646\u062f\u0627\u0632\u06cc\u062f\u061f ",
12
  History:"\u067e\u06cc\u0634\u06cc\u0646\u0647","Loading...":"\u0628\u0627\u0631\u06af\u06cc\u0631\u06cc...",Translated:"\u062a\u0631\u062c\u0645\u0647 \u0634\u062f\u0647",By:"\u0628\u0627",At:"\u062f\u0631",google:"\u06af\u0648\u06af\u0644",bing:"\u0628\u06cc\u0646\u06af",apertium:"\u0627\u0650\u06cc \u067e\u0650\u0631\u0634\u0650\u0645","manual translation":"\u062a\u0631\u062c\u0645\u0647 \u06cc \u062f\u0633\u062a\u06cc","bing suggest":"\u067e\u06cc\u0634\u0646\u0647\u0627\u062f \u0628\u06cc\u0646\u06af",
js/l/he.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u05dc\u05e1\u05d2\u05d5\u05e8 \u05d1\u05dc\u05d9 \u05dc\u05e9\u05de\u05d5\u05e8?","You have made a change to the translation. Are you sure you want to discard it?":"\u05d1\u05d9\u05e6\u05e2\u05ea \u05e9\u05d9\u05e0\u05d5\u05d9 \u05d1\u05ea\u05e8\u05d2\u05d5\u05dd, \u05d4\u05d0\u05dd \u05d0\u05ea\u05d4 \u05d1\u05d8\u05d5\u05d7 \u05e9\u05d0\u05ea\u05d4 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05d5\u05d5\u05ea\u05e8 \u05e2\u05dc\u05d9\u05d5?",History:"\u05d4\u05d9\u05e1\u05d8\u05d5\u05e8\u05d9\u05d4",
12
  "Loading...":"\u05d8\u05d5\u05e2\u05df...",Translated:"\u05ea\u05d5\u05e8\u05d2\u05dd",By:"\u05e2\u05dc \u05d9\u05d3\u05d9",At:"\u05d1",google:"\u05d2\u05d5\u05d2\u05dc",bing:"\u05d1\u05d9\u05e0\u05d2",apertium:"\u05d0\u05e4\u05e8\u05d8\u05d9\u05d5\u05dd","manual translation":"\u05ea\u05e8\u05d2\u05d5\u05dd \u05d9\u05d3\u05e0\u05d9","bing suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d1\u05d9\u05e0\u05d2","google suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d2\u05d5\u05d2\u05dc","apertium suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d0\u05e4\u05e8\u05d8\u05d9\u05d5\u05dd",
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u05dc\u05e1\u05d2\u05d5\u05e8 \u05d1\u05dc\u05d9 \u05dc\u05e9\u05de\u05d5\u05e8?","You have made a change to the translation. Are you sure you want to discard it?":"\u05d1\u05d9\u05e6\u05e2\u05ea \u05e9\u05d9\u05e0\u05d5\u05d9 \u05d1\u05ea\u05e8\u05d2\u05d5\u05dd, \u05d4\u05d0\u05dd \u05d0\u05ea\u05d4 \u05d1\u05d8\u05d5\u05d7 \u05e9\u05d0\u05ea\u05d4 \u05e8\u05d5\u05e6\u05d4 \u05dc\u05d5\u05d5\u05ea\u05e8 \u05e2\u05dc\u05d9\u05d5?",History:"\u05d4\u05d9\u05e1\u05d8\u05d5\u05e8\u05d9\u05d4",
12
  "Loading...":"\u05d8\u05d5\u05e2\u05df...",Translated:"\u05ea\u05d5\u05e8\u05d2\u05dd",By:"\u05e2\u05dc \u05d9\u05d3\u05d9",At:"\u05d1",google:"\u05d2\u05d5\u05d2\u05dc",bing:"\u05d1\u05d9\u05e0\u05d2",apertium:"\u05d0\u05e4\u05e8\u05d8\u05d9\u05d5\u05dd","manual translation":"\u05ea\u05e8\u05d2\u05d5\u05dd \u05d9\u05d3\u05e0\u05d9","bing suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d1\u05d9\u05e0\u05d2","google suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d2\u05d5\u05d2\u05dc","apertium suggest":"\u05d4\u05e6\u05e2\u05d5\u05ea \u05d0\u05e4\u05e8\u05d8\u05d9\u05d5\u05dd",
js/l/it.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Chiudere senza salvare?","You have made a change to the translation. Are you sure you want to discard it?":"&Egrave; stata fatta una modifica alla traduzione. Si &egrave; sicuri di volerla scartare?",History:"Storia","Loading...":"Caricamento...",Translated:"Tradotto",By:"Da",At:"A",google:"google",bing:"bing",apertium:"apertium","manual translation":"traduzione manuale","bing suggest":"bing suggerisce","google suggest":"google suggerisce","apertium suggest":"apertium suggerisce",
12
  "Edit Translation":"Modifica Traduzione","Original text":"Testo Originale","read alternate translations":"leggi le traduzioni alternative","previous translation":"traduzione precedente","find on page":"trova nella pagina","next translation":"prossima traduzione","Translate to":"Tradotto in","view translation log":"guarda il log delle traduzioni","virtual keyboard":"tastiera virtuale","approve translation":"approva traduzione","delete":"cancella",Discard:"Scarta",Cancel:"Cancella"};
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Chiudere senza salvare?","You have made a change to the translation. Are you sure you want to discard it?":"&Egrave; stata fatta una modifica alla traduzione. Si &egrave; sicuri di volerla scartare?",History:"Storia","Loading...":"Caricamento...",Translated:"Tradotto",By:"Da",At:"A",google:"google",bing:"bing",apertium:"apertium","manual translation":"traduzione manuale","bing suggest":"bing suggerisce","google suggest":"google suggerisce","apertium suggest":"apertium suggerisce",
12
  "Edit Translation":"Modifica Traduzione","Original text":"Testo Originale","read alternate translations":"leggi le traduzioni alternative","previous translation":"traduzione precedente","find on page":"trova nella pagina","next translation":"prossima traduzione","Translate to":"Tradotto in","view translation log":"guarda il log delle traduzioni","virtual keyboard":"tastiera virtuale","approve translation":"approva traduzione","delete":"cancella",Discard:"Scarta",Cancel:"Cancella"};
js/l/nl.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Sluiten zonder op te slaan?","You have made a change to the translation. Are you sure you want to discard it?":"Je hebt de vertaling aangepast. Weet je zeker dat je dat wilt annuleren?",History:"Geschiedenis","Loading...":"Aan het laden...",Translated:"Vertaald",By:"Door",At:"Op",google:"google",bing:"bing",apertium:"apertium","manual translation":"eigen vertaling","bing suggest":"bing suggestie","google suggest":"google suggestie","apertium suggest":"apertium suggestie",
12
  "Edit Translation":"Vertaling aanpassen","Original text":"Oorspronkelijke tekst","read alternate translations":"bekijk alternatieve vertaling","previous translation":"vorige","find on page":"laat op de pagina zien","next translation":"volgende","Translate to":"Vertaal naar","view translation log":"Bekijk vertaallog","virtual keyboard":"virtueel toetsenbord","approve translation":"vertaling goedkeuren","delete":"verwijder",Discard:"weggooien",Cancel:"Annuleren"};
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"Sluiten zonder op te slaan?","You have made a change to the translation. Are you sure you want to discard it?":"Je hebt de vertaling aangepast. Weet je zeker dat je dat wilt annuleren?",History:"Geschiedenis","Loading...":"Aan het laden...",Translated:"Vertaald",By:"Door",At:"Op",google:"google",bing:"bing",apertium:"apertium","manual translation":"eigen vertaling","bing suggest":"bing suggestie","google suggest":"google suggestie","apertium suggest":"apertium suggestie",
12
  "Edit Translation":"Vertaling aanpassen","Original text":"Oorspronkelijke tekst","read alternate translations":"bekijk alternatieve vertaling","previous translation":"vorige","find on page":"laat op de pagina zien","next translation":"volgende","Translate to":"Vertaal naar","view translation log":"Bekijk vertaallog","virtual keyboard":"virtueel toetsenbord","approve translation":"vertaling goedkeuren","delete":"verwijder",Discard:"weggooien",Cancel:"Annuleren"};
js/l/ru.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0431\u0435\u0437 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f?","You have made a change to the translation. Are you sure you want to discard it?":"\u0412\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e?",
12
  History:"\u0418\u0441\u0442\u043e\u0440\u0438\u044f","Loading...":"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",Translated:"\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043e",By:"",At:"\u0412",google:"",bing:"",apertium:"","manual translation":"\u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434","bing suggest":"\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 bing","google suggest":"\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 google",
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  t_jp.l={"Close without saving?":"\u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0431\u0435\u0437 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f?","You have made a change to the translation. Are you sure you want to discard it?":"\u0412\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435. \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u044d\u0442\u043e?",
12
  History:"\u0418\u0441\u0442\u043e\u0440\u0438\u044f","Loading...":"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",Translated:"\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043e",By:"",At:"\u0412",google:"",bing:"",apertium:"","manual translation":"\u0440\u0443\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434","bing suggest":"\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 bing","google suggest":"\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 google",
js/lazy.js CHANGED
@@ -15,4 +15,4 @@
15
  css:d.css,img:d.img},a.each(n,function(a,c){typeof c=="string"&&(c=c.split(","));k=k.concat(c)}),k.length?(d.timeout&&(q=setTimeout(function(){var e=j.concat(h);a.each(k,function(c,b){a.inArray(b,e)==-1&&h.push(b)});i("error")},d.timeout)),a.each(n,function(b,c){a.isArray(c)?a.each(c,function(a,c){g(b,c)}):typeof c=="string"&&g(b,c)})):i("error"))};this.js=function(b,e,c,d){var o=a('script[src*="'+b+'"]');if(o.length)o.attr("pending")?o.bind("scriptload",e):e();else{var f=document.createElement("script");
16
  f.setAttribute("type","text/javascript");f.setAttribute("charset","UTF-8");f.setAttribute("src",b+d);f.setAttribute("id",c);f.setAttribute("pending",1);f.onerror=r;a(f).bind("scriptload",function(){a(this).removeAttr("pending");e();setTimeout(function(){a(f).unbind("scriptload")},10)});var g=false;f.onload=f.onreadystatechange=function(){if(!g&&(!this.readyState||/loaded|complete/.test(this.readyState)))g=true,f.onload=f.onreadystatechange=null,a(f).trigger("scriptload")};l.appendChild(f)}};this.css=
17
  function(b,e,c,d){if(a('link[href*="'+b+'"]').length)e();else{var g=a('<link rel="stylesheet" type="text/css" media="all" href="'+b+d+'" id="'+c+'"></link>')[0];a.browser.msie?g.onreadystatechange=function(){/loaded|complete/.test(g.readyState)&&e()}:a.browser.opera?g.onload=e:(location.hostname.replace("www.",""),/http:/.test(b)&&/^(\w+:)?\/\/([^\/?#]+)/.exec(b),e());l.appendChild(g)}};this.img=function(a,d,c,g){c=new Image;c.onload=d;c.onerror=r;c.src=a+g};this.disable=function(b){a("#lazy-loaded-"+
18
- b,l).attr("disabled","disabled")};this.enable=function(b){a("#lazy-loaded-"+b,l).removeAttr("disabled")};this.destroy=function(b){a("#lazy-loaded-"+b,l).remove()}}a.xLazyLoader=function(a,i){typeof a=="object"&&(i=a,a="init");(new m)[a](i)};a.xLazyLoader.defaults={js:[],css:[],img:[],jsKey:null,cssKey:null,imgKey:null,name:null,timeout:2E4,success:a.noop,error:a.noop,complete:a.noop,each:a.noop};var l=document.getElementsByTagName("head")[0]})(jQuery);
15
  css:d.css,img:d.img},a.each(n,function(a,c){typeof c=="string"&&(c=c.split(","));k=k.concat(c)}),k.length?(d.timeout&&(q=setTimeout(function(){var e=j.concat(h);a.each(k,function(c,b){a.inArray(b,e)==-1&&h.push(b)});i("error")},d.timeout)),a.each(n,function(b,c){a.isArray(c)?a.each(c,function(a,c){g(b,c)}):typeof c=="string"&&g(b,c)})):i("error"))};this.js=function(b,e,c,d){var o=a('script[src*="'+b+'"]');if(o.length)o.attr("pending")?o.bind("scriptload",e):e();else{var f=document.createElement("script");
16
  f.setAttribute("type","text/javascript");f.setAttribute("charset","UTF-8");f.setAttribute("src",b+d);f.setAttribute("id",c);f.setAttribute("pending",1);f.onerror=r;a(f).bind("scriptload",function(){a(this).removeAttr("pending");e();setTimeout(function(){a(f).unbind("scriptload")},10)});var g=false;f.onload=f.onreadystatechange=function(){if(!g&&(!this.readyState||/loaded|complete/.test(this.readyState)))g=true,f.onload=f.onreadystatechange=null,a(f).trigger("scriptload")};l.appendChild(f)}};this.css=
17
  function(b,e,c,d){if(a('link[href*="'+b+'"]').length)e();else{var g=a('<link rel="stylesheet" type="text/css" media="all" href="'+b+d+'" id="'+c+'"></link>')[0];a.browser.msie?g.onreadystatechange=function(){/loaded|complete/.test(g.readyState)&&e()}:a.browser.opera?g.onload=e:(location.hostname.replace("www.",""),/http:/.test(b)&&/^(\w+:)?\/\/([^\/?#]+)/.exec(b),e());l.appendChild(g)}};this.img=function(a,d,c,g){c=new Image;c.onload=d;c.onerror=r;c.src=a+g};this.disable=function(b){a("#lazy-loaded-"+
18
+ b,l).attr("disabled","disabled")};this.enable=function(b){a("#lazy-loaded-"+b,l).removeAttr("disabled")};this.destroy=function(b){a("#lazy-loaded-"+b,l).remove()}}a.xLazyLoader=function(a,i){typeof a=="object"&&(i=a,a="init");(new m)[a](i)};a.xLazyLoader.defaults={js:[],css:[],img:[],jsKey:null,cssKey:null,imgKey:null,name:null,timeout:2E4,success:a.noop,error:a.noop,complete:a.noop,each:a.noop};var l=document.getElementsByTagName("head")[0]})(t_jp.$);
js/transposh.js CHANGED
@@ -1,19 +1,19 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  (function(c){function A(b,a){if(c.trim(a).length!==0){var d=function(){var b=c(this).attr("id").substr(c(this).attr("id").lastIndexOf("_")+1),a=c("#"+e+"img_"+b);c("#"+e+b).attr("data-source",1);a.removeClass("tr-icon-yellow").removeClass("tr-icon-green").addClass("tr-icon-yellow")};c("*[data-token='"+b+"'][data-hidden!='y']").html(a).each(d);c("*[data-token='"+b+"'][data-hidden='y']").attr("data-trans",a).each(d)}}function B(b,a){clearTimeout(q);h.push(b);o.push(a);A(b,a);q=setTimeout(function(){var b=
12
  {ln0:t_jp.lang,sr0:p,action:"tp_translation",items:h.length},a;for(a=0;a<h.length;a+=1)b["tk"+a]=h[a],b["tr"+a]=o[a],r+=c("*[data-token='"+h[a]+"']").size();c.ajax({type:"POST",url:t_jp.ajaxurl,data:b,success:function(){var b=r/i*100;t_jp.progress&&c("#"+k).progressbar("value",b)}});o=[];h=[]},200)}function j(b,a){B(b,c("<div>"+c.trim(a)+"</div>").text());var d=(i-c("."+e+'[data-source=""]').size())/i*100;t_jp.progress&&c("#"+l).progressbar("value",d)}function s(b,a,d){c.ajax({url:t_jp.ajaxurl,dataType:"json",
13
  data:{action:"tp_gp",tl:d,q:b},success:a})}function t(b,a){s(a,function(a){c(a.results).each(function(a){j(b[a],this)})},t_jp.lang)}function u(b,a,d){c.ajax({url:"https://www.googleapis.com/language/translate/v2",dataType:"jsonp",data:{key:t_jp.google_key,q:b,target:d,source:t_jp.olang},traditional:true,success:a})}function C(b,a){u(a,function(d){typeof d.error!=="undefined"?t(b,a):c(d.data.translations).each(function(a){j(b[a],this.translatedText)})},t_jp.lang)}function m(b,a,d){if(t_jp.msn_key){var f=
14
  "[";c(b).each(function(a){f+='"'+encodeURIComponent(b[a].replace(/[\\"]/g,"\\$&"))+'",'});f=f.slice(0,-1)+"]";c.ajax({url:"http://api.microsofttranslator.com/V2/Ajax.svc/TranslateArray?appId="+t_jp.msn_key+"&to="+d+"&texts="+f,dataType:"jsonp",jsonp:"oncomplete",success:a})}else v===1?setTimeout(function(){m(b,a,d)},500):(v=1,c.getScript("http://www.microsofttranslator.com/ajax/v2/toolkit.ashx?loc=en&toolbar=none",function(){t_jp.msn_key=_mstConfig.appId;m(b,a,d)}))}function D(b,a){p=2;m(a,function(a){c(a).each(function(a){j(b[a],
15
  this.TranslatedText)})},t_jp.binglang)}function w(b,a,d){c.ajax({url:"http://api.apertium.org/json/translate",data:{q:b,langpair:t_jp.olang+"|"+d,markUnknown:"no"},dataType:"jsonp",traditional:true,success:a})}function E(b,a){p=3;w(a,function(a){a.responseStatus>=200&&a.responseStatus<300&&(a.responseData.translatedText!==void 0?j(b[0],a.responseData.translatedText):c(a.responseData).each(function(a){this.responseStatus===200&&j(b[a],this.responseData.translatedText)}))},t_jp.lang)}function x(b,a){t_jp.msn&&
16
- t_jp.preferred==="2"?D(b,a):t_jp.apertium&&(t_jp.olang==="en"||t_jp.olang==="es")?E(b,a):t_jp.google_key?C(b,a):t(b,a)}function y(){var b=[],a=0,d=[],f=[];c("."+e+'[data-source=""]').each(function(){var e=c(this).attr("data-token"),g=c(this).attr("data-orig");g===void 0&&(g=c(this).html());b[g]!==1&&(b[g]=1,a+g.length>F&&(x(f,d),a=0,d=[],f=[]),a+=g.length,f.push(e),d.push(g))});x(f,d)}function z(b){typeof c.xLazyLoader==="function"?b():c.getScript(t_jp.plugin_url+"/js/lazy.js",b)}function n(b){n.hit?
17
- b():(n.hit=true,z(function(){c.xLazyLoader({js:t_jp.jQueryUI+"jquery-ui.min.js",css:t_jp.jQueryUI+"themes/"+t_jp.theme+"/jquery-ui.css",success:b})}))}var F=512,i,e=t_jp.prefix,l=e+"pbar",k=l+"_s",p=1,r=0,q,h=[],o=[],v=0;t_jp.jQueryUI="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/";t_jp.dgpt=s;t_jp.dgt=u;t_jp.dmt=m;t_jp.dat=w;t_jp.tfl=z;t_jp.tfju=n;c(document).ready(function(){if(t_jp.msn)if(t_jp.binglang=t_jp.lang,t_jp.binglang==="zh")t_jp.binglang="zh-chs";else if(t_jp.binglang==="zh-tw")t_jp.binglang=
18
- "zh-cht";c("."+e+"setdeflang").click(function(){c.ajax({url:t_jp.ajaxurl,data:{action:"tp_cookie"},cache:false});c("."+e+"setdeflang").hide("slow");return false});i=c("."+e+'[data-source=""]').size();c.ajaxSetup({cache:true});if(i&&!t_jp.noauto&&(t_jp.google||t_jp.msn||t_jp.apertium))t_jp.progress?n(function(){c("#"+e+"credit").css({overflow:"auto"}).append('<div style="float: left;width: 90%;height: 10px" id="'+l+'"/><div style="margin-bottom:10px;float:left;width: 90%;height: 10px" id="'+k+'"/>');
19
- c("#"+l).progressbar({value:0});c("#"+k).progressbar({value:0});c("#"+k+" > div").css({background:"#28F828",border:"#08A908 1px solid"});y()}):y();t_jp.edit&&c.getScript(t_jp.plugin_url+"/js/transposhedit.js")})})(jQuery);
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  (function(c){function A(b,a){if(c.trim(a).length!==0){var d=function(){var b=c(this).attr("id").substr(c(this).attr("id").lastIndexOf("_")+1),a=c("#"+e+"img_"+b);c("#"+e+b).attr("data-source",1);a.removeClass("tr-icon-yellow").removeClass("tr-icon-green").addClass("tr-icon-yellow")};c("*[data-token='"+b+"'][data-hidden!='y']").html(a).each(d);c("*[data-token='"+b+"'][data-hidden='y']").attr("data-trans",a).each(d)}}function B(b,a){clearTimeout(q);h.push(b);o.push(a);A(b,a);q=setTimeout(function(){var b=
12
  {ln0:t_jp.lang,sr0:p,action:"tp_translation",items:h.length},a;for(a=0;a<h.length;a+=1)b["tk"+a]=h[a],b["tr"+a]=o[a],r+=c("*[data-token='"+h[a]+"']").size();c.ajax({type:"POST",url:t_jp.ajaxurl,data:b,success:function(){var b=r/i*100;t_jp.progress&&c("#"+k).progressbar("value",b)}});o=[];h=[]},200)}function j(b,a){B(b,c("<div>"+c.trim(a)+"</div>").text());var d=(i-c("."+e+'[data-source=""]').size())/i*100;t_jp.progress&&c("#"+l).progressbar("value",d)}function s(b,a,d){c.ajax({url:t_jp.ajaxurl,dataType:"json",
13
  data:{action:"tp_gp",tl:d,q:b},success:a})}function t(b,a){s(a,function(a){c(a.results).each(function(a){j(b[a],this)})},t_jp.lang)}function u(b,a,d){c.ajax({url:"https://www.googleapis.com/language/translate/v2",dataType:"jsonp",data:{key:t_jp.google_key,q:b,target:d,source:t_jp.olang},traditional:true,success:a})}function C(b,a){u(a,function(d){typeof d.error!=="undefined"?t(b,a):c(d.data.translations).each(function(a){j(b[a],this.translatedText)})},t_jp.lang)}function m(b,a,d){if(t_jp.msn_key){var f=
14
  "[";c(b).each(function(a){f+='"'+encodeURIComponent(b[a].replace(/[\\"]/g,"\\$&"))+'",'});f=f.slice(0,-1)+"]";c.ajax({url:"http://api.microsofttranslator.com/V2/Ajax.svc/TranslateArray?appId="+t_jp.msn_key+"&to="+d+"&texts="+f,dataType:"jsonp",jsonp:"oncomplete",success:a})}else v===1?setTimeout(function(){m(b,a,d)},500):(v=1,c.getScript("http://www.microsofttranslator.com/ajax/v2/toolkit.ashx?loc=en&toolbar=none",function(){t_jp.msn_key=_mstConfig.appId;m(b,a,d)}))}function D(b,a){p=2;m(a,function(a){c(a).each(function(a){j(b[a],
15
  this.TranslatedText)})},t_jp.binglang)}function w(b,a,d){c.ajax({url:"http://api.apertium.org/json/translate",data:{q:b,langpair:t_jp.olang+"|"+d,markUnknown:"no"},dataType:"jsonp",traditional:true,success:a})}function E(b,a){p=3;w(a,function(a){a.responseStatus>=200&&a.responseStatus<300&&(a.responseData.translatedText!==void 0?j(b[0],a.responseData.translatedText):c(a.responseData).each(function(a){this.responseStatus===200&&j(b[a],this.responseData.translatedText)}))},t_jp.lang)}function x(b,a){t_jp.msn&&
16
+ t_jp.preferred==="2"?D(b,a):t_jp.apertium&&(t_jp.olang==="en"||t_jp.olang==="es")?E(b,a):t_jp.google_key?C(b,a):t(b,a)}function y(){var b=[],a=0,d=[],f=[];c("."+e+'[data-source=""]').each(function(){var e=c(this).attr("data-token"),g=c(this).attr("data-orig");g===void 0&&(g=c(this).html());b[g]!==1&&(b[g]=1,a+encodeURIComponent(g).length>F&&(x(f,d),a=0,d=[],f=[]),a+=encodeURIComponent(g).length,f.push(e),d.push(g))});x(f,d)}function z(b){typeof c.xLazyLoader==="function"?b():(t_jp.$=c,c.getScript(t_jp.plugin_url+
17
+ "/js/lazy.js",b))}function n(b){n.hit?b():(n.hit=true,z(function(){c.fn.propAttr=c.fn.prop||c.fn.attr;c.xLazyLoader({js:t_jp.jQueryUI+"jquery-ui.min.js",css:t_jp.jQueryUI+"themes/"+t_jp.theme+"/jquery-ui.css",success:b})}))}var F=1024,i,e=t_jp.prefix,l=e+"pbar",k=l+"_s",p=1,r=0,q,h=[],o=[],v=0;t_jp.jQueryUI="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/";t_jp.dgpt=s;t_jp.dgt=u;t_jp.dmt=m;t_jp.dat=w;t_jp.tfl=z;t_jp.tfju=n;c(function(){if(t_jp.msn)if(t_jp.binglang=t_jp.lang,t_jp.binglang===
18
+ "zh")t_jp.binglang="zh-chs";else if(t_jp.binglang==="zh-tw")t_jp.binglang="zh-cht";c("."+e+"setdeflang").click(function(){c.ajax({url:t_jp.ajaxurl,data:{action:"tp_cookie"},cache:false});c("."+e+"setdeflang").hide("slow");return false});i=c("."+e+'[data-source=""]').size();c.ajaxSetup({cache:true});if(i&&!t_jp.noauto&&(t_jp.google||t_jp.msn||t_jp.apertium))t_jp.progress?n(function(){c("#"+e+"credit").css({overflow:"auto"}).append('<div style="float: left;width: 90%;height: 10px" id="'+l+'"/><div style="margin-bottom:10px;float:left;width: 90%;height: 10px" id="'+
19
+ k+'"/>');c("#"+l).progressbar({value:0});c("#"+k).progressbar({value:0});c("#"+k+" > div").css({background:"#28F828",border:"#08A908 1px solid"});y()}):y();t_jp.edit&&c.getScript(t_jp.plugin_url+"/js/transposhedit.js")})})(jQuery);
js/transposhbackend.js CHANGED
@@ -1,15 +1,15 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  (function(e){function t(b,a){n+=1;e("#progress_bar").progressbar("value",n/o*100);e("#p").text("("+a+") "+b);n===o&&e("#tr_loading").data("done",true)}function j(b,a,c,f){a=e("<div>"+e.trim(a)+"</div>").text();t(a,c);clearTimeout(p);l+=1;k.push(b);g.push(a);h.push(c);i.push(f);p=setTimeout(function(){var a={action:"tp_translation",items:l},d;for(d=0;d<l;d+=1)k[d]!==k[d-1]&&(a["tk"+d]=k[d]),h[d]!==h[d-1]&&(a["ln"+d]=h[d]),g[d]!==g[d-1]&&(a["tr"+d]=g[d]),i[d]!==i[d-1]&&(a["sr"+d]=i[d]);e.ajax({type:"POST",
12
  url:t_jp.ajaxurl,data:a,success:function(){},error:function(){}});l=0;g=[];k=[];h=[];i=[]},200)}function u(b,a,c){var f=c;f==="zh"?f="zh-chs":f==="zh-tw"&&(f="zh-cht");t_jp.dmt(a,function(a){e(a).each(function(a){j(b[a],this.TranslatedText,c,2)})},f)}function v(b,a,c){t_jp.dat(a,function(a){a.responseStatus>=200&&a.responseStatus<300&&(a.responseData.translatedText!==void 0?j(b[0],a.responseData.translatedText):e(a.responseData).each(function(a){this.responseStatus===200&&j(b[a],this.responseData.translatedText,
13
  c,3)}))},c)}function q(b,a,c){t_jp.dgpt(a,function(a){e(a.results).each(function(a){j(b[a],this,c,1)})},c)}function w(b,a,c){t_jp.dgt(a,function(f){typeof f.error!=="undefined"?q(b,a,c):e(f.data.translations).each(function(a){j(b[a],this.translatedText,c,1)})},c)}function r(b,a,c){t_be.m_langs.indexOf(c)!==-1&&t_jp.preferred==="2"?u(b,a,c):t_be.a_langs.indexOf(c)!==-1&&(t_jp.olang==="en"||t_jp.olang==="es")?v(b,a,c):t_jp.google_key?w(b,a,c):q(b,a,c)}function s(b){var a="",c=[],f=[],j,d,m,k=0,g=[],
14
  h=[],i;e("#tr_loading").data("done",false);e.ajax({url:ajaxurl,dataType:"json",data:{action:"tp_post_phrases",post:b},cache:false,success:function(b){e("#tr_translate_title").html("Translating post: "+b.posttitle);if(b.length===void 0)e("#tr_loading").html("Nothing left to translate"),e("#tr_loading").data("done",true);else{n=o=0;for(d in b.p)o+=b.p[d].l.length;e("#tr_loading").html('<br/>Translation: <span id="p"></span><div id="progress_bar"/>');e("#progress_bar").progressbar({value:0});for(var l in b.langs){a=
15
- b.langs[l];f=[];c=[];for(d in b.p)m=b.p[d],m.l.indexOf(a)!==-1&&(f.push(unescape(d)),c.push(m.t),m.l.splice(m.l.indexOf(a),1),m.l.length===0&&(b.length-=1,delete b.p[d]));if(f.length){for(j in f)i=f[j],k+i.length>x&&(r(h,g,a),k=0,g=[],h=[]),k+=i.length,h.push(c[j]),g.push(i);r(h,g,a)}}}}})}var p,l=0,g=[],k=[],h=[],i=[],x=512,o=0,n=0;window.translate_post=s;e(document).ready(function(){t_be.post&&s(t_be.post)})})(jQuery);
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  (function(e){function t(b,a){n+=1;e("#progress_bar").progressbar("value",n/o*100);e("#p").text("("+a+") "+b);n===o&&e("#tr_loading").data("done",true)}function j(b,a,c,f){a=e("<div>"+e.trim(a)+"</div>").text();t(a,c);clearTimeout(p);l+=1;k.push(b);g.push(a);h.push(c);i.push(f);p=setTimeout(function(){var a={action:"tp_translation",items:l},d;for(d=0;d<l;d+=1)k[d]!==k[d-1]&&(a["tk"+d]=k[d]),h[d]!==h[d-1]&&(a["ln"+d]=h[d]),g[d]!==g[d-1]&&(a["tr"+d]=g[d]),i[d]!==i[d-1]&&(a["sr"+d]=i[d]);e.ajax({type:"POST",
12
  url:t_jp.ajaxurl,data:a,success:function(){},error:function(){}});l=0;g=[];k=[];h=[];i=[]},200)}function u(b,a,c){var f=c;f==="zh"?f="zh-chs":f==="zh-tw"&&(f="zh-cht");t_jp.dmt(a,function(a){e(a).each(function(a){j(b[a],this.TranslatedText,c,2)})},f)}function v(b,a,c){t_jp.dat(a,function(a){a.responseStatus>=200&&a.responseStatus<300&&(a.responseData.translatedText!==void 0?j(b[0],a.responseData.translatedText):e(a.responseData).each(function(a){this.responseStatus===200&&j(b[a],this.responseData.translatedText,
13
  c,3)}))},c)}function q(b,a,c){t_jp.dgpt(a,function(a){e(a.results).each(function(a){j(b[a],this,c,1)})},c)}function w(b,a,c){t_jp.dgt(a,function(f){typeof f.error!=="undefined"?q(b,a,c):e(f.data.translations).each(function(a){j(b[a],this.translatedText,c,1)})},c)}function r(b,a,c){t_be.m_langs.indexOf(c)!==-1&&t_jp.preferred==="2"?u(b,a,c):t_be.a_langs.indexOf(c)!==-1&&(t_jp.olang==="en"||t_jp.olang==="es")?v(b,a,c):t_jp.google_key?w(b,a,c):q(b,a,c)}function s(b){var a="",c=[],f=[],j,d,m,k=0,g=[],
14
  h=[],i;e("#tr_loading").data("done",false);e.ajax({url:ajaxurl,dataType:"json",data:{action:"tp_post_phrases",post:b},cache:false,success:function(b){e("#tr_translate_title").html("Translating post: "+b.posttitle);if(b.length===void 0)e("#tr_loading").html("Nothing left to translate"),e("#tr_loading").data("done",true);else{n=o=0;for(d in b.p)o+=b.p[d].l.length;e("#tr_loading").html('<br/>Translation: <span id="p"></span><div id="progress_bar"/>');e("#progress_bar").progressbar({value:0});for(var l in b.langs){a=
15
+ b.langs[l];f=[];c=[];for(d in b.p)m=b.p[d],m.l.indexOf(a)!==-1&&(f.push(unescape(d)),c.push(m.t),m.l.splice(m.l.indexOf(a),1),m.l.length===0&&(b.length-=1,delete b.p[d]));if(f.length){for(j in f)i=f[j],k+i.length>x&&(r(h,g,a),k=0,g=[],h=[]),k+=i.length,h.push(c[j]),g.push(i);r(h,g,a)}}}}})}var p,l=0,g=[],k=[],h=[],i=[],x=512,o=0,n=0;window.translate_post=s;e(function(){t_be.post&&s(t_be.post)})})(jQuery);
js/transposhcommentslang.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Transposh v0.8.1
3
+ * http://transposh.org/
4
+ *
5
+ * Copyright 2011, Team Transposh
6
+ * Licensed under the GPL Version 2 or higher.
7
+ * http://transposh.org/license
8
+ *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
+ */
11
+ (function(a){var c={en:"English - English",af:"Afrikaans - Afrikaans",sq:"Albanian - Shqip",ar:"Arabic - \u0627\u0644\u0639\u0631\u0628\u064a\u0629",hy:"Armenian - \u0540\u0561\u0575\u0565\u0580\u0565\u0576",az:"Azerbaijani - az\u0259rbaycan dili",eu:"Basque - Euskara",be:"Belarusian - \u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bn:"Bengali - \u09ac\u09be\u0982\u09b2\u09be",bg:"Bulgarian - \u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",ca:"Catalan - Catal\u00e0",zh:"Chinese (Simplified) - \u4e2d\u6587(\u7b80\u4f53)",
12
+ "zh-tw":"Chinese (Traditional) - \u4e2d\u6587(\u6f22\u5b57)",hr:"Croatian - Hrvatski",cs:"Czech - \u010ce\u0161tina",da:"Danish - Dansk",nl:"Dutch - Nederlands",eo:"Esperanto - Esperanto",et:"Estonian - Eesti keel",fi:"Finnish - Suomi",fr:"French - Fran\u00e7ais",gl:"Galician - Galego",ka:"Georgian - \u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",de:"German - Deutsch",el:"Greek - \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",gu:"Gujarati - \u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",ht:"Haitian - Krey\u00f2l ayisyen",
13
+ he:"Hebrew - \u05e2\u05d1\u05e8\u05d9\u05ea",hi:"Hindi - \u0939\u093f\u0928\u094d\u0926\u0940; \u0939\u093f\u0902\u0926\u0940",hu:"Hungarian - Magyar",is:"Icelandic - \u00cdslenska",id:"Indonesian - Bahasa Indonesia",ga:"Irish - Gaeilge",it:"Italian - Italiano",ja:"Japanese - \u65e5\u672c\u8a9e",kn:"Kannada - \u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ko:"Korean - \uc6b0\ub9ac\ub9d0",la:"Latin - Lat\u012bna",lv:"Latvian - Latvie\u0161u valoda",lt:"Lithuanian - Lietuvi\u0173 kalba",mk:"Macedonian - \u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",
14
+ ms:"Malay - Bahasa Melayu",mt:"Maltese - Malti",no:"Norwegian - Norsk",fa:"Persian - \u067e\u0627\u0631\u0633\u06cc",pl:"Polish - Polski",pt:"Portuguese - Portugu\u00eas",ro:"Romanian - Rom\u00e2n\u0103",ru:"Russian - \u0420\u0443\u0441\u0441\u043a\u0438\u0439",sr:"Serbian - C\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",sk:"Slovak - Sloven\u010dina",sl:"Slovene - Sloven\u0161\u010dina",es:"Spanish - Espa\u00f1ol",sw:"Swahili - Kiswahili",sv:"Swedish - Svenska",tl:"Tagalog - Tagalog",
15
+ ta:"Tamil - \u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"Telugu - \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",th:"Thai - \u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",tr:"Turkish - T\u00fcrk\u00e7e",uk:"Ukrainian - \u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"Urdu - \u0627\u0631\u062f\u0648",vi:"Vietnamese - Ti\u1ebfng Vi\u1ec7t",cy:"Welsh - Cymraeg",yi:"Yiddish - \u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"};a(function(){var f=function(){var d='<option value="">Unset</option>',e,g=a(this).data("lang");
16
+ a.each(c,function(a){e=a===g?'selected="selected"':"";d+='<option value="'+a+'"'+e+">"+c[a]+"</option>"});a(this).closest(".row-actions").toggleClass("row-actions-active").toggleClass("row-actions");a(this).replaceWith('<select data-cid="'+a(this).data("cid")+'">'+d+"</select>");a(".language select").change(function(){a.get(ajaxurl,{action:"tp_comment_lang",lang:a(this).val(),cid:a(this).data("cid")});var b=a(this).data("cid");a(this).closest(".row-actions-active").toggleClass("row-actions-active").toggleClass("row-actions");
17
+ a(this).replaceWith('<a data-cid="'+b+'" data-lang="'+a(this).val()+'" href="" onclick="return false">'+a("[data-cid="+b+"] option:selected").text()+"</a>");a("[data-cid="+b+"]").click(f)})};a(".language a").click(f)})})(jQuery);
js/transposhedit.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  (function(a){function e(a){var b;return typeof t_jp.l==="object"&&(b=t_jp.l[a])?b:a}function m(c,d,e){a.trim(d).length===0&&(d=a("[data-token='"+c+"']").attr("data-orig"));var f=function(){var c=a(this).attr("id").substr(a(this).attr("id").lastIndexOf("_")+1),d=a(b+"img_"+c);a(b+c).attr("data-source",e);d.removeClass("tr-icon-yellow").removeClass("tr-icon-green");e==0?d.addClass("tr-icon-green"):e&&d.addClass("tr-icon-yellow")};a("*[data-token='"+c+"'][data-hidden!='y']").html(d).each(f);a("*[data-token='"+
12
  c+"'][data-hidden='y']").attr("data-trans",d).each(f);a(b+"translation").data("origval",d);a(b+"translation").keyup()}function n(b,d){m(b,d,0);a.ajax({type:"POST",url:t_jp.ajaxurl,data:{action:"tp_translation",ln0:t_jp.lang,sr0:0,items:1,tk0:b,tr0:d},error:function(a){m(b,"",1);alert("Problem saving translation, contact support.\n\nServer's message: "+a.statusText)}})}function w(){t_jp.google_key?t_jp.dgt(a(b+"original").val(),function(c){a(b+"translation").val(a("<div>"+a.trim(c.data.translations[0].translatedText)+
@@ -29,9 +29,10 @@ e=a(b+c).attr("data-token");n(e,d)}c=Number(c)+1;p(c)});a(b+"zoom").click(functi
29
  "slow")});a(b+"history").button({icons:{primary:"ui-icon-clipboard"},text:false}).click(function(){A(c)});a(b+"keyboard").button({icons:{primary:"ui-icon-calculator"},text:false}).click(function(){t_jp.tfl(function(){a.xLazyLoader({js:[t_jp.plugin_url+"/js/keyboard.js"],css:[t_jp.plugin_url+"/css/keyboard.css"],success:function(){VKI_attach(a(b+"translation").get(0));VKI_show(a(b+"translation").get(0))}})})});a(b+"google").button({icons:{primary:"tr-icon-google"},text:false}).click(function(){w();
30
  a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"bing").button({icons:{primary:"tr-icon-bing"},text:false}).click(function(){x();a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"apertium").button({icons:{primary:"tr-icon-apertium"},text:false}).click(function(){y();a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"approve").button({icons:{primary:"ui-icon-check"},text:false}).click(function(){var d=a(b+"translation").val(),e=a(b+c).attr("data-token");
31
  (a(b+"translation").data("changed")||a(b+c).attr("data-source")!=="0")&&n(e,d)});a(b+"translation").keyup(function(){a(this).data("origval")!==a(this).val()?(a(this).addClass("ui-state-highlight"),a(b+"approve").button("enable"),a(this).data("changed",true)):(a(this).removeClass("ui-state-highlight"),a(b+c).attr("data-source")==="0"&&a(b+"approve").button("disable"),a(this).data("changed",false))});p(c);a(g).dialog({resizable:false,width:500});a("html").attr("dir")==="rtl"&&o(g);a(b+"orglang").blur();
32
- a(g).bind("dialogclose",function(){typeof VKI_close==="function"&&VKI_close(a(b+"translation").get(0));a(b+"historydialog").remove()});a(g).bind("dialogbeforeclose",function(){return a(b+"translation").data("changed")?(z(),false):true})}var l={en:"English",af:"Afrikaans",sq:"Shqip",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",hy:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",az:"az\u0259rbaycan dili",eu:"Euskara",be:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
33
- ca:"Catal\u00e0",zh:"\u4e2d\u6587 - \u7b80\u4f53","zh-tw":"\u4e2d\u6587 - \u6f22\u5b57",hr:"Hrvatski",cs:"\u010ce\u0161tina",da:"Dansk",nl:"Nederlands",eo:"Esperanto",et:"Eesti keel",fi:"Suomi",fr:"Fran\u00e7ais",gl:"Galego",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",de:"Deutsch",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",ht:"Krey\u00f2l ayisyen",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",hi:"\u0939\u093f\u0928\u094d\u0926\u0940; \u0939\u093f\u0902\u0926\u0940",hu:"Magyar",is:"\u00cdslenska",
34
- id:"Bahasa Indonesia",ga:"Gaeilge",it:"Italiano",ja:"\u65e5\u672c\u8a9e",ko:"\uc6b0\ub9ac\ub9d0",la:"lat\u012bna",lv:"Latvie\u0161u valoda",lt:"Lietuvi\u0173 kalba",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",ms:"Bahasa Melayu",mt:"Malti",no:"Norsk",fa:"\u0641\u0627\u0631\u0633\u06cc",pl:"Polski",pt:"Portugu\u00eas",ro:"Rom\u00e2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",sr:"C\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",
35
- sk:"Sloven\u010dina",sl:"Sloven\u0161\u010dina",es:"Espa\u00f1ol",sw:"Kiswahili",sv:"svenska",tl:"Tagalog",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",tr:"T\u00fcrk\u00e7e",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648",vi:"Ti\u1ebfng Vi\u1ec7t",cy:"Cymraeg",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"},d=t_jp.prefix,b="#"+d,v=false,t="prev",u="next",j="right",i="left";a("html").attr("dir")==="rtl"&&(j="left",i="right",t="next",u="prev");a("."+d).each(function(){var c=
36
- a(this).attr("id").substr(a(this).attr("id").lastIndexOf("_")+1),e;a(this).after('<span id="'+d+"img_"+c+'" class="tr-icon" title="'+a(this).attr("data-orig")+'"></span>');e=a(b+"img_"+c);var i=function(){t_jp.locale&&!v?a.getScript(t_jp.plugin_url+"/js/l/"+t_jp.lang+".js",function(){v=true;s(c)}):s(c)};e.click(function(){t_jp.tfju(function(){i()});return false}).css({border:"0px",margin:"1px",padding:"0px"});a(this).attr("data-source")==="0"?e.addClass("tr-icon-green"):a(this).attr("data-source")&&
37
- e.addClass("tr-icon-yellow");a(this).attr("data-hidden")==="y"&&e.css({opacity:"0.6"})})})(jQuery);
 
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  (function(a){function e(a){var b;return typeof t_jp.l==="object"&&(b=t_jp.l[a])?b:a}function m(c,d,e){a.trim(d).length===0&&(d=a("[data-token='"+c+"']").attr("data-orig"));var f=function(){var c=a(this).attr("id").substr(a(this).attr("id").lastIndexOf("_")+1),d=a(b+"img_"+c);a(b+c).attr("data-source",e);d.removeClass("tr-icon-yellow").removeClass("tr-icon-green");e==0?d.addClass("tr-icon-green"):e&&d.addClass("tr-icon-yellow")};a("*[data-token='"+c+"'][data-hidden!='y']").html(d).each(f);a("*[data-token='"+
12
  c+"'][data-hidden='y']").attr("data-trans",d).each(f);a(b+"translation").data("origval",d);a(b+"translation").keyup()}function n(b,d){m(b,d,0);a.ajax({type:"POST",url:t_jp.ajaxurl,data:{action:"tp_translation",ln0:t_jp.lang,sr0:0,items:1,tk0:b,tr0:d},error:function(a){m(b,"",1);alert("Problem saving translation, contact support.\n\nServer's message: "+a.statusText)}})}function w(){t_jp.google_key?t_jp.dgt(a(b+"original").val(),function(c){a(b+"translation").val(a("<div>"+a.trim(c.data.translations[0].translatedText)+
29
  "slow")});a(b+"history").button({icons:{primary:"ui-icon-clipboard"},text:false}).click(function(){A(c)});a(b+"keyboard").button({icons:{primary:"ui-icon-calculator"},text:false}).click(function(){t_jp.tfl(function(){a.xLazyLoader({js:[t_jp.plugin_url+"/js/keyboard.js"],css:[t_jp.plugin_url+"/css/keyboard.css"],success:function(){VKI_attach(a(b+"translation").get(0));VKI_show(a(b+"translation").get(0))}})})});a(b+"google").button({icons:{primary:"tr-icon-google"},text:false}).click(function(){w();
30
  a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"bing").button({icons:{primary:"tr-icon-bing"},text:false}).click(function(){x();a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"apertium").button({icons:{primary:"tr-icon-apertium"},text:false}).click(function(){y();a("."+d+"suggest").button("enable");a(this).button("disable")});a(b+"approve").button({icons:{primary:"ui-icon-check"},text:false}).click(function(){var d=a(b+"translation").val(),e=a(b+c).attr("data-token");
31
  (a(b+"translation").data("changed")||a(b+c).attr("data-source")!=="0")&&n(e,d)});a(b+"translation").keyup(function(){a(this).data("origval")!==a(this).val()?(a(this).addClass("ui-state-highlight"),a(b+"approve").button("enable"),a(this).data("changed",true)):(a(this).removeClass("ui-state-highlight"),a(b+c).attr("data-source")==="0"&&a(b+"approve").button("disable"),a(this).data("changed",false))});p(c);a(g).dialog({resizable:false,width:500});a("html").attr("dir")==="rtl"&&o(g);a(b+"orglang").blur();
32
+ a(g).bind("dialogclose",function(){typeof VKI_close==="function"&&VKI_close(a(b+"translation").get(0));a(b+"historydialog").remove()});a(g).bind("dialogbeforeclose",function(){return a(b+"translation").data("changed")?(z(),false):true})}var l={en:"English - English",af:"Afrikaans - Afrikaans",sq:"Albanian - Shqip",ar:"Arabic - \u0627\u0644\u0639\u0631\u0628\u064a\u0629",hy:"Armenian - \u0540\u0561\u0575\u0565\u0580\u0565\u0576",az:"Azerbaijani - az\u0259rbaycan dili",eu:"Basque - Euskara",be:"Belarusian - \u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",
33
+ bn:"Bengali - \u09ac\u09be\u0982\u09b2\u09be",bg:"Bulgarian - \u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",ca:"Catalan - Catal\u00e0",zh:"Chinese (Simplified) - \u4e2d\u6587(\u7b80\u4f53)","zh-tw":"Chinese (Traditional) - \u4e2d\u6587(\u6f22\u5b57)",hr:"Croatian - Hrvatski",cs:"Czech - \u010ce\u0161tina",da:"Danish - Dansk",nl:"Dutch - Nederlands",eo:"Esperanto - Esperanto",et:"Estonian - Eesti keel",fi:"Finnish - Suomi",fr:"French - Fran\u00e7ais",gl:"Galician - Galego",ka:"Georgian - \u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",
34
+ de:"German - Deutsch",el:"Greek - \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",gu:"Gujarati - \u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",ht:"Haitian - Krey\u00f2l ayisyen",he:"Hebrew - \u05e2\u05d1\u05e8\u05d9\u05ea",hi:"Hindi - \u0939\u093f\u0928\u094d\u0926\u0940; \u0939\u093f\u0902\u0926\u0940",hu:"Hungarian - Magyar",is:"Icelandic - \u00cdslenska",id:"Indonesian - Bahasa Indonesia",ga:"Irish - Gaeilge",it:"Italian - Italiano",ja:"Japanese - \u65e5\u672c\u8a9e",kn:"Kannada - \u0c95\u0ca8\u0ccd\u0ca8\u0ca1",
35
+ ko:"Korean - \uc6b0\ub9ac\ub9d0",la:"Latin - Lat\u012bna",lv:"Latvian - Latvie\u0161u valoda",lt:"Lithuanian - Lietuvi\u0173 kalba",mk:"Macedonian - \u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 \u0458\u0430\u0437\u0438\u043a",ms:"Malay - Bahasa Melayu",mt:"Maltese - Malti",no:"Norwegian - Norsk",fa:"Persian - \u067e\u0627\u0631\u0633\u06cc",pl:"Polish - Polski",pt:"Portuguese - Portugu\u00eas",ro:"Romanian - Rom\u00e2n\u0103",ru:"Russian - \u0420\u0443\u0441\u0441\u043a\u0438\u0439",
36
+ sr:"Serbian - C\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",sk:"Slovak - Sloven\u010dina",sl:"Slovene - Sloven\u0161\u010dina",es:"Spanish - Espa\u00f1ol",sw:"Swahili - Kiswahili",sv:"Swedish - Svenska",tl:"Tagalog - Tagalog",ta:"Tamil - \u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"Telugu - \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",th:"Thai - \u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",tr:"Turkish - T\u00fcrk\u00e7e",uk:"Ukrainian - \u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
37
+ ur:"Urdu - \u0627\u0631\u062f\u0648",vi:"Vietnamese - Ti\u1ebfng Vi\u1ec7t",cy:"Welsh - Cymraeg",yi:"Yiddish - \u05d9\u05d9\u05b4\u05d3\u05d9\u05e9"},d=t_jp.prefix,b="#"+d,v=false,t="prev",u="next",j="right",i="left";a("html").attr("dir")==="rtl"&&(j="left",i="right",t="next",u="prev");a("."+d).each(function(){var c=a(this).attr("id").substr(a(this).attr("id").lastIndexOf("_")+1),e;a(this).after('<span id="'+d+"img_"+c+'" class="tr-icon" title="'+a(this).attr("data-orig")+'"></span>');e=a(b+"img_"+
38
+ c);var i=function(){t_jp.locale&&!v?a.getScript(t_jp.plugin_url+"/js/l/"+t_jp.lang+".js",function(){v=true;s(c)}):s(c)};e.click(function(){t_jp.tfju(function(){i()});return false}).css({border:"0px",margin:"1px",padding:"0px"});a(this).attr("data-source")==="0"?e.addClass("tr-icon-green"):a(this).attr("data-source")&&e.addClass("tr-icon-yellow");a(this).attr("data-hidden")==="y"&&e.css({opacity:"0.6"})})})(jQuery);
js/transposhsettings.js CHANGED
@@ -1,12 +1,12 @@
1
  /*
2
- * Transposh v0.8.0
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
10
  */
11
  jQuery(function(){jQuery("#tr_anon").click(function(){jQuery("#tr_anon").attr("checked")&&(jQuery(".translateable").addClass("active").removeClass("translateable"),jQuery("#sortable .active").each(function(){jQuery("input",this).val(jQuery(this).attr("id")+",v,t")}));jQuery("#yellowcolor").toggleClass("hidden")});jQuery("#sortable").sortable({placeholder:"highlight",update:function(b,a){a.item.unbind("click");a.item.one("click",function(a){a.stopImmediatePropagation();jQuery(this).click(clickfunction)})}});
12
  jQuery("#sortable").disableSelection();jQuery("#changename").click(function(){jQuery(".langname").toggleClass("hidden");return false});jQuery("#selectall").click(function(){jQuery("#sortable .languages").addClass("active").removeClass("translateable");jQuery("#sortable .active").each(function(){jQuery("input",this).val(jQuery(this).attr("id")+",v,t")});return false});clickfunction=function(){jQuery(this).attr("id")!=jQuery("#default_list li").attr("id")&&(jQuery("#tr_anon").attr("checked")?jQuery(this).toggleClass("active"):
1
  /*
2
+ * Transposh v0.8.1
3
  * http://transposh.org/
4
  *
5
  * Copyright 2011, Team Transposh
6
  * Licensed under the GPL Version 2 or higher.
7
  * http://transposh.org/license
8
  *
9
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
10
  */
11
  jQuery(function(){jQuery("#tr_anon").click(function(){jQuery("#tr_anon").attr("checked")&&(jQuery(".translateable").addClass("active").removeClass("translateable"),jQuery("#sortable .active").each(function(){jQuery("input",this).val(jQuery(this).attr("id")+",v,t")}));jQuery("#yellowcolor").toggleClass("hidden")});jQuery("#sortable").sortable({placeholder:"highlight",update:function(b,a){a.item.unbind("click");a.item.one("click",function(a){a.stopImmediatePropagation();jQuery(this).click(clickfunction)})}});
12
  jQuery("#sortable").disableSelection();jQuery("#changename").click(function(){jQuery(".langname").toggleClass("hidden");return false});jQuery("#selectall").click(function(){jQuery("#sortable .languages").addClass("active").removeClass("translateable");jQuery("#sortable .active").each(function(){jQuery("input",this).val(jQuery(this).attr("id")+",v,t")});return false});clickfunction=function(){jQuery(this).attr("id")!=jQuery("#default_list li").attr("id")&&(jQuery("#tr_anon").attr("checked")?jQuery(this).toggleClass("active"):
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Transposh - translation filter for wordpress ===
2
  Contributors: oferwald
3
  Donate link: http://transposh.org/donate/
4
- Tags: translation, widget, filter, buddypress, bilingual, multilingual, transposh, translate, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
5
- Requires at least: 2.8
6
  Tested up to: 3.3
7
- Stable tag: 0.8.0
8
 
9
  Transposh adds best of breed translation support to wordpress, 65 languages are automatically translated and can be manually corrected with ease.
10
 
@@ -115,6 +115,18 @@ This version allows sorting of languages within the widget
115
  * Turkish translation by [Semih Yeşilyurt](http://kingdroid.net)
116
 
117
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
118
  = 2011/11/28 - 0.8.0 =
119
  * Attack of the killer "give us your money" APIs by both Google and Bing
120
  * Improved Google Proxy to support working with all langugaes without key
@@ -134,6 +146,7 @@ This version allows sorting of languages within the widget
134
  * Many more minor fixes
135
  * Turkish Translation by [Semih Yeşilyurt](http://kingdroid.net)
136
  * Help us more (We will get ~1 promile of your adsense income, thanks!)
 
137
  = 2011/08/02 - 0.7.6 =
138
  * Added some improvements to the simple html dom from a new upstream release
139
  * Allow setting of a post/page language with a simple select box
@@ -440,4 +453,4 @@ This version allows sorting of languages within the widget
440
  * Fixed bug with hard coded plugin path (thanks [Atomboy](http://politicalnewsblogs.com/))
441
  * Support for AJAX replacement of content using jQuery
442
  = 2009/02/28 - 0.0.1 =
443
- * Initial release
1
+ === Transposh Wordpress Translation ===
2
  Contributors: oferwald
3
  Donate link: http://transposh.org/donate/
4
+ Tags: translation, translate, i18n, widget, filter, buddypress, bilingual, multilingual, transposh, language, crowdsourcing, google translate, bing translate, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
5
+ Requires at least: 3.1
6
  Tested up to: 3.3
7
+ Stable tag: 0.8.1
8
 
9
  Transposh adds best of breed translation support to wordpress, 65 languages are automatically translated and can be manually corrected with ease.
10
 
115
  * Turkish translation by [Semih Yeşilyurt](http://kingdroid.net)
116
 
117
  == Changelog ==
118
+ = 2011/12/12 - 0.8.1 =
119
+ * Allow setting comment lanaguage meta data from the admin interface
120
+ * Enable live human translations backup by default
121
+ * Lists of languages used in Javascript are fixed and more readable
122
+ * Improved loading for backend javascripts
123
+ * Support the , symbol in parsing
124
+ * Reintroduce CORS support in our AJAX (Cross Origin Ajax)
125
+ * Try to make sure lazyloader loads in the correct context
126
+ * Fix calculation of batch translation size to avoid translations too large for Google
127
+ * Fix when two jQueryUI versions are included, mainly for wordpress 3.2.x
128
+ * Fixed widget to remove [Language] which was buggy as noted by Philip Trauring
129
+ * Fix broken sites for users using the widget function directly
130
  = 2011/11/28 - 0.8.0 =
131
  * Attack of the killer "give us your money" APIs by both Google and Bing
132
  * Improved Google Proxy to support working with all langugaes without key
146
  * Many more minor fixes
147
  * Turkish Translation by [Semih Yeşilyurt](http://kingdroid.net)
148
  * Help us more (We will get ~1 promile of your adsense income, thanks!)
149
+ * Ajax is now performed through the wp-admin ajax interface
150
  = 2011/08/02 - 0.7.6 =
151
  * Added some improvements to the simple html dom from a new upstream release
152
  * Allow setting of a post/page language with a simple select box
453
  * Fixed bug with hard coded plugin path (thanks [Atomboy](http://politicalnewsblogs.com/))
454
  * Support for AJAX replacement of content using jQuery
455
  = 2009/02/28 - 0.0.1 =
456
+ * Initial release
transposh.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin URI: http://transposh.org/
6
  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>.
7
  Author: Team Transposh
8
- Version: 0.8.0
9
  Author URI: http://transposh.org/
10
  License: GPL (http://www.gnu.org/licenses/gpl.txt)
11
  Text Domain: transposh
@@ -13,14 +13,14 @@
13
  */
14
 
15
  /*
16
- * Transposh v0.8.0
17
  * http://transposh.org/
18
  *
19
  * Copyright 2011, Team Transposh
20
  * Licensed under the GPL Version 2 or higher.
21
  * http://transposh.org/license
22
  *
23
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
24
  */
25
 
26
  //avoid direct calls to this file where wp core files not present
@@ -708,9 +708,9 @@ class transposh_plugin {
708
  */
709
  function add_transposh_js() {
710
  //not in any translation mode - no need for any js.
711
- if (!($this->edit_mode || $this->is_auto_translate_permitted() || is_admin())) return; // TODO, check just for settings page admin and pages with our translate
712
-
713
- wp_enqueue_script('transposh', $this->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposh.js', array('jquery'), TRANSPOSH_PLUGIN_VER);
714
  // true -> 1, false -> nothing
715
  $script_params = array(
716
  'ajaxurl' => admin_url('admin-ajax.php'),
@@ -759,6 +759,10 @@ class transposh_plugin {
759
 
760
  // 'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
761
  wp_localize_script('transposh', 't_jp', $script_params);
 
 
 
 
762
 
763
  }
764
 
@@ -1199,6 +1203,7 @@ class transposh_plugin {
1199
  $i = 0;
1200
  // we need curl for this proxy
1201
  if (!function_exists('curl_init')) return;
 
1202
  $tl = $_GET['tl'];
1203
  // we want to avoid unneeded work or dos attacks on languages we don't support
1204
  if (!in_array($tl, transposh_consts::$google_languages) || !$this->options->is_editable_language($tl))
@@ -1246,6 +1251,7 @@ class transposh_plugin {
1246
  function on_ajax_nopriv_tp_gp() {
1247
  // we need curl for this proxy
1248
  if (!function_exists('curl_init')) return;
 
1249
  // target language
1250
  $tl = $_GET['tl'];
1251
  // we want to avoid unneeded work or dos attacks on languages we don't support
@@ -1342,6 +1348,7 @@ class transposh_plugin {
1342
  // getting translation history
1343
  function on_ajax_nopriv_tp_history() {
1344
  // deleting
 
1345
  if (isset($_GET['timestamp'])) {
1346
  $this->database->del_translation_history($_GET['token'], $_GET['lang'], $_GET['timestamp']);
1347
  }
@@ -1351,6 +1358,7 @@ class transposh_plugin {
1351
 
1352
  // the case of posted translation
1353
  function on_ajax_nopriv_tp_translation() {
 
1354
  do_action('transposh_translation_posted');
1355
  $this->database->update_translation();
1356
  die();
@@ -1358,6 +1366,7 @@ class transposh_plugin {
1358
 
1359
  // getting translation alternates
1360
  function on_ajax_nopriv_tp_trans_alts() {
 
1361
  $this->database->get_translation_alt($_GET['token']);
1362
  die();
1363
  }
5
  Plugin URI: http://transposh.org/
6
  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>.
7
  Author: Team Transposh
8
+ Version: 0.8.1
9
  Author URI: http://transposh.org/
10
  License: GPL (http://www.gnu.org/licenses/gpl.txt)
11
  Text Domain: transposh
13
  */
14
 
15
  /*
16
+ * Transposh v0.8.1
17
  * http://transposh.org/
18
  *
19
  * Copyright 2011, Team Transposh
20
  * Licensed under the GPL Version 2 or higher.
21
  * http://transposh.org/license
22
  *
23
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
24
  */
25
 
26
  //avoid direct calls to this file where wp core files not present
708
  */
709
  function add_transposh_js() {
710
  //not in any translation mode - no need for any js.
711
+ if (!($this->edit_mode || $this->is_auto_translate_permitted() || is_admin()))
712
+ return; // TODO, check just for settings page admin and pages with our translate
713
+ wp_register_script('transposh', $this->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposh.js', array('jquery'), TRANSPOSH_PLUGIN_VER);
714
  // true -> 1, false -> nothing
715
  $script_params = array(
716
  'ajaxurl' => admin_url('admin-ajax.php'),
759
 
760
  // 'l10n_print_after' => 'try{convertEntities(inlineEditL10n);}catch(e){};'
761
  wp_localize_script('transposh', 't_jp', $script_params);
762
+ // only enqueue on real pages, other admin scripts that need this will register a dependency
763
+ if (($this->edit_mode || $this->is_auto_translate_permitted()) && !is_admin()) {
764
+ wp_enqueue_script('transposh');
765
+ }
766
 
767
  }
768
 
1203
  $i = 0;
1204
  // we need curl for this proxy
1205
  if (!function_exists('curl_init')) return;
1206
+ transposh_utils::allow_cors();
1207
  $tl = $_GET['tl'];
1208
  // we want to avoid unneeded work or dos attacks on languages we don't support
1209
  if (!in_array($tl, transposh_consts::$google_languages) || !$this->options->is_editable_language($tl))
1251
  function on_ajax_nopriv_tp_gp() {
1252
  // we need curl for this proxy
1253
  if (!function_exists('curl_init')) return;
1254
+ transposh_utils::allow_cors();
1255
  // target language
1256
  $tl = $_GET['tl'];
1257
  // we want to avoid unneeded work or dos attacks on languages we don't support
1348
  // getting translation history
1349
  function on_ajax_nopriv_tp_history() {
1350
  // deleting
1351
+ transposh_utils::allow_cors();
1352
  if (isset($_GET['timestamp'])) {
1353
  $this->database->del_translation_history($_GET['token'], $_GET['lang'], $_GET['timestamp']);
1354
  }
1358
 
1359
  // the case of posted translation
1360
  function on_ajax_nopriv_tp_translation() {
1361
+ transposh_utils::allow_cors();
1362
  do_action('transposh_translation_posted');
1363
  $this->database->update_translation();
1364
  die();
1366
 
1367
  // getting translation alternates
1368
  function on_ajax_nopriv_tp_trans_alts() {
1369
+ transposh_utils::allow_cors();
1370
  $this->database->get_translation_alt($_GET['token']);
1371
  die();
1372
  }
widgets/default/tpw_default.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  /*
@@ -39,8 +39,6 @@ class tpw_default extends transposh_base_widget {
39
  echo '<span class="' . NO_TRANSLATE_CLASS . '">'; // wrapping in no_translate to avoid translation of this list
40
 
41
  echo '<select name="lang" id="lang" onchange="document.location.href=this.options[this.selectedIndex].value;">'; // this is a select box which posts on change
42
- /* TRANSLATORS: this is what appears in the select box in the default subwidget */
43
- echo '<option value="none">[' . __('Language', TRANSPOSH_TEXT_DOMAIN) . ']</option>';
44
  foreach ($args as $langrecord) {
45
  $is_selected = $langrecord['active'] ? " selected=\"selected\"" : "";
46
  echo "<option value=\"{$langrecord['url']}\"{$is_selected}>{$langrecord['langorig']}</option>";
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  /*
39
  echo '<span class="' . NO_TRANSLATE_CLASS . '">'; // wrapping in no_translate to avoid translation of this list
40
 
41
  echo '<select name="lang" id="lang" onchange="document.location.href=this.options[this.selectedIndex].value;">'; // this is a select box which posts on change
 
 
42
  foreach ($args as $langrecord) {
43
  $is_selected = $langrecord['active'] ? " selected=\"selected\"" : "";
44
  echo "<option value=\"{$langrecord['url']}\"{$is_selected}>{$langrecord['langorig']}</option>";
widgets/dropdown/tpw_image_dropdown.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  class tpw_image_dropdown extends transposh_base_widget {
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  class tpw_image_dropdown extends transposh_base_widget {
widgets/flags/tpw_flags.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  /**
@@ -27,10 +27,6 @@
27
  */
28
  class tpw_flags extends transposh_base_widget {
29
 
30
- static function tp_widget_needs_post_url() {
31
- return true;
32
- }
33
-
34
  /**
35
  * Creates the list of flags
36
  * @global transposh_plugin $my_transposh_plugin
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  /**
27
  */
28
  class tpw_flags extends transposh_base_widget {
29
 
 
 
 
 
30
  /**
31
  * Creates the list of flags
32
  * @global transposh_plugin $my_transposh_plugin
widgets/flags/tpw_flags_css.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  class tpw_flags_css extends transposh_base_widget {
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  class tpw_flags_css extends transposh_base_widget {
widgets/flagslist/tpw_list_with_flags.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  class tpw_list_with_flags extends transposh_base_widget {
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  class tpw_list_with_flags extends transposh_base_widget {
widgets/flagslist/tpw_list_with_flags_css.php CHANGED
@@ -11,14 +11,14 @@
11
  */
12
 
13
  /*
14
- * Transposh v0.8.0
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
22
  */
23
 
24
  class tpw_list_with_flags_css extends transposh_base_widget {
11
  */
12
 
13
  /*
14
+ * Transposh v0.8.1
15
  * http://transposh.org/
16
  *
17
  * Copyright 2011, Team Transposh
18
  * Licensed under the GPL Version 2 or higher.
19
  * http://transposh.org/license
20
  *
21
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
22
  */
23
 
24
  class tpw_list_with_flags_css extends transposh_base_widget {
wp/transposh_3rdparty.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
wp/transposh_admin.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
@@ -39,6 +39,8 @@ class transposh_plugin_admin {
39
  add_action('admin_menu', array(&$this, 'on_admin_menu'));
40
  // register the callback been used if options of page been submitted and needs to be processed
41
  add_action('admin_post_save_transposh', array(&$this, 'on_save_changes'));
 
 
42
  // register ajax callbacks
43
  add_action('wp_ajax_tp_close_warning', array(&$this, 'on_ajax_tp_close_warning'));
44
  add_action('wp_ajax_tp_backup', array(&$this, 'on_ajax_tp_backup'));
@@ -47,6 +49,7 @@ class transposh_plugin_admin {
47
  add_action('wp_ajax_tp_cleanup', array(&$this, 'on_ajax_tp_cleanup'));
48
  add_action('wp_ajax_tp_translate_all', array(&$this, 'on_ajax_tp_translate_all'));
49
  add_action('wp_ajax_tp_post_phrases', array(&$this, 'on_ajax_tp_post_phrases'));
 
50
  }
51
 
52
  /**
@@ -170,6 +173,11 @@ class transposh_plugin_admin {
170
  $this->pagehook = add_options_page(__('Transposh control center', TRANSPOSH_TEXT_DOMAIN), __('Transposh', TRANSPOSH_TEXT_DOMAIN), 'manage_options', TRANSPOSH_ADMIN_PAGE_NAME, array(&$this, 'on_show_page'));
171
  // register callback gets call prior your own page gets rendered
172
  add_action('load-' . $this->pagehook, array(&$this, 'on_load_page'));
 
 
 
 
 
173
  }
174
 
175
  // will be executed if wordpress core detects this page has to be rendered
@@ -183,13 +191,13 @@ class transposh_plugin_admin {
183
  //if ($this->transposh->options->get_widget_css_flags())
184
  // wp_enqueue_style("transposh_flags",$this->transposh->transposh_plugin_url."/widgets/flags/tpw_flags.css",array(),TRANSPOSH_PLUGIN_VER);
185
  wp_enqueue_script('jquery-ui-droppable');
186
- wp_enqueue_script('transposh_settings', $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhsettings.js', array(), TRANSPOSH_PLUGIN_VER, true);
187
  // MAKESURE 3.3+ css
188
  // wp_enqueue_script('jquery-ui-progressbar');
189
 
190
  wp_enqueue_style('jqueryui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERYUI_VER . '/themes/ui-lightness/jquery-ui.css', array(), JQUERYUI_VER);
191
  wp_enqueue_script('jqueryui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERYUI_VER . '/jquery-ui.min.js', array('jquery'), JQUERYUI_VER, true);
192
- wp_enqueue_script('transposh_backend', $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhbackend.js', array(), TRANSPOSH_PLUGIN_VER, true);
193
  $script_params = array(
194
  'l10n_print_after' =>
195
  't_be.g_langs = ' . json_encode(transposh_consts::$google_languages) . ';' .
@@ -591,6 +599,17 @@ class transposh_plugin_admin {
591
  }
592
  }
593
 
 
 
 
 
 
 
 
 
 
 
 
594
  // ajax stuff!
595
  function on_ajax_tp_close_warning() {
596
  $this->transposh->options->set_transposh_admin_hide_warning($_POST['id']);
@@ -640,6 +659,14 @@ class transposh_plugin_admin {
640
  die();
641
  }
642
 
 
 
 
 
 
 
 
 
643
  }
644
 
645
  ?>
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
39
  add_action('admin_menu', array(&$this, 'on_admin_menu'));
40
  // register the callback been used if options of page been submitted and needs to be processed
41
  add_action('admin_post_save_transposh', array(&$this, 'on_save_changes'));
42
+ // allow language change for comments
43
+ add_filter('comment_row_actions', array(&$this, 'comment_row_actions'), 999, 2);
44
  // register ajax callbacks
45
  add_action('wp_ajax_tp_close_warning', array(&$this, 'on_ajax_tp_close_warning'));
46
  add_action('wp_ajax_tp_backup', array(&$this, 'on_ajax_tp_backup'));
49
  add_action('wp_ajax_tp_cleanup', array(&$this, 'on_ajax_tp_cleanup'));
50
  add_action('wp_ajax_tp_translate_all', array(&$this, 'on_ajax_tp_translate_all'));
51
  add_action('wp_ajax_tp_post_phrases', array(&$this, 'on_ajax_tp_post_phrases'));
52
+ add_action('wp_ajax_tp_comment_lang', array(&$this, 'on_ajax_tp_comment_lang'));
53
  }
54
 
55
  /**
173
  $this->pagehook = add_options_page(__('Transposh control center', TRANSPOSH_TEXT_DOMAIN), __('Transposh', TRANSPOSH_TEXT_DOMAIN), 'manage_options', TRANSPOSH_ADMIN_PAGE_NAME, array(&$this, 'on_show_page'));
174
  // register callback gets call prior your own page gets rendered
175
  add_action('load-' . $this->pagehook, array(&$this, 'on_load_page'));
176
+ add_action('load-edit-comments.php', array(&$this, 'on_load_comments_page'));
177
+ }
178
+
179
+ function on_load_comments_page() {
180
+ wp_enqueue_script('transposhcomments', $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhcommentslang.js', array('jquery'), TRANSPOSH_PLUGIN_VER);
181
  }
182
 
183
  // will be executed if wordpress core detects this page has to be rendered
191
  //if ($this->transposh->options->get_widget_css_flags())
192
  // wp_enqueue_style("transposh_flags",$this->transposh->transposh_plugin_url."/widgets/flags/tpw_flags.css",array(),TRANSPOSH_PLUGIN_VER);
193
  wp_enqueue_script('jquery-ui-droppable');
194
+ wp_enqueue_script('transposh_settings', $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhsettings.js', array('transposh'), TRANSPOSH_PLUGIN_VER, true);
195
  // MAKESURE 3.3+ css
196
  // wp_enqueue_script('jquery-ui-progressbar');
197
 
198
  wp_enqueue_style('jqueryui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERYUI_VER . '/themes/ui-lightness/jquery-ui.css', array(), JQUERYUI_VER);
199
  wp_enqueue_script('jqueryui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/' . JQUERYUI_VER . '/jquery-ui.min.js', array('jquery'), JQUERYUI_VER, true);
200
+ wp_enqueue_script('transposh_backend', $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhbackend.js', array('transposh'), TRANSPOSH_PLUGIN_VER, true);
201
  $script_params = array(
202
  'l10n_print_after' =>
203
  't_be.g_langs = ' . json_encode(transposh_consts::$google_languages) . ';' .
599
  }
600
  }
601
 
602
+ function comment_row_actions($actions, $comment) {
603
+ $comment_lang = get_comment_meta($comment->comment_ID, 'tp_language', true);
604
+ if (!$comment_lang) {
605
+ $text = __('Unset', TRANSPOSH_TEXT_DOMAIN);
606
+ } else {
607
+ $text = transposh_consts::get_language_name($comment_lang)." - ".transposh_consts::get_language_orig_name($comment_lang);
608
+ }
609
+ $actions['language'] = __('Language', TRANSPOSH_TEXT_DOMAIN) . "(<a data-cid=\"{$comment->comment_ID}\" data-lang=\"{$comment_lang}\" href=\"\" onclick=\"return false\">$text</a>)";
610
+ return $actions;
611
+ }
612
+
613
  // ajax stuff!
614
  function on_ajax_tp_close_warning() {
615
  $this->transposh->options->set_transposh_admin_hide_warning($_POST['id']);
659
  die();
660
  }
661
 
662
+ // Handle comments language change on the admin side
663
+ function on_ajax_tp_comment_lang() {
664
+ delete_comment_meta($_GET['cid'], 'tp_language');
665
+ if ($_GET['lang'])
666
+ add_comment_meta($_GET['cid'], 'tp_language', $_GET['lang'], true);
667
+ die();
668
+ }
669
+
670
  }
671
 
672
  ?>
wp/transposh_ajax.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
wp/transposh_backup.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
wp/transposh_db.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /**
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /**
wp/transposh_options.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  // OLD Options - To be removed
@@ -119,7 +119,7 @@ class transposh_plugin_options {
119
  $this->set_default_option_value(MSN_TRANSLATE_KEY);
120
  $this->set_default_option_value(GOOGLE_TRANSLATE_KEY);
121
  $this->set_default_option_value(TRANSPOSH_KEY);
122
- $this->set_default_option_value(TRANSPOSH_BACKUP_SCHEDULE);
123
  $this->set_default_option_value(TRANSPOSH_ADMIN_HIDE_WARNINGS);
124
  $this->set_default_option_value(TRANSPOSH_COLLECT_STATS, 1);
125
  $this->migrate_old_config();
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  // OLD Options - To be removed
119
  $this->set_default_option_value(MSN_TRANSLATE_KEY);
120
  $this->set_default_option_value(GOOGLE_TRANSLATE_KEY);
121
  $this->set_default_option_value(TRANSPOSH_KEY);
122
+ $this->set_default_option_value(TRANSPOSH_BACKUP_SCHEDULE, 2);
123
  $this->set_default_option_value(TRANSPOSH_ADMIN_HIDE_WARNINGS);
124
  $this->set_default_option_value(TRANSPOSH_COLLECT_STATS, 1);
125
  $this->migrate_old_config();
wp/transposh_postpublish.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
@@ -54,7 +54,7 @@ class transposh_postpublish {
54
  if (!isset($_GET['post'])) return;
55
  if (get_post_meta($_GET['post'], 'transposh_can_translate', true)) { // do isdefined stuff
56
  $this->just_published = true; // this is later used in the meta boxes //XXXXXXXXXXXXXXXXXXXXXXXXXXXX
57
- wp_enqueue_script("transposh_backend", $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhbackend.js', array('jquery'), TRANSPOSH_PLUGIN_VER, true);
58
  $script_params = array(
59
  'post' => $_GET['post'],
60
  'l10n_print_after' =>
@@ -209,6 +209,7 @@ class transposh_postpublish {
209
  * @param int $postID
210
  */
211
  function on_edit($postID) {
 
212
  add_post_meta($postID, 'transposh_can_translate', 'true', true);
213
  if ($_POST['transposh_tp_language'] == '') {
214
  delete_post_meta($postID, 'tp_language');
@@ -220,7 +221,7 @@ class transposh_postpublish {
220
  $this->transposh->options->update_options();
221
  }
222
  }
223
-
224
  }
225
 
226
  }
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
54
  if (!isset($_GET['post'])) return;
55
  if (get_post_meta($_GET['post'], 'transposh_can_translate', true)) { // do isdefined stuff
56
  $this->just_published = true; // this is later used in the meta boxes //XXXXXXXXXXXXXXXXXXXXXXXXXXXX
57
+ wp_enqueue_script("transposh_backend", $this->transposh->transposh_plugin_url . '/' . TRANSPOSH_DIR_JS . '/transposhbackend.js', array('transposh'), TRANSPOSH_PLUGIN_VER, true);
58
  $script_params = array(
59
  'post' => $_GET['post'],
60
  'l10n_print_after' =>
209
  * @param int $postID
210
  */
211
  function on_edit($postID) {
212
+ // TODO - CHECK if (!isset($_POST['transposh_tp_language'])) return;
213
  add_post_meta($postID, 'transposh_can_translate', 'true', true);
214
  if ($_POST['transposh_tp_language'] == '') {
215
  delete_post_meta($postID, 'tp_language');
221
  $this->transposh->options->update_options();
222
  }
223
  }
224
+ //??
225
  }
226
 
227
  }
wp/transposh_widget.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
 
3
  /*
4
- * Transposh v0.8.0
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
- * Date: Mon, 28 Nov 2011 21:55:23 +0200
12
  */
13
 
14
  /*
@@ -407,4 +407,4 @@ function transposh_widget($args = array(), $instance= array('title' => 'Translat
407
  $GLOBALS['my_transposh_plugin']->widget->widget($args, $instance);
408
  }
409
 
410
- ?>
1
  <?php
2
 
3
  /*
4
+ * Transposh v0.8.1
5
  * http://transposh.org/
6
  *
7
  * Copyright 2011, Team Transposh
8
  * Licensed under the GPL Version 2 or higher.
9
  * http://transposh.org/license
10
  *
11
+ * Date: Mon, 12 Dec 2011 12:04:59 +0200
12
  */
13
 
14
  /*
407
  $GLOBALS['my_transposh_plugin']->widget->widget($args, $instance);
408
  }
409
 
410
+ ?>