Transposh WordPress Translation - Version 0.3.3

Version Description

Download this release

Release Info

Developer oferwald
Plugin Icon 128x128 Transposh WordPress Translation
Version 0.3.3
Comparing to
See all releases

Code changes from version 0.3.2 to 0.3.3

Files changed (176) hide show
  1. core/constants.php +12 -3
  2. core/parser.php +2 -1
  3. css/transposh_flags.css +1 -1
  4. img/flags.png +0 -0
  5. img/flags/al.png +0 -0
  6. img/flags/am.png +0 -0
  7. img/flags/an.png +0 -0
  8. img/flags/ao.png +0 -0
  9. img/flags/ar.png +0 -0
  10. img/flags/as.png +0 -0
  11. img/flags/at.png +0 -0
  12. img/flags/aw.png +0 -0
  13. img/flags/bd.png +0 -0
  14. img/flags/be.png +0 -0
  15. img/flags/bf.png +0 -0
  16. img/flags/bg.png +0 -0
  17. img/flags/bh.png +0 -0
  18. img/flags/bj.png +0 -0
  19. img/flags/bo.png +0 -0
  20. img/flags/bs.png +0 -0
  21. img/flags/bv.png +0 -0
  22. img/flags/bw.png +0 -0
  23. img/flags/by.png +0 -0
  24. img/flags/catalonia.png +0 -0
  25. img/flags/cd.png +0 -0
  26. img/flags/cg.png +0 -0
  27. img/flags/ch.png +0 -0
  28. img/flags/cl.png +0 -0
  29. img/flags/cm.png +0 -0
  30. img/flags/cn.png +0 -0
  31. img/flags/co.png +0 -0
  32. img/flags/cr.png +0 -0
  33. img/flags/cs.png +0 -0
  34. img/flags/cu.png +0 -0
  35. img/flags/cv.png +0 -0
  36. img/flags/cy.png +0 -0
  37. img/flags/cz.png +0 -0
  38. img/flags/de.png +0 -0
  39. img/flags/dj.png +0 -0
  40. img/flags/dk.png +0 -0
  41. img/flags/do.png +0 -0
  42. img/flags/dz.png +0 -0
  43. img/flags/ec.png +0 -0
  44. img/flags/ee.png +0 -0
  45. img/flags/eg.png +0 -0
  46. img/flags/eh.png +0 -0
  47. img/flags/england.png +0 -0
  48. img/flags/es.png +0 -0
  49. img/flags/et.png +0 -0
  50. img/flags/fam.png +0 -0
  51. img/flags/fi.png +0 -0
  52. img/flags/fj.png +0 -0
  53. img/flags/fk.png +0 -0
  54. img/flags/fo.png +0 -0
  55. img/flags/fr.png +0 -0
  56. img/flags/ga.png +0 -0
  57. img/flags/ge.png +0 -0
  58. img/flags/gf.png +0 -0
  59. img/flags/gh.png +0 -0
  60. img/flags/gi.png +0 -0
  61. img/flags/gl.png +0 -0
  62. img/flags/gm.png +0 -0
  63. img/flags/gn.png +0 -0
  64. img/flags/gp.png +0 -0
  65. img/flags/gq.png +0 -0
  66. img/flags/gr.png +0 -0
  67. img/flags/gw.png +0 -0
  68. img/flags/hn.png +0 -0
  69. img/flags/hr.png +0 -0
  70. img/flags/ht.png +0 -0
  71. img/flags/hu.png +0 -0
  72. img/flags/id.png +0 -0
  73. img/flags/ie.png +0 -0
  74. img/flags/il.png +0 -0
  75. img/flags/in.png +0 -0
  76. img/flags/iq.png +0 -0
  77. img/flags/ir.png +0 -0
  78. img/flags/is.png +0 -0
  79. img/flags/it.png +0 -0
  80. img/flags/jo.png +0 -0
  81. img/flags/jp.png +0 -0
  82. img/flags/ke.png +0 -0
  83. img/flags/kg.png +0 -0
  84. img/flags/kh.png +0 -0
  85. img/flags/km.png +0 -0
  86. img/flags/kn.png +0 -0
  87. img/flags/kp.png +0 -0
  88. img/flags/kr.png +0 -0
  89. img/flags/kw.png +0 -0
  90. img/flags/la.png +0 -0
  91. img/flags/lb.png +0 -0
  92. img/flags/li.png +0 -0
  93. img/flags/lt.png +0 -0
  94. img/flags/lu.png +0 -0
  95. img/flags/lv.png +0 -0
  96. img/flags/ly.png +0 -0
  97. img/flags/ma.png +0 -0
  98. img/flags/mc.png +0 -0
  99. img/flags/mg.png +0 -0
  100. img/flags/ml.png +0 -0
  101. img/flags/mm.png +0 -0
  102. img/flags/mn.png +0 -0
  103. img/flags/mo.png +0 -0
  104. img/flags/mr.png +0 -0
  105. img/flags/mt.png +0 -0
  106. img/flags/mu.png +0 -0
  107. img/flags/mx.png +0 -0
  108. img/flags/my.png +0 -0
  109. img/flags/mz.png +0 -0
  110. img/flags/ne.png +0 -0
  111. img/flags/nf.png +0 -0
  112. img/flags/ng.png +0 -0
  113. img/flags/ni.png +0 -0
  114. img/flags/nl.png +0 -0
  115. img/flags/no.png +0 -0
  116. img/flags/nr.png +0 -0
  117. img/flags/nu.png +0 -0
  118. img/flags/pa.png +0 -0
  119. img/flags/pe.png +0 -0
  120. img/flags/pf.png +0 -0
  121. img/flags/ph.png +0 -0
  122. img/flags/pk.png +0 -0
  123. img/flags/pl.png +0 -0
  124. img/flags/pr.png +0 -0
  125. img/flags/ps.png +0 -0
  126. img/flags/py.png +0 -0
  127. img/flags/qa.png +0 -0
  128. img/flags/re.png +0 -0
  129. img/flags/ro.png +0 -0
  130. img/flags/ru.png +0 -0
  131. img/flags/rw.png +0 -0
  132. img/flags/sc.png +0 -0
  133. img/flags/sd.png +0 -0
  134. img/flags/se.png +0 -0
  135. img/flags/sg.png +0 -0
  136. img/flags/si.png +0 -0
  137. img/flags/sj.png +0 -0
  138. img/flags/sk.png +0 -0
  139. img/flags/sl.png +0 -0
  140. img/flags/so.png +0 -0
  141. img/flags/sr.png +0 -0
  142. img/flags/sv.png +0 -0
  143. img/flags/sy.png +0 -0
  144. img/flags/sz.png +0 -0
  145. img/flags/tf.png +0 -0
  146. img/flags/tg.png +0 -0
  147. img/flags/th.png +0 -0
  148. img/flags/tj.png +0 -0
  149. img/flags/tl.png +0 -0
  150. img/flags/tn.png +0 -0
  151. img/flags/to.png +0 -0
  152. img/flags/tr.png +0 -0
  153. img/flags/tt.png +0 -0
  154. img/flags/tv.png +0 -0
  155. img/flags/tw.png +0 -0
  156. img/flags/ua.png +0 -0
  157. img/flags/ug.png +0 -0
  158. img/flags/um.png +0 -0
  159. img/flags/us.png +0 -0
  160. img/flags/uy.png +0 -0
  161. img/flags/uz.png +0 -0
  162. img/flags/va.png +0 -0
  163. img/flags/ve.png +0 -0
  164. img/flags/vg.png +0 -0
  165. img/flags/vn.png +0 -0
  166. img/flags/vu.png +0 -0
  167. img/flags/wf.png +0 -0
  168. img/flags/ye.png +0 -0
  169. img/flags/zm.png +0 -0
  170. img/flags/zw.png +0 -0
  171. js/transposh.js +1 -1
  172. readme.txt +5 -2
  173. transposh.php +4 -4
  174. transposh_admin.php +8 -3
  175. transposh_db.php +2 -2
  176. transposh_widget.php +4 -4
