Commit 35738b22 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: Translate validation message

parent de7bf30d
......@@ -3,6 +3,7 @@
<head>
<!--
data-i18n=Invalid DateTime
data-i18n=Please fill out this field.
-->
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>973.40657.63647.56780</string> </value>
<value> <string>990.39798.46778.32068</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>1554191455.81</float>
<float>1616526933.3</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -293,11 +293,15 @@
.declareAcquiredMethod("notifyInvalid", "notifyInvalid")
.onEvent('invalid', function invalid(evt) {
var gadget = this;
// invalid event does not bubble
return RSVP.all([
this.deferErrorText(evt.target.validationMessage),
this.notifyInvalid(evt.target.validationMessage)
]);
return gadget.translate(evt.target.validationMessage)
.push(function (message) {
return RSVP.all([
gadget.deferErrorText(message),
gadget.notifyInvalid(message)
]);
});
}, true, false);
}(window, document, rJS, RSVP, jIO, getFirstNonEmpty));
\ No newline at end of file
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.28219.58167.35225</string> </value>
<value> <string>990.59170.22569.1536</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1614695141.57</float>
<float>1616691334.22</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