Commit 4174a176 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Xiaowu Zhang

erp5_web_renderjs_ui: don't translate if no database found

parent 98c47483
......@@ -4,7 +4,10 @@
"use strict";
function translate(string, gadget) {
return translation_data[gadget.state.language][string] || string;
if (translation_data[gadget.state.language]) {
return translation_data[gadget.state.language][string] || string;
}
return string;
}
// translate a list of elements passed and returned as string
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>955.18006.50413.2645</string> </value>
<value> <string>955.20795.60990.42035</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1479302155.8</float>
<float>1479833218.18</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