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

erp5_web_renderjs_ui: added i18n tags to gadgets containing text

parent 67fb3719
...@@ -129,13 +129,13 @@ ...@@ -129,13 +129,13 @@
<div class="ui-table-header ui-header ui-bar-c ui-corner-all">\n <div class="ui-table-header ui-header ui-bar-c ui-corner-all">\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n <div class="ui-controlgroup-controls">\n
<a class="ui-responsive ui-btn ui-btn-icon-left ui-icon-eye ui-first-child ui-override-theme ui-disabled" href="#">Hide Rows</a>\n <a data-i18n="header-hide" class="ui-responsive ui-btn ui-btn-icon-left ui-icon-eye ui-first-child ui-override-theme ui-disabled" href="#">Hide Rows</a>\n
</div>\n </div>\n
</div>\n </div>\n
<h1 class="ui-title ui-override-theme">0 items selected</h1>\n <h1 data-i18n="header-selected" class="ui-title ui-override-theme">0 items selected</h1>\n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-right">\n
<div class="ui-controlgroup-controls">\n <div class="ui-controlgroup-controls">\n
<a class="ui-responsive ui-btn ui-btn-icon-left ui-icon-sort-amount-desc ui-last-child ui-override-theme ui-disabled" href="#">Sort</a>\n <a data-i18n="header-sort" class="ui-responsive ui-btn ui-btn-icon-left ui-icon-sort-amount-desc ui-last-child ui-override-theme ui-disabled" href="#">Sort</a>\n
</div>\n </div>\n
</div>\n </div>\n
</div>\n </div>\n
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>super_sven</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>938.24472.44438.46097</string> </value> <value> <string>939.43978.9403.31744</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1413812775.46</float> <float>1419238718.84</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
// acquired method\n // acquired method\n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
.declareAcquiredMethod("jio_allDocs", "jio_allDocs")\n .declareAcquiredMethod("jio_allDocs", "jio_allDocs")\n
.declareAcquiredMethod("translateElementList", "translateElementList")\n
.declareAcquiredMethod("whoWantToDisplayThis", "whoWantToDisplayThis")\n .declareAcquiredMethod("whoWantToDisplayThis", "whoWantToDisplayThis")\n
.declareAcquiredMethod("pleasePublishMyState", "pleasePublishMyState")\n .declareAcquiredMethod("pleasePublishMyState", "pleasePublishMyState")\n
//////////////////////////////////////////////\n //////////////////////////////////////////////\n
...@@ -154,6 +155,7 @@ ...@@ -154,6 +155,7 @@
for (i = 0; i < field_json.column_list.length; i += 1) {\n for (i = 0; i < field_json.column_list.length; i += 1) {\n
th = document.createElement("th");\n th = document.createElement("th");\n
th.textContent = field_json.column_list[i][1];\n th.textContent = field_json.column_list[i][1];\n
th.setAttribute("data-i18n", "title-" + field_json.column_list[i][1].replace(" ", "-"));\n
tr.appendChild(th);\n tr.appendChild(th);\n
}\n }\n
thead.appendChild(tr);\n thead.appendChild(tr);\n
...@@ -279,18 +281,25 @@ ...@@ -279,18 +281,25 @@
\n \n
paging_prev.className = "ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child";\n paging_prev.className = "ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child";\n
paging_prev.textContent = "Previous";\n paging_prev.textContent = "Previous";\n
paging_prev.setAttribute("data-i18n", "subheader-previous");\n
paging_prev.href = url_list[0];\n paging_prev.href = url_list[0];\n
paging_info.className = "ui-btn ui-disabled";\n paging_info.className = "ui-btn ui-disabled";\n
if ((begin_from === 0) && (counter === 0)) {\n if ((begin_from === 0) && (counter === 0)) {\n
paging_info.textContent = "No records";\n paging_info.textContent = "No records";\n
paging_info.setAttribute("data-i18n", "listbox-no-records");\n
} else if ((dataset.data.rows.length <= lines) && (begin_from === 0)) {\n } else if ((dataset.data.rows.length <= lines) && (begin_from === 0)) {\n
paging_info.textContent = counter + " record(s)";\n paging_info.setAttribute("data-i18n", "[last]listbox-records");\n
paging_info.appendChild(document.createTextNode(counter));\n
paging_info.appendChild(document.createTextNode("Record(s)"));\n
} else {\n } else {\n
paging_info.textContent = "Records " + (((begin_from + lines) / lines - 1) * lines + 1) + " to " + (((begin_from + lines) / lines - 1) * lines + counter);\n paging_info.setAttribute("data-i18n", "[node]listbox-records");\n
paging_info.appendChild(document.createTextNode("Records "));\n
paging_info.appendChild(document.createTextNode((((begin_from + lines) / lines - 1) * lines + 1) + " - " + (((begin_from + lines) / lines - 1) * lines + counter)));\n
}\n }\n
// paging_info.textContent = "Page " + ((begin_from + lines) / lines);\n // paging_info.textContent = "Page " + ((begin_from + lines) / lines);\n
paging_next.className = "ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child";\n paging_next.className = "ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child";\n
paging_next.textContent = "Next";\n paging_next.textContent = "Next";\n
paging_next.setAttribute("data-i18n", "subheader-next");\n
paging_next.href = url_list[1];\n paging_next.href = url_list[1];\n
\n \n
if (begin_from === 0) {\n if (begin_from === 0) {\n
...@@ -316,6 +325,10 @@ ...@@ -316,6 +325,10 @@
\n \n
table.appendChild(fragment);\n table.appendChild(fragment);\n
\n \n
return gadget.translateElementList(gadget.props.element);\n
})\n
.push(function () {\n
return gadget;\n
});\n });\n
});\n });\n
\n \n
...@@ -442,7 +455,7 @@ ...@@ -442,7 +455,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>super_sven</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -456,7 +469,7 @@ ...@@ -456,7 +469,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>939.5358.33203.30173</string> </value> <value> <string>939.51159.64219.13858</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -474,8 +487,8 @@ ...@@ -474,8 +487,8 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1416588079.38</float> <float>1419255611.6</float>
<string>UTC</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
</object> </object>
......
...@@ -127,11 +127,11 @@ ...@@ -127,11 +127,11 @@
<div class="ui-field-contain">\n <div class="ui-field-contain">\n
<div class="ui-input-text ui-body-{{widget_theme}} ui-corner-all ui-shadow-inset ui-input-has-clear {{widget_status_class}}">\n <div class="ui-input-text ui-body-{{widget_theme}} ui-corner-all ui-shadow-inset ui-input-has-clear {{widget_status_class}}">\n
<input type="text" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}} />\n <input type="text" data-enhanced="true" value="{{widget_value}}" name="search" {{widget_status_attribute}} />\n
<div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext">\n <div class="ui-btn ui-input-clear ui-input-btn ui-corner-all ui-icon-search ui-btn-icon-notext" data-i18n="[node]header-submit">\n
Submit<input data-enhanced="true" type="submit" value="Submit" {{widget_status_attribute}} />\n Submit<input data-enhanced="true" type="submit" data-i18n="[value]header-submit" value="Submit" {{widget_status_attribute}} />\n
</div>\n </div>\n
</div>\n </div>\n
<a href="#" class="ui-btn ui-btn-{{widget_theme}} ui-btn-icon-notext ui-icon-filter ui-override-theme ui-disabled">Filters</a>\n <a href="#" data-i18n="header-filter" class="ui-btn ui-btn-{{widget_theme}} ui-btn-icon-notext ui-icon-filter ui-override-theme ui-disabled">Filters</a>\n
</div>\n </div>\n
</div>\n </div>\n
</form>\n </form>\n
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>sven</string> </value> <value> <string>super_sven</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>938.25792.30699.44322</string> </value> <value> <string>939.43978.9403.31744</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1413879096.17</float> <float>1419256755.64</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