core/constants.php CHANGED
@@ -32,8 +32,10 @@ define("NO_TRANSLATE_CLASS", "no_translate");
32
  //the array directs from language code to - Native name, flag, auto-translatable
33
  $languages = array(
34
  "en" => "English,us,1",
 
35
  "sq" => "Shqip,al,1",
36
  "ar" => "العربية,sa,1",
 
37
  "bg" => "Български,bg,1",
38
  "ca" => "Català,catalonia,1",
39
  "zh" => "中文(简体),cn,1",
@@ -53,11 +55,14 @@ $languages = array(
53
  "hu" => "magyar,hu,1",
54
  "id" => "Bahasa Indonesia,id,1",
55
  "it" => "Italiano,it,1",
56
- "is" => "íslenska,is,0",
 
57
  "ja" => "日本語,jp,1",
58
  "ko" => "우리말,kr,1",
59
  "lv" => "latviešu valoda,lv,1",
60
  "lt" => "lietuvių kalba,lt,1",
 
 
61
  "mt" => "Malti,mt,1",
62
  "no" => "Norsk,no,1",
63
  "fa" => "فارسی,ir,1",
@@ -69,15 +74,19 @@ $languages = array(
69
  "sk" => "slovenčina,sk,1",
70
  "sl" => "slovenščina,sl,1",
71
  "es" => "Español,es,1",
 
72
  "sv" => "svenska,se,1",
73
  "tl" => "Tagalog,ph,1",
74
  "th" => "ภาษาไทย,th,1",
75
  "tr" => "Türkçe,tr,1",
76
  "uk" => "Українська,ua,1",
77
- "vi" => "Tiếng Việt,vn,1");
 
 
 
78
 
79
  //Language which are read from right to left (rtl)
80
- $rtl_languages = array("ar", "he", "fa");
81
 
82
  //Define the new capability that will be assigned to roles - translator
83
  define("TRANSLATOR", 'translator');
32
  //the array directs from language code to - Native name, flag, auto-translatable
33
  $languages = array(
34
  "en" => "English,us,1",
35
+ "af" => "Afrikaans,za,1", //
36
  "sq" => "Shqip,al,1",
37
  "ar" => "العربية,sa,1",
38
+ "be" => "Belarusian,by,1", //
39
  "bg" => "Български,bg,1",
40
  "ca" => "Català,catalonia,1",
41
  "zh" => "中文(简体),cn,1",
55
  "hu" => "magyar,hu,1",
56
  "id" => "Bahasa Indonesia,id,1",
57
  "it" => "Italiano,it,1",
58
+ "is" => "íslenska,is,1", //
59
+ "ga" => "Irish,ie,1", //
60
  "ja" => "日本語,jp,1",
61
  "ko" => "우리말,kr,1",
62
  "lv" => "latviešu valoda,lv,1",
63
  "lt" => "lietuvių kalba,lt,1",
64
+ "mk" => "Macedonian,mk,1", //
65
+ "ms" => "Malay,my,1", //
66
  "mt" => "Malti,mt,1",
67
  "no" => "Norsk,no,1",
68
  "fa" => "فارسی,ir,1",
74
  "sk" => "slovenčina,sk,1",
75
  "sl" => "slovenščina,sl,1",
76
  "es" => "Español,es,1",
77
+ "sw" => "Swahili,ke,1",
78
  "sv" => "svenska,se,1",
79
  "tl" => "Tagalog,ph,1",
80
  "th" => "ภาษาไทย,th,1",
81
  "tr" => "Türkçe,tr,1",
82
  "uk" => "Українська,ua,1",
83
+ "vi" => "Tiếng Việt,vn,1",
84
+ "cy" => "Welsh,wales,1", //
85
+ "yi" => "Yiddish,europeanunion,1" //
86
+ );
87
 
88
  //Language which are read from right to left (rtl)
89
+ $rtl_languages = array("ar", "he", "fa", "yi");
90
 
91
  //Define the new capability that will be assigned to roles - translator
92
  define("TRANSLATOR", 'translator');
core/parser.php CHANGED
@@ -83,11 +83,12 @@ class parser {
83
  * Some entities will not cause a break if they don't have whitespace after them
84
  * such as Jack`s apple.
85
  * `uncatagorized` will break on the later entity
 
86
  * @param $entity - html entity to check
87
  * @return - true if not a breaker (apostrophy)
88
  */
89
  function is_entity_breaker($entity) {
90
- return !(stripos('’'''', $entity) !== FALSE);
91
  }
92
 
93
  /**
83
  * Some entities will not cause a break if they don't have whitespace after them
84
  * such as Jack`s apple.
85
  * `uncatagorized` will break on the later entity
86
+ * Added " quotes to this claim, as it is used in some languages in a similar fashion
87
  * @param $entity - html entity to check
88
  * @return - true if not a breaker (apostrophy)
89
  */
90
  function is_entity_breaker($entity) {
91
+ return !(stripos('’'"''', $entity) !== FALSE);
92
  }
93
 
94
  /**
css/transposh_flags.css CHANGED
@@ -1 +1 @@
1
- .trf{background-image:url(../img/flags.png);height:11px;width:16px;background-repeat:no-repeat;overflow:hidden;display:inline-block;}.trf-al{background-position:-24px 0;}.trf-sa{background-position:-48px 0;}.trf-bg{background-position:-72px 0;}.trf-catalonia{background-position:-96px 0;}.trf-cn{background-position:-120px 0;}.trf-tw{background-position:-144px 0;}.trf-hr{background-position:-168px 0;}.trf-cz{background-position:-192px 0;}.trf-dk{background-position:-216px 0;}.trf-nl{background-position:-240px 0;}.trf-ee{background-position:-264px 0;}.trf-fi{background-position:-288px 0;}.trf-fr{background-position:-312px 0;}.trf-galicia{background-position:-336px 0;}.trf-de{background-position:-360px 0;}.trf-gr{background-position:-384px 0;}.trf-il{background-position:-408px 0;}.trf-in{background-position:-432px 0;}.trf-hu{background-position:-456px 0;}.trf-id{background-position:-480px 0;}.trf-it{background-position:-504px 0;}.trf-is{background-position:-528px 0;}.trf-jp{background-position:-552px 0;}.trf-kr{background-position:-576px 0;}.trf-lv{background-position:-600px 0;}.trf-lt{background-position:-624px 0;}.trf-mt{background-position:-648px 0;}.trf-no{background-position:-672px 0;}.trf-ir{background-position:-696px 0;}.trf-pl{background-position:-720px 0;}.trf-pt{background-position:-744px 0;}.trf-ro{background-position:-768px 0;}.trf-ru{background-position:-792px 0;}.trf-rs{background-position:-816px 0;}.trf-sk{background-position:-840px 0;}.trf-sl{background-position:-864px 0;}.trf-es{background-position:-888px 0;}.trf-se{background-position:-912px 0;}.trf-ph{background-position:-936px 0;}.trf-th{background-position:-960px 0;}.trf-tr{background-position:-984px 0;}.trf-ua{background-position:-1008px 0;}.trf-vn{background-position:-1032px 0;}
1
+ .trf{background-image:url(../img/flags.png);height:11px;width:16px;background-repeat:no-repeat;overflow:hidden;display:inline-block;}.trf-za{background-position:-24px 0;}.trf-al{background-position:-48px 0;}.trf-sa{background-position:-72px 0;}.trf-by{background-position:-96px 0;}.trf-bg{background-position:-120px 0;}.trf-catalonia{background-position:-144px 0;}.trf-cn{background-position:-168px 0;}.trf-tw{background-position:-192px 0;}.trf-hr{background-position:-216px 0;}.trf-cz{background-position:-240px 0;}.trf-dk{background-position:-264px 0;}.trf-nl{background-position:-288px 0;}.trf-ee{background-position:-312px 0;}.trf-fi{background-position:-336px 0;}.trf-fr{background-position:-360px 0;}.trf-galicia{background-position:-384px 0;}.trf-de{background-position:-408px 0;}.trf-gr{background-position:-432px 0;}.trf-il{background-position:-456px 0;}.trf-in{background-position:-480px 0;}.trf-hu{background-position:-504px 0;}.trf-id{background-position:-528px 0;}.trf-it{background-position:-552px 0;}.trf-is{background-position:-576px 0;}.trf-ie{background-position:-600px 0;}.trf-jp{background-position:-624px 0;}.trf-kr{background-position:-648px 0;}.trf-lv{background-position:-672px 0;}.trf-lt{background-position:-696px 0;}.trf-mk{background-position:-720px 0;}.trf-my{background-position:-744px 0;}.trf-mt{background-position:-768px 0;}.trf-no{background-position:-792px 0;}.trf-ir{background-position:-816px 0;}.trf-pl{background-position:-840px 0;}.trf-pt{background-position:-864px 0;}.trf-ro{background-position:-888px 0;}.trf-ru{background-position:-912px 0;}.trf-rs{background-position:-936px 0;}.trf-sk{background-position:-960px 0;}.trf-sl{background-position:-984px 0;}.trf-es{background-position:-1008px 0;}.trf-ke{background-position:-1032px 0;}.trf-se{background-position:-1056px 0;}.trf-ph{background-position:-1080px 0;}.trf-th{background-position:-1104px 0;}.trf-tr{background-position:-1128px 0;}.trf-ua{background-position:-1152px 0;}.trf-vn{background-position:-1176px 0;}.trf-wales{background-position:-1200px 0;}.trf-europeanunion{background-position:-1224px 0;}
img/flags.png CHANGED
Binary file
img/flags/al.png CHANGED
Binary file
img/flags/am.png CHANGED
Binary file
img/flags/an.png CHANGED
Binary file
img/flags/ao.png CHANGED
Binary file
img/flags/ar.png CHANGED
Binary file
img/flags/as.png CHANGED
Binary file
img/flags/at.png CHANGED
Binary file
img/flags/aw.png CHANGED
Binary file
img/flags/bd.png CHANGED
Binary file
img/flags/be.png CHANGED
Binary file
img/flags/bf.png CHANGED
Binary file
img/flags/bg.png CHANGED
Binary file
img/flags/bh.png CHANGED
Binary file
img/flags/bj.png CHANGED
Binary file
img/flags/bo.png CHANGED
Binary file
img/flags/bs.png CHANGED
Binary file
img/flags/bv.png CHANGED
Binary file
img/flags/bw.png CHANGED
Binary file
img/flags/by.png CHANGED
Binary file
img/flags/catalonia.png CHANGED
Binary file
img/flags/cd.png CHANGED
Binary file
img/flags/cg.png CHANGED
Binary file
img/flags/ch.png CHANGED
Binary file
img/flags/cl.png CHANGED
Binary file
img/flags/cm.png CHANGED
Binary file
img/flags/cn.png CHANGED
Binary file
img/flags/co.png CHANGED
Binary file
img/flags/cr.png CHANGED
Binary file
img/flags/cs.png CHANGED
Binary file
img/flags/cu.png CHANGED
Binary file
img/flags/cv.png CHANGED
Binary file
img/flags/cy.png CHANGED
Binary file
img/flags/cz.png CHANGED
Binary file
img/flags/de.png CHANGED
Binary file
img/flags/dj.png CHANGED
Binary file
img/flags/dk.png CHANGED
Binary file
img/flags/do.png CHANGED
Binary file
img/flags/dz.png CHANGED
Binary file
img/flags/ec.png CHANGED
Binary file
img/flags/ee.png CHANGED
Binary file
img/flags/eg.png CHANGED
Binary file
img/flags/eh.png CHANGED
Binary file
img/flags/england.png CHANGED
Binary file
img/flags/es.png CHANGED
Binary file
img/flags/et.png CHANGED
Binary file
img/flags/fam.png CHANGED
Binary file
img/flags/fi.png CHANGED
Binary file
img/flags/fj.png CHANGED
Binary file
img/flags/fk.png CHANGED
Binary file
img/flags/fo.png CHANGED
Binary file
img/flags/fr.png CHANGED
Binary file
img/flags/ga.png CHANGED
Binary file
img/flags/ge.png CHANGED
Binary file
img/flags/gf.png CHANGED
Binary file
img/flags/gh.png CHANGED
Binary file
img/flags/gi.png CHANGED
Binary file
img/flags/gl.png CHANGED
Binary file
img/flags/gm.png CHANGED
Binary file
img/flags/gn.png CHANGED
Binary file
img/flags/gp.png CHANGED
Binary file
img/flags/gq.png CHANGED
Binary file
img/flags/gr.png CHANGED
Binary file
img/flags/gw.png CHANGED
Binary file
img/flags/hn.png CHANGED
Binary file
img/flags/hr.png CHANGED
Binary file
img/flags/ht.png CHANGED
Binary file
img/flags/hu.png CHANGED
Binary file
img/flags/id.png CHANGED
Binary file
img/flags/ie.png CHANGED
Binary file
img/flags/il.png CHANGED
Binary file
img/flags/in.png CHANGED
Binary file
img/flags/iq.png CHANGED
Binary file
img/flags/ir.png CHANGED
Binary file
img/flags/is.png CHANGED
Binary file
img/flags/it.png CHANGED
Binary file
img/flags/jo.png CHANGED
Binary file
img/flags/jp.png CHANGED
Binary file
img/flags/ke.png CHANGED
Binary file
img/flags/kg.png CHANGED
Binary file
img/flags/kh.png CHANGED
Binary file
img/flags/km.png CHANGED
Binary file
img/flags/kn.png CHANGED
Binary file
img/flags/kp.png CHANGED
Binary file
img/flags/kr.png CHANGED
Binary file
img/flags/kw.png CHANGED
Binary file
img/flags/la.png CHANGED
Binary file
img/flags/lb.png CHANGED
Binary file
img/flags/li.png CHANGED
Binary file
img/flags/lt.png CHANGED
Binary file
img/flags/lu.png CHANGED
Binary file
img/flags/lv.png CHANGED
Binary file
img/flags/ly.png CHANGED
Binary file
img/flags/ma.png CHANGED
Binary file
img/flags/mc.png CHANGED
Binary file
img/flags/mg.png CHANGED
Binary file
img/flags/ml.png CHANGED
Binary file
img/flags/mm.png CHANGED
Binary file
img/flags/mn.png CHANGED
Binary file
img/flags/mo.png CHANGED
Binary file
img/flags/mr.png CHANGED
Binary file
img/flags/mt.png CHANGED
Binary file
img/flags/mu.png CHANGED
Binary file
img/flags/mx.png CHANGED
Binary file
img/flags/my.png CHANGED
Binary file
img/flags/mz.png CHANGED
Binary file
img/flags/ne.png CHANGED
Binary file
img/flags/nf.png CHANGED
Binary file
img/flags/ng.png CHANGED
Binary file
img/flags/ni.png CHANGED
Binary file
img/flags/nl.png CHANGED
Binary file
img/flags/no.png CHANGED
Binary file
img/flags/nr.png CHANGED
Binary file
img/flags/nu.png CHANGED
Binary file
img/flags/pa.png CHANGED
Binary file
img/flags/pe.png CHANGED
Binary file
img/flags/pf.png CHANGED
Binary file
img/flags/ph.png CHANGED
Binary file
img/flags/pk.png CHANGED
Binary file
img/flags/pl.png CHANGED
Binary file
img/flags/pr.png CHANGED
Binary file
img/flags/ps.png CHANGED
Binary file
img/flags/py.png CHANGED
Binary file
img/flags/qa.png CHANGED
Binary file
img/flags/re.png CHANGED
Binary file
img/flags/ro.png CHANGED
Binary file
img/flags/ru.png CHANGED
Binary file
img/flags/rw.png CHANGED
Binary file
img/flags/sc.png CHANGED
Binary file
img/flags/sd.png CHANGED
Binary file
img/flags/se.png CHANGED
Binary file
img/flags/sg.png CHANGED
Binary file
img/flags/si.png CHANGED
Binary file
img/flags/sj.png CHANGED
Binary file
img/flags/sk.png CHANGED
Binary file
img/flags/sl.png CHANGED
Binary file
img/flags/so.png CHANGED
Binary file
img/flags/sr.png CHANGED
Binary file
img/flags/sv.png CHANGED
Binary file
img/flags/sy.png CHANGED
Binary file
img/flags/sz.png CHANGED
Binary file
img/flags/tf.png CHANGED
Binary file
img/flags/tg.png CHANGED
Binary file
img/flags/th.png CHANGED
Binary file
img/flags/tj.png CHANGED
Binary file
img/flags/tl.png CHANGED
Binary file
img/flags/tn.png CHANGED
Binary file
img/flags/to.png CHANGED
Binary file
img/flags/tr.png CHANGED
Binary file
img/flags/tt.png CHANGED
Binary file
img/flags/tv.png CHANGED
Binary file
img/flags/tw.png CHANGED
Binary file
img/flags/ua.png CHANGED
Binary file
img/flags/ug.png CHANGED
Binary file
img/flags/um.png CHANGED
Binary file
img/flags/us.png CHANGED
Binary file
img/flags/uy.png CHANGED
Binary file
img/flags/uz.png CHANGED
Binary file
img/flags/va.png CHANGED
Binary file
img/flags/ve.png CHANGED
Binary file
img/flags/vg.png CHANGED
Binary file
img/flags/vn.png CHANGED
Binary file
img/flags/vu.png CHANGED
Binary file
img/flags/wf.png CHANGED
Binary file
img/flags/ye.png CHANGED
Binary file
img/flags/zm.png CHANGED
Binary file
img/flags/zw.png CHANGED
Binary file
js/transposh.js CHANGED
@@ -1 +1 @@
1
- function getgt(){jQuery(":button:contains('Suggest - Google')").attr("disabled","disabled").addClass("ui-state-disabled");google.language.translate(jQuery("#"+transposh_params.prefix+"original").val(),"",transposh_params.lang,function(a){if(!a.error){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("<div>"+a.translation+"</div>").text()).keyup()}})}function getbt(){jQuery(":button:contains('Suggest - Bing')").attr("disabled","disabled").addClass("ui-state-disabled");var a=transposh_params.lang;if(a=="zh"){a="zh-chs"}if(a=="zh-tw"){a="zh-cht"}Microsoft.Translator.translate(jQuery("#"+transposh_params.prefix+"original").val(),"",a,function(b){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("<div>"+b+"</div>").text()).keyup()})}var done_p=0;var togo=0;var timer;function do_timer(a){alert("timer..."+a)}var tokens=new Array();var translations=new Array();function ajax_translate(c,b,a){clearTimeout(timer);tokens.push(jQuery("#"+transposh_params.prefix+a).attr("token"));translations.push(c);fix_page(c,b,a);timer=setTimeout(function(){var e={lang:transposh_params.lang,source:b,translation_posted:"1",items:tokens.length};for(var d=0;d<tokens.length;d++){e["tk"+d]=tokens[d];e["tr"+d]=translations[d];if(b>0){done_p+=jQuery("*[token='"+tokens[d]+"']").size()}}jQuery.ajax({type:"POST",url:transposh_params.post_url,data:e,success:function(){if(transposh_params.progress){if(togo>4&&b>0){jQuery("#progress_bar2").progressbar("value",done_p/togo*100)}}},error:function(f){if(b==0){alert("Error !!! failed to translate.\n\nServer's message: "+f.statusText)}}});translations=[];tokens=[]},200)}function fix_page(e,d,c){var b=jQuery("#"+transposh_params.prefix+c).attr("token");var a=e;if(jQuery.trim(e).length===0){a=jQuery("#"+transposh_params.prefix+c).attr("orig")}jQuery("*[token='"+b+"'][hidden!='y']").html(a).each(function(g){var h=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery("#"+transposh_params.prefix+h).attr("source",d);var f=jQuery("#"+transposh_params.prefix+"img_"+h);f.removeClass("tr-icon-yellow").removeClass("tr-icon-green");if(jQuery.trim(e).length!==0){if(d==1){f.addClass("tr-icon-yellow")}else{f.addClass("tr-icon-green")}}});jQuery("*[token='"+b+"'][hidden='y']").attr("trans",a).each(function(g){var h=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery("#"+transposh_params.prefix+h).attr("source",d);var f=jQuery("#"+transposh_params.prefix+"img_"+h);f.removeClass("tr-icon-yellow").removeClass("tr-icon-green");if(jQuery.trim(e).length!==0){if(d==1){f.addClass("tr-icon-yellow")}else{f.addClass("tr-icon-green")}}})}function do_auto_translate(){if(transposh_params.progress){togo=jQuery("."+transposh_params.prefix+'[source=""]').size();if(togo>4){jQuery("#"+transposh_params.prefix+"credit").append('<div style="float: left;width: 90%;height: 10px" id="progress_bar"/><div style="margin-bottom:10px;float:left;width: 90%;height: 10px" id="progress_bar2"/>');jQuery("#progress_bar").progressbar({value:0});jQuery("#progress_bar2").progressbar({value:0});jQuery("#progress_bar2 > div").css({background:"#28F828",border:"#08A908 1px solid"})}var a=0}var b=new Array();jQuery("."+transposh_params.prefix+'[source=""]').each(function(d){var c=jQuery(this).attr("id");var e=jQuery(this).attr("orig");if(e==undefined){e=jQuery(this).html()}if(!(b[e]==1)){b[e]=1;google.language.translate(e,"",transposh_params.lang,function(f){if(!f.error){var g=c.substr(c.lastIndexOf("_")+1);ajax_translate(jQuery("<div>"+f.translation+"</div>").text(),1,g);if(transposh_params.progress){a=togo-jQuery("."+transposh_params.prefix+'[source=""]').size();if(togo>4){jQuery("#progress_bar").progressbar("value",a/togo*100)}}}})}})}function confirm_close(){jQuery('<div id="dial" title="Close without saving?"><p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>You have made a change to the translation. Are you sure you want to discard it?</p></div>').appendTo("body").dialog({bgiframe:true,resizable:false,height:140,modal:true,overlay:{backgroundColor:"#000",opacity:0.5},buttons:{Discard:function(){jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false});jQuery(this).dialog("close");jQuery("#"+transposh_params.prefix+"d-tabs").dialog("close")},Cancel:function(){jQuery(this).dialog("close")}}})}function translate_dialog(b){jQuery("#"+transposh_params.prefix+"d-tabs").remove();jQuery('<div id="'+transposh_params.prefix+'d-tabs" title="Edit Translation"/>').appendTo("body");jQuery("#"+transposh_params.prefix+"d-tabs").append("<ul/>").tabs({cache:true}).tabs("add","#"+transposh_params.prefix+"d-tabs-1","Translate").tabs("add",transposh_params.post_url+"?tr_token_hist="+jQuery("#"+transposh_params.prefix+b).attr("token")+"&lang="+transposh_params.lang,"History").css("text-align","left").css("padding",0).bind("tabsload",function(d,e){jQuery("table",e.panel).addClass("ui-widget ui-widget-content").css({width:"95%",padding:"0"});jQuery("table thead tr",e.panel).addClass("ui-widget-header");jQuery("table tbody td[source='1']",e.panel).append('<span title="computer" style="display: inline-block; margin-right: 0.3em;" class="ui-icon ui-icon-gear"></span>');jQuery("table tbody td[source='0']",e.panel).append('<span title="human" style="display: inline-block; margin-right: 0.3em;" class="ui-icon ui-icon-person"></span>')}).bind("tabsselect",function(d,e){if(jQuery(e.tab).text()=="Translate"){jQuery("#"+transposh_params.prefix+"d-tabs").dialog("option","buttons",a)}else{jQuery("#"+transposh_params.prefix+"d-tabs").dialog("option","buttons",c)}}).bind("dialogbeforeclose",function(d,e){if(jQuery("#"+transposh_params.prefix+"translation").data("edit").changed){confirm_close();return false}return true});jQuery("#"+transposh_params.prefix+"d-tabs li").css("list-style-type","none").css("list-style-position","outside");jQuery("#"+transposh_params.prefix+"d-tabs-1").css("padding","1px").append('<form id="'+transposh_params.prefix+'form"><fieldset><label for="original">Original Text</label><textarea cols="80" row="3" name="original" id="'+transposh_params.prefix+'original" class="text ui-widget-content ui-corner-all" readonly="y"/><label for="translation">Translate To</label><textarea cols="80" row="3" name="translation" id="'+transposh_params.prefix+'translation" value="" class="text ui-widget-content ui-corner-all"/></fieldset></form>');jQuery("#"+transposh_params.prefix+"d-tabs-1 label").css("display","block");jQuery("#"+transposh_params.prefix+"d-tabs-1 textarea.text").css({"margin-bottom":"12px",width:"95%",padding:".4em"});jQuery("#"+transposh_params.prefix+"original").val(jQuery("#"+transposh_params.prefix+b).attr("orig"));jQuery("#"+transposh_params.prefix+"translation").val(jQuery("#"+transposh_params.prefix+b).html());if(jQuery("#"+transposh_params.prefix+b).attr("trans")){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("#"+transposh_params.prefix+b).attr("trans"))}jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false});jQuery("#"+transposh_params.prefix+"translation").keyup(function(d){if(jQuery("#"+transposh_params.prefix+b).text()!=jQuery(this).val()){jQuery(this).css("background","yellow");jQuery(this).data("edit",{changed:true})}else{jQuery(this).css("background","");jQuery(this).data("edit",{changed:false})}});var a={};if(binglangs.indexOf(transposh_params.lang+",",0)>-1){a["Suggest - Bing"]=function(){getbt()}}if(google.language.isTranslatable(transposh_params.lang)||"he|zh-tw|pt|fa".indexOf(transposh_params.lang)>-1){a["Suggest - Google"]=function(){getgt()}}a.Ok=function(){var d=jQuery("#"+transposh_params.prefix+"translation").val();if(jQuery("#"+transposh_params.prefix+"translation").data("edit").changed){ajax_translate(d,0,b);jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false})}jQuery(this).dialog("close")};var c={Close:function(){jQuery(this).dialog("close")}};jQuery("#"+transposh_params.prefix+"d-tabs").dialog({bgiframe:true,modal:true,width:500,buttons:a})}jQuery.noConflict();var transposh_params=new Array();jQuery("script[src*='transposh.js']").each(function(a){var e=unescape(this.src.substring(this.src.indexOf("?")+1));var d=e.split("&");for(var c=0;c<d.length;c++){var g=d[c].indexOf("=");if(g>0){var b=d[c].substring(0,g);var f=d[c].substring(g+1);transposh_params[b]=f}}});google.load("language","1");var binglangs="";if(typeof(Microsoft)!="undefined"){try{binglangs=String(Microsoft.Translator.GetLanguages())+",zh,zh-tw,"}catch(err){alert("There was an error using Microsoft.Translator - probably a bad key or URL used in key. ("+err+")")}}jQuery(document).ready(function(){if(typeof(jQuery().progressbar)!="undefined"){transposh_params.progress=true}if(google.language.isTranslatable(transposh_params.lang)||"he|zh-tw|pt|fa".indexOf(transposh_params.lang)>-1){do_auto_translate()}if(transposh_params.edit){jQuery("."+transposh_params.prefix).each(function(c){var a=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery(this).after('<span id="'+transposh_params.prefix+"img_"+a+'" class="tr-icon" title="'+jQuery(this).attr("orig")+'"></span>');var b=jQuery("#"+transposh_params.prefix+"img_"+a);b.click(function(){translate_dialog(a);return false}).css({border:"0px",margin:"1px",padding:"0px"});if(jQuery(this).attr("source")=="1"){b.addClass("tr-icon-yellow")}else{if(jQuery(this).attr("source")=="0"){b.addClass("tr-icon-green")}}if(jQuery(this).attr("hidden")=="y"){b.css({opacity:"0.6"})}})}});
1
+ function getgt(){jQuery(":button:contains('Suggest - Google')").attr("disabled","disabled").addClass("ui-state-disabled");google.language.translate(jQuery("#"+transposh_params.prefix+"original").val(),"",transposh_params.lang,function(a){if(!a.error){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("<div>"+a.translation+"</div>").text()).keyup()}})}function getbt(){jQuery(":button:contains('Suggest - Bing')").attr("disabled","disabled").addClass("ui-state-disabled");var a=transposh_params.lang;if(a=="zh"){a="zh-chs"}if(a=="zh-tw"){a="zh-cht"}Microsoft.Translator.translate(jQuery("#"+transposh_params.prefix+"original").val(),"",a,function(b){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("<div>"+b+"</div>").text()).keyup()})}var done_p=0;var togo=0;var timer;function do_timer(a){alert("timer..."+a)}var tokens=new Array();var translations=new Array();function ajax_translate(c,b,a){clearTimeout(timer);tokens.push(jQuery("#"+transposh_params.prefix+a).attr("token"));translations.push(c);fix_page(c,b,a);timer=setTimeout(function(){var e={lang:transposh_params.lang,source:b,translation_posted:"1",items:tokens.length};for(var d=0;d<tokens.length;d++){e["tk"+d]=tokens[d];e["tr"+d]=translations[d];if(b>0){done_p+=jQuery("*[token='"+tokens[d]+"']").size()}}jQuery.ajax({type:"POST",url:transposh_params.post_url,data:e,success:function(){if(transposh_params.progress){if(togo>4&&b>0){jQuery("#progress_bar2").progressbar("value",done_p/togo*100)}}},error:function(f){if(b==0){alert("Error !!! failed to translate.\n\nServer's message: "+f.statusText)}}});translations=[];tokens=[]},200)}function fix_page(e,d,c){var b=jQuery("#"+transposh_params.prefix+c).attr("token");var a=e;if(jQuery.trim(e).length===0){a=jQuery("#"+transposh_params.prefix+c).attr("orig")}jQuery("*[token='"+b+"'][hidden!='y']").html(a).each(function(g){var h=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery("#"+transposh_params.prefix+h).attr("source",d);var f=jQuery("#"+transposh_params.prefix+"img_"+h);f.removeClass("tr-icon-yellow").removeClass("tr-icon-green");if(jQuery.trim(e).length!==0){if(d==1){f.addClass("tr-icon-yellow")}else{f.addClass("tr-icon-green")}}});jQuery("*[token='"+b+"'][hidden='y']").attr("trans",a).each(function(g){var h=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery("#"+transposh_params.prefix+h).attr("source",d);var f=jQuery("#"+transposh_params.prefix+"img_"+h);f.removeClass("tr-icon-yellow").removeClass("tr-icon-green");if(jQuery.trim(e).length!==0){if(d==1){f.addClass("tr-icon-yellow")}else{f.addClass("tr-icon-green")}}})}function do_auto_translate(){if(transposh_params.progress){togo=jQuery("."+transposh_params.prefix+'[source=""]').size();if(togo>4){jQuery("#"+transposh_params.prefix+"credit").append('<div style="float: left;width: 90%;height: 10px" id="progress_bar"/><div style="margin-bottom:10px;float:left;width: 90%;height: 10px" id="progress_bar2"/>');jQuery("#progress_bar").progressbar({value:0});jQuery("#progress_bar2").progressbar({value:0});jQuery("#progress_bar2 > div").css({background:"#28F828",border:"#08A908 1px solid"})}var a=0}var b=new Array();jQuery("."+transposh_params.prefix+'[source=""]').each(function(d){var c=jQuery(this).attr("id");var e=jQuery(this).attr("orig");if(e==undefined){e=jQuery(this).html()}if(!(b[e]==1)){b[e]=1;google.language.translate(e,"",transposh_params.lang,function(f){if(!f.error){var g=c.substr(c.lastIndexOf("_")+1);ajax_translate(jQuery("<div>"+f.translation+"</div>").text(),1,g);if(transposh_params.progress){a=togo-jQuery("."+transposh_params.prefix+'[source=""]').size();if(togo>4){jQuery("#progress_bar").progressbar("value",a/togo*100)}}}})}})}function confirm_close(){jQuery('<div id="dial" title="Close without saving?"><p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>You have made a change to the translation. Are you sure you want to discard it?</p></div>').appendTo("body").dialog({bgiframe:true,resizable:false,height:140,modal:true,overlay:{backgroundColor:"#000",opacity:0.5},buttons:{Discard:function(){jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false});jQuery(this).dialog("close");jQuery("#"+transposh_params.prefix+"d-tabs").dialog("close")},Cancel:function(){jQuery(this).dialog("close")}}})}function translate_dialog(b){jQuery("#"+transposh_params.prefix+"d-tabs").remove();jQuery('<div id="'+transposh_params.prefix+'d-tabs" title="Edit Translation"/>').appendTo("body");jQuery("#"+transposh_params.prefix+"d-tabs").append("<ul/>").tabs({cache:true}).tabs("add","#"+transposh_params.prefix+"d-tabs-1","Translate").tabs("add",transposh_params.post_url+"?tr_token_hist="+jQuery("#"+transposh_params.prefix+b).attr("token")+"&lang="+transposh_params.lang,"History").css("text-align","left").css("padding",0).bind("tabsload",function(d,e){jQuery("table",e.panel).addClass("ui-widget ui-widget-content").css({width:"95%",padding:"0"});jQuery("table thead tr",e.panel).addClass("ui-widget-header");jQuery("table tbody td[source='1']",e.panel).append('<span title="computer" style="display: inline-block; margin-right: 0.3em;" class="ui-icon ui-icon-gear"></span>');jQuery("table tbody td[source='0']",e.panel).append('<span title="human" style="display: inline-block; margin-right: 0.3em;" class="ui-icon ui-icon-person"></span>')}).bind("tabsselect",function(d,e){if(jQuery(e.tab).text()=="Translate"){jQuery("#"+transposh_params.prefix+"d-tabs").dialog("option","buttons",a)}else{jQuery("#"+transposh_params.prefix+"d-tabs").dialog("option","buttons",c)}}).bind("dialogbeforeclose",function(d,e){if(jQuery("#"+transposh_params.prefix+"translation").data("edit").changed){confirm_close();return false}return true});jQuery("#"+transposh_params.prefix+"d-tabs li").css("list-style-type","none").css("list-style-position","outside");jQuery("#"+transposh_params.prefix+"d-tabs-1").css("padding","1px").append('<form id="'+transposh_params.prefix+'form"><fieldset><label for="original">Original Text</label><textarea cols="80" row="3" name="original" id="'+transposh_params.prefix+'original" class="text ui-widget-content ui-corner-all" readonly="y"/><label for="translation">Translate To</label><textarea cols="80" row="3" name="translation" id="'+transposh_params.prefix+'translation" value="" class="text ui-widget-content ui-corner-all"/></fieldset></form>');jQuery("#"+transposh_params.prefix+"d-tabs-1 label").css("display","block");jQuery("#"+transposh_params.prefix+"d-tabs-1 textarea.text").css({"margin-bottom":"12px",width:"95%",padding:".4em"});jQuery("#"+transposh_params.prefix+"original").val(jQuery("#"+transposh_params.prefix+b).attr("orig"));jQuery("#"+transposh_params.prefix+"translation").val(jQuery("#"+transposh_params.prefix+b).html());if(jQuery("#"+transposh_params.prefix+b).attr("trans")){jQuery("#"+transposh_params.prefix+"translation").val(jQuery("#"+transposh_params.prefix+b).attr("trans"))}jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false});jQuery("#"+transposh_params.prefix+"translation").keyup(function(d){if(jQuery("#"+transposh_params.prefix+b).text()!=jQuery(this).val()){jQuery(this).css("background","yellow");jQuery(this).data("edit",{changed:true})}else{jQuery(this).css("background","");jQuery(this).data("edit",{changed:false})}});var a={};if(binglangs.indexOf(transposh_params.lang+",",0)>-1){a["Suggest - Bing"]=function(){getbt()}}if(google.language.isTranslatable(transposh_params.lang)||ext_langs.indexOf(transposh_params.lang)>-1){a["Suggest - Google"]=function(){getgt()}}a.Ok=function(){var d=jQuery("#"+transposh_params.prefix+"translation").val();if(jQuery("#"+transposh_params.prefix+"translation").data("edit").changed){ajax_translate(d,0,b);jQuery("#"+transposh_params.prefix+"translation").data("edit",{changed:false})}jQuery(this).dialog("close")};var c={Close:function(){jQuery(this).dialog("close")}};jQuery("#"+transposh_params.prefix+"d-tabs").dialog({bgiframe:true,modal:true,width:500,buttons:a})}jQuery.noConflict();var transposh_params=new Array();var ext_langs="he|zh-tw|pt|fa|af|be|is|ga|mk|ms|sw|ws|cy|yi";jQuery("script[src*='transposh.js']").each(function(a){var e=unescape(this.src.substring(this.src.indexOf("?")+1));var d=e.split("&");for(var c=0;c<d.length;c++){var g=d[c].indexOf("=");if(g>0){var b=d[c].substring(0,g);var f=d[c].substring(g+1);transposh_params[b]=f}}});google.load("language","1");var binglangs="";if(typeof(Microsoft)!="undefined"){try{binglangs=String(Microsoft.Translator.GetLanguages())+",zh,zh-tw,"}catch(err){alert("There was an error using Microsoft.Translator - probably a bad key or URL used in key. ("+err+")")}}jQuery(document).ready(function(){if(typeof(jQuery().progressbar)!="undefined"){transposh_params.progress=true}if(google.language.isTranslatable(transposh_params.lang)||ext_langs.indexOf(transposh_params.lang)>-1){do_auto_translate()}if(transposh_params.edit){jQuery("."+transposh_params.prefix).each(function(c){var a=jQuery(this).attr("id").substr(jQuery(this).attr("id").lastIndexOf("_")+1);jQuery(this).after('<span id="'+transposh_params.prefix+"img_"+a+'" class="tr-icon" title="'+jQuery(this).attr("orig")+'"></span>');var b=jQuery("#"+transposh_params.prefix+"img_"+a);b.click(function(){translate_dialog(a);return false}).css({border:"0px",margin:"1px",padding:"0px"});if(jQuery(this).attr("source")=="1"){b.addClass("tr-icon-yellow")}else{if(jQuery(this).attr("source")=="0"){b.addClass("tr-icon-green")}}if(jQuery(this).attr("hidden")=="y"){b.css({opacity:"0.6"})}})}});
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: oferwald, amirperlman
3
  Donate link: http://transposh.org/donate/
4
  Tags: translation, widget, filter, bilingual, multilingual, transposh, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
5
  Requires at least: 2.7
6
- Tested up to: 2.8.3
7
- Stable tag: 0.3.2
8
 
9
  Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
10
 
@@ -115,6 +115,9 @@ change the .css from transparent background to your page background color. And l
115
  5. Widget style selection
116
 
117
  == Changelog ==
 
 
 
118
  = 2009/08/03 - 0.3.2 =
119
  * Fixed issue with plugin that made login unavailable at some situations
120
  * Fixed issue with static first page
3
  Donate link: http://transposh.org/donate/
4
  Tags: translation, widget, filter, bilingual, multilingual, transposh, language, crowdsourcing, context, wiki, RTL, Hebrew, Spanish, French, Russian, English, Arabic, Portuguese
5
  Requires at least: 2.7
6
+ Tested up to: 2.8.4
7
+ Stable tag: 0.3.3
8
 
9
  Transposh filter allows in context quick translation of websites, it allows you to crowd-source the translation to your users
10
 
115
  5. Widget style selection
116
 
117
  == Changelog ==
118
+ = 2009/09/06 - 0.3.3 =
119
+ * 9 More languages supported by google translate
120
+ * Further compressed images with punypng (808 bytes saved!)
121
  = 2009/08/03 - 0.3.2 =
122
  * Fixed issue with plugin that made login unavailable at some situations
123
  * Fixed issue with static first page
transposh.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://transposh.org/
5
  Description: Translation filter for WordPress, After enabling please set languages at the <a href="options-general.php?page=transposh">the options page</a> Want to help? visit our development site at <a href="http://trac.transposh.org/">trac.transposh.org</a>.
6
  Author: Team Transposh
7
- Version: 0.3.2
8
  Author URI: http://transposh.org/
9
  License: GPL (http://www.gnu.org/licenses/gpl.txt)
10
  */
@@ -356,7 +356,7 @@ function add_transposh_css() {
356
  return;
357
  }
358
  //include the transposh.css
359
- wp_enqueue_style("transposh","$tr_plugin_url/css/transposh.css",array(),'0.3.2');
360
  wp_enqueue_style("jquery","http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css",array(),'1.0');
361
 
362
  }
@@ -391,7 +391,7 @@ function add_transposh_js() {
391
  }
392
 
393
  if($GLOBALS['is_edit_mode'] || $enable_auto_translate) {
394
- $post_url = $home_url . '/index.php';
395
  wp_deregister_script('jquery');
396
  wp_enqueue_script("jquery","http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",array(),'1.3.2');
397
  // jQuery pushing below might cause issues
@@ -400,7 +400,7 @@ function add_transposh_js() {
400
  if (get_option(ENABLE_MSN_TRANSLATE)) {
401
  wp_enqueue_script("mstranslate","http://api.microsofttranslator.com/V1/Ajax.svc/Embed?appId=".get_option(MSN_TRANSLATE_KEY),array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
402
  }
403
- wp_enqueue_script("transposh","$tr_plugin_url/js/transposh.js?post_url=$post_url{$edit_mode}&lang={$GLOBALS['lang']}&prefix=".SPAN_PREFIX,array("jquery"),'0.3.2',get_option(ENABLE_FOOTER_SCRIPTS));
404
  }
405
  }
406
 
4
  Plugin URI: http://transposh.org/
5
  Description: Translation filter for WordPress, After enabling please set languages at the <a href="options-general.php?page=transposh">the options page</a> Want to help? visit our development site at <a href="http://trac.transposh.org/">trac.transposh.org</a>.
6
  Author: Team Transposh
7
+ Version: 0.3.3
8
  Author URI: http://transposh.org/
9
  License: GPL (http://www.gnu.org/licenses/gpl.txt)
10
  */
356
  return;
357
  }
358
  //include the transposh.css
359
+ wp_enqueue_style("transposh","$tr_plugin_url/css/transposh.css",array(),'0.3.3');
360
  wp_enqueue_style("jquery","http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css",array(),'1.0');
361
 
362
  }
391
  }
392
 
393
  if($GLOBALS['is_edit_mode'] || $enable_auto_translate) {
394
+ $post_url = $home_url;// . '/index.php'; pay attention here - might be damaging
395
  wp_deregister_script('jquery');
396
  wp_enqueue_script("jquery","http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",array(),'1.3.2');
397
  // jQuery pushing below might cause issues
400
  if (get_option(ENABLE_MSN_TRANSLATE)) {
401
  wp_enqueue_script("mstranslate","http://api.microsofttranslator.com/V1/Ajax.svc/Embed?appId=".get_option(MSN_TRANSLATE_KEY),array(),'1',get_option(ENABLE_FOOTER_SCRIPTS));
402
  }
403
+ wp_enqueue_script("transposh","$tr_plugin_url/js/transposh.js?post_url=$post_url{$edit_mode}&lang={$GLOBALS['lang']}&prefix=".SPAN_PREFIX,array("jquery"),'0.3.3',get_option(ENABLE_FOOTER_SCRIPTS));
404
  }
405
  }
406
 
transposh_admin.php CHANGED
@@ -70,7 +70,7 @@ function insert_supported_langs() {
70
  if(!($i % $columns)) echo '<tr'.(!($i/2 % $columns) ? ' class="alternate"':'').'>';
71
  $i++;
72
 
73
- echo "<td>".display_flag("$tr_plugin_url/img/flags/", $flag, $language,get_option(ENABLE_CSS_FLAGS))."&nbsp;$language</td>";
74
  echo '<td align="center"><input type="checkbox" id="' . $code .'_view" name="' .
75
  $code . '_view" onchange="chbx_change(\'' . $code . '\')" ' . is_viewable($code) . '/></td>';
76
  echo '<td class="tr_editable"'.$extrastyle.' align="center"><input type="checkbox" id="' . $code . '_edit" name="' .
@@ -281,7 +281,7 @@ class transposh_plugin {
281
  //constructor of class, PHP4 compatible construction for backward compatibility
282
  function transposh_plugin() {
283
  if (get_option(ENABLE_CSS_FLAGS))
284
- wp_enqueue_style("transposh-flags",plugins_url('', __FILE__)."/css/transposh_flags.css",array(),'0.3.2');
285
  //add filter for WordPress 2.8 changed backend box system !
286
  add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
287
  //add some help
@@ -476,7 +476,7 @@ class transposh_plugin {
476
 
477
  }
478
  function on_contentbox_generic_content($data) {
479
- global $wp_version;
480
  echo '<h4>Rewrite URLs</h4>';
481
  insert_permalink_rewrite_option();
482
 
@@ -487,6 +487,11 @@ class transposh_plugin {
487
 
488
  echo '<h4>Use css flags (experimental)</h4>';
489
  insert_css_flags_option();
 
 
 
 
 
490
 
491
  }
492
  function on_contentbox_community_content($data) {
70
  if(!($i % $columns)) echo '<tr'.(!($i/2 % $columns) ? ' class="alternate"':'').'>';
71
  $i++;
72
 
73
+ echo "<td>".display_flag("$tr_plugin_url/img/flags", $flag, $language,get_option(ENABLE_CSS_FLAGS))."&nbsp;$language</td>";
74
  echo '<td align="center"><input type="checkbox" id="' . $code .'_view" name="' .
75
  $code . '_view" onchange="chbx_change(\'' . $code . '\')" ' . is_viewable($code) . '/></td>';
76
  echo '<td class="tr_editable"'.$extrastyle.' align="center"><input type="checkbox" id="' . $code . '_edit" name="' .
281
  //constructor of class, PHP4 compatible construction for backward compatibility
282
  function transposh_plugin() {
283
  if (get_option(ENABLE_CSS_FLAGS))
284
+ wp_enqueue_style("transposh-flags",plugins_url('', __FILE__)."/css/transposh_flags.css",array(),'0.3.3');
285
  //add filter for WordPress 2.8 changed backend box system !
286
  add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
287
  //add some help
476
 
477
  }
478
  function on_contentbox_generic_content($data) {
479
+ global $wp_version;//, $languages;
480
  echo '<h4>Rewrite URLs</h4>';
481
  insert_permalink_rewrite_option();
482
 
487
 
488
  echo '<h4>Use css flags (experimental)</h4>';
489
  insert_css_flags_option();
490
+ /*foreach($languages as $code => $lang) {
491
+ list ($language,$flag,$autot) = explode (",",$lang);
492
+ $flags .= $flag.',';
493
+ }
494
+ echo '<a href="http://transposh.org/services/index.php?flags='.$flags.'">Gen sprites</a>';*/
495
 
496
  }
497
  function on_contentbox_community_content($data) {
transposh_db.php CHANGED
@@ -119,7 +119,7 @@ function update_translation() {
119
  }
120
 
121
  //add our own custom header - so we will know that we got here
122
- header("Transposh: ver-0.3.2 db_version-". DB_VERSION);
123
 
124
  // transaction log stuff
125
  global $user_ID;
@@ -227,7 +227,7 @@ function get_translation_history($token, $lang) {
227
  $original = $wpdb->escape(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8'));
228
 
229
  //add our own custom header - so we will know that we got here
230
- header("Transposh: ver-0.3.2 db_version-". DB_VERSION);
231
 
232
  $query = "SELECT translated, translated_by, timestamp, source, user_login ".
233
  "FROM $table_name ".
119
  }
120
 
121
  //add our own custom header - so we will know that we got here
122
+ header("Transposh: ver-0.3.3 db_version-". DB_VERSION);
123
 
124
  // transaction log stuff
125
  global $user_ID;
227
  $original = $wpdb->escape(html_entity_decode($original, ENT_NOQUOTES, 'UTF-8'));
228
 
229
  //add our own custom header - so we will know that we got here
230
+ header("Transposh: ver-0.3.3 db_version-". DB_VERSION);
231
 
232
  $query = "SELECT translated, translated_by, timestamp, source, user_login ".
233
  "FROM $table_name ".
transposh_widget.php CHANGED
@@ -85,11 +85,11 @@ function add_transposh_widget_css() {
85
  // TODO: user generated version
86
  $options = get_option(WIDGET_TRANSPOSH);
87
  if ($options['style'] == 1 || $options['style'] == 2) {
88
- wp_enqueue_style("transposh_widget","{$GLOBALS['tr_plugin_url']}/css/transposh_widget.css",array(),'0.3.2');
89
  if (get_option(ENABLE_CSS_FLAGS)) {
90
- wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags.css",array(),'0.3.2');
91
  if (file_exists("{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css"))
92
- wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css",array(),'0.3.2');
93
  }
94
  }
95
 
@@ -140,7 +140,7 @@ function transposh_widget($args) {
140
 
141
 
142
  echo "<a href=\"" . $page_url . '"'.(($GLOBALS['lang'] == $code) ? ' class="tr_active"' :'').'>'.
143
- display_flag("$plugpath/img/flags/", $flag, $language,get_option(ENABLE_CSS_FLAGS)).
144
  "</a>";
145
  if ($options['style'] != 1) {
146
  echo "$language<br/>";
85
  // TODO: user generated version
86
  $options = get_option(WIDGET_TRANSPOSH);
87
  if ($options['style'] == 1 || $options['style'] == 2) {
88
+ wp_enqueue_style("transposh_widget","{$GLOBALS['tr_plugin_url']}/css/transposh_widget.css",array(),'0.3.3');
89
  if (get_option(ENABLE_CSS_FLAGS)) {
90
+ wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags.css",array(),'0.3.3');
91
  if (file_exists("{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css"))
92
+ wp_enqueue_style("transposh_flags", "{$GLOBALS['tr_plugin_url']}/css/transposh_flags_u.css",array(),'0.3.3');
93
  }
94
  }
95
 
140
 
141
 
142
  echo "<a href=\"" . $page_url . '"'.(($GLOBALS['lang'] == $code) ? ' class="tr_active"' :'').'>'.
143
+ display_flag("$plugpath/img/flags", $flag, $language,get_option(ENABLE_CSS_FLAGS)).
144
  "</a>";
145
  if ($options['style'] != 1) {
146
  echo "$language<br/>";