Commit ae66f370 authored by Sven Franck's avatar Sven Franck Committed by Xiaowu Zhang

erp5_web_renderjs_ui: add translation gadget back to erp5_gadget

parent 9e4a16df
...@@ -148,6 +148,10 @@ ...@@ -148,6 +148,10 @@
<section data-gadget-url="gadget_jio.html"\n <section data-gadget-url="gadget_jio.html"\n
data-gadget-scope="jio_gadget"\n data-gadget-scope="jio_gadget"\n
data-gadget-sandbox="public"></section>\n data-gadget-sandbox="public"></section>\n
\n
<section data-gadget-sandbox="public" \n
data-gadget-url="gadget_translate.html" \n
data-gadget-scope="translate"></section>\n
\n \n
</body>\n </body>\n
</html> </html>
...@@ -287,7 +291,7 @@ ...@@ -287,7 +291,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.51115.58414.11008</string> </value> <value> <string>939.52806.11840.43758</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -305,7 +309,7 @@ ...@@ -305,7 +309,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419245088.26</float> <float>1419345029.51</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -233,6 +233,16 @@ ...@@ -233,6 +233,16 @@
g.props.article = element.querySelector("article");\n g.props.article = element.querySelector("article");\n
});\n });\n
})\n })\n
\n
.ready(function (my_gadget) {\n
return new RSVP.Queue()\n
.push(function () {\n
return my_gadget.getDeclaredGadget("translate");\n
})\n
.push(function (my_translation_gadget) {\n
return my_translation_gadget.render();\n
});\n
})\n
\n \n
.ready(function (g) {\n .ready(function (g) {\n
return g.getDeclaredGadget("header")\n return g.getDeclaredGadget("header")\n
...@@ -248,6 +258,35 @@ ...@@ -248,6 +258,35 @@
// handle acquisition\n // handle acquisition\n
/////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////\n
.declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash")\n .declareAcquiredMethod("pleaseRedirectMyHash", "pleaseRedirectMyHash")\n
\n
// bridge translation gadget\n
.allowPublicAcquisition("changeLanguage", function (param_list) {\n
return this.getDeclaredGadget("translate")\n
.push(function (translation_gadget) {\n
return translation_gadget.changeLanguage.apply(\n
translation_gadget,\n
param_list\n
);\n
});\n
})\n
.allowPublicAcquisition("translateStringList", function (param_list) {\n
return this.getDeclaredGadget("translate")\n
.push(function (translation_gadget) {\n
return translation_gadget.translateStringList.apply(\n
translation_gadget,\n
param_list\n
);\n
});\n
})\n
.allowPublicAcquisition("translateElementList", function (param_list) {\n
return this.getDeclaredGadget("translate")\n
.push(function (translation_gadget) {\n
return translation_gadget.translateElementList.apply(\n
translation_gadget,\n
param_list\n
);\n
});\n
})\n
\n \n
// Bridge to jio gadget\n // Bridge to jio gadget\n
.allowPublicAcquisition("jio_allDocs", function (param_list) {\n .allowPublicAcquisition("jio_allDocs", function (param_list) {\n
...@@ -627,7 +666,7 @@ ...@@ -627,7 +666,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.51164.5256.46045</string> </value> <value> <string>939.52807.26806.58419</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -645,7 +684,7 @@ ...@@ -645,7 +684,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1419250252.2</float> <float>1419345403.22</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment