Commit 224cd6da authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] WIP: Add translation

parent 78de106b
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
.declareAcquiredMethod("getUrlFor", "getUrlFor") .declareAcquiredMethod("getUrlFor", "getUrlFor")
.declareAcquiredMethod("jio_allDocs", "jio_allDocs") .declareAcquiredMethod("jio_allDocs", "jio_allDocs")
.declareAcquiredMethod("getSetting", "getSetting") .declareAcquiredMethod("getSetting", "getSetting")
.declareAcquiredMethod("translate", "translate")
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// declared methods // declared methods
...@@ -66,17 +67,23 @@ ...@@ -66,17 +67,23 @@
.push(function () { .push(function () {
return RSVP.all([ return RSVP.all([
gadget.getDeclaredGadget('form_list'), gadget.getDeclaredGadget('form_list'),
gadget.getSetting("portal_type") gadget.getSetting("portal_type"),
gadget.translate("Title"),
gadget.translate("Reference"),
gadget.translate("Language"),
gadget.translate("Description"),
gadget.translate("Version"),
gadget.translate("Modification Date")
]); ]);
}) })
.push(function (result) { .push(function (result) {
var column_list = [ var column_list = [
['title', 'Title'], ['title', result[2]],
['reference', 'Reference'], ['reference', result[3]],
['language', 'Language'], ['language', result[4]],
['description', 'Description'], ['description', result[5]],
['version', 'Version'], ['version', result[6]],
['modification_date', 'Modification Date'] ['modification_date', result[7]]
]; ];
return result[0].render({ return result[0].render({
erp5_document: { erp5_document: {
......
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>vincent</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.10686.10882.5973</string> </value> <value> <string>962.32993.33965.18807</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1503059476.75</float> <float>1506955473.7</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -10,6 +10,6 @@ return default_web_page.WebPage_viewAsWeb(mapping_dict={ ...@@ -10,6 +10,6 @@ return default_web_page.WebPage_viewAsWeb(mapping_dict={
"latest_version": web_section.getLayoutProperty("configuration_latest_version", default="development"), "latest_version": web_section.getLayoutProperty("configuration_latest_version", default="development"),
"latest_document_version": web_section.getLayoutProperty("configuration_latest_document_version", default=context.getWebSiteValue().getId() + "-dev"), "latest_document_version": web_section.getLayoutProperty("configuration_latest_document_version", default=context.getWebSiteValue().getId() + "-dev"),
"redirect_url": web_section.getLayoutProperty("configuration_redirect_url", default=""), "redirect_url": web_section.getLayoutProperty("configuration_redirect_url", default=""),
"cache_file": web_section.getLayoutProperty("configuration_cache_file", default=""), "cache_file": web_section.getLayoutProperty("configuration_manifest_url", default=""),
"application_name": web_section.getTitle(), "application_name": web_section.getTitle(),
}) })
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<string>my_configuration_content_security_policy</string> <string>my_configuration_content_security_policy</string>
<string>my_configuration_resource_base_url</string> <string>my_configuration_resource_base_url</string>
<string>my_configuration_x_frame_options</string> <string>my_configuration_x_frame_options</string>
<string>my_configuration_cache_file</string> <string>my_configuration_manifest_url</string>
<string>my_configuration_redirect_url</string> <string>my_configuration_redirect_url</string>
</list> </list>
</value> </value>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_configuration_cache_file</string> </value> <value> <string>my_configuration_manifest_url</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
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