Commit 91f7f515 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Xiaowu Zhang

erp5_officejs: don't translate at ready step

in ready step, indexeddb storage is not yet create, so translation gadget can't get
language setting
parent 0ce1c3e4
......@@ -42,13 +42,6 @@
})
.ready(function (g) {
return g.translateHtml(panel_template_header() + panel_template_body())
.push(function (my_translated_or_plain_html) {
g.props.jelement.html(my_translated_or_plain_html);
g.props.jelement.trigger("create");
});
})
.declareAcquiredMethod('getSetting', 'getSetting')
......@@ -72,8 +65,13 @@
key,
value,
i,
queue = new RSVP.Queue();
queue = gadget.translateHtml(panel_template_header() + panel_template_body());
queue
.push(function (my_translated_or_plain_html) {
gadget.props.jelement.html(my_translated_or_plain_html);
gadget.props.jelement.trigger("create");
});
function push(a, b) {
queue.push(function () {
return gadget.setSetting(a, b);
......
......@@ -251,7 +251,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>supercedriclen</string> </value>
<value> <string>zope</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -265,7 +265,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>951.28200.51773.38570</string> </value>
<value> <string>954.32960.61602.49578</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -283,7 +283,7 @@
</tuple>
<state>
<tuple>
<float>1464190613.09</float>
<float>1476099905.42</float>
<string>UTC</string>
</tuple>
</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