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

erp5_web_renderjs_ui: Translate validation message

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