summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/coresetup.js20
-rw-r--r--addons/web/static/src/js/search.js4
-rw-r--r--addons/web/static/src/js/view_form.js4
-rw-r--r--addons/web/static/src/js/views.js2
-rw-r--r--addons/web/static/src/xml/base.xml10
5 files changed, 17 insertions, 23 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index ea160d6faee..d55408ebc83 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -57,7 +57,12 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
if(self.session_is_valid()) {
return deferred.pipe(function() { return self.load_modules(); });
}
- return deferred;
+ return $.when(
+ deferred,
+ self.rpc('/web/webclient/bootstrap_translations', {mods: instance._modules}).pipe(function(trans) {
+ instance.web._t.database.set_bundle(trans);
+ })
+ );
});
},
/**
@@ -537,13 +542,9 @@ instance.web.qweb.preprocess_node = function() {
if (translation && translation.value === 'off') {
return;
}
- var ts = _.str.trim(this.node.data);
- if (ts.length === 0) {
- return;
- }
- var tr = instance.web._t(ts);
- if (tr !== ts) {
- this.node.data = tr;
+ var match = /^(\s*)(.+?)(\s*)$/.exec(this.node.data);
+ if (match) {
+ this.node.data = match[1] + instance.web._t(match[2]) + match[3];
}
break;
case 1:
@@ -600,8 +601,7 @@ var messages_by_seconds = function() {
[120, _t("Don't leave yet,<br />it's still loading...")],
[300, _t("You may not believe it,<br />but the application is actually loading...")],
[420, _t("Take a minute to get a coffee,<br />because it's loading...")],
- [600, _t("It's loading...<br />By the way, did you tried the kitten mode?")],
- [3600, _t("Maybe you should consider pressing F5...")],
+ [3600, _t("Maybe you should consider reloading the application by pressing F5...")],
];
};
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 01bc0c76c87..71e955e80a6 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -1494,7 +1494,7 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
return $.when(facet_from(this, value));
}
assert(value.length <= 1,
- _("M2O search fields do not currently handle multiple default values"));
+ _t("M2O search fields do not currently handle multiple default values"));
// there are many cases of {search_default_$m2ofield: [id]}, need
// to handle this as if it were a single value.
value = value[0];
@@ -1578,7 +1578,7 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
$filter.unbind('click').click(function () {
self.view.query.reset([{
- category: _("Custom Filter"),
+ category: _t("Custom Filter"),
icon: 'M',
field: {
get_context: function () { return filter.context; },
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index bf6b869482b..1c32d5ef63e 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2081,7 +2081,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
var self = this;
var trans = new instance.web.DataSet(this, 'ir.translation');
return trans.call_button('translate_fields', [this.view.dataset.model, this.view.datarecord.id, this.name, this.view.dataset.get_context()]).then(function(r) {
- self.do_action(r.result);
+ self.do_action(r);
});
},
});
@@ -4282,7 +4282,7 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({
this.dataset.create_function = function(data, sup) {
var fct = self.options.create_function || sup;
return fct.call(this, data).then(function(r) {
- self.created_elements.push(r.result);
+ self.created_elements.push(r);
});
};
this.dataset.write_function = function(id, data, options, sup) {
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 2fff0e7b683..7b5fcc70289 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -1190,7 +1190,7 @@ instance.web.View = instance.web.Widget.extend({
var context = new instance.web.CompoundContext(dataset.get_context(), action_data.context || {});
var handler = function (r) {
- var action = r.result;
+ var action = r;
if (action && action.constructor == Object) {
var ncontext = new instance.web.CompoundContext(context);
if (record_id) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index ab4f81a1688..bf55db8d7c2 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -2,12 +2,6 @@
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
-<t t-name="ui.Header">
- <header>
- <t t-raw="__content__"/>
- </header>
-</t>
-
<t t-name="EmptyComponent">
<div></div>
</t>
@@ -413,7 +407,7 @@
<a class="oe_logo" href="#"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
<div class="oe_secondary_menus_container"/>
<div class="oe_footer">
- Powered by <a href="http://www.openerp.com" target="_blank"><span>Open</span>ERP</a>
+ Powered by <a href="http://www.openerp.com" target="_blank"><span>OpenERP</span></a>
</div>
</td>
<td class="oe_application">
@@ -1128,7 +1122,7 @@
<td>
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
- <t t-set="fileupload_style">width: 83px;</t>
+ <t t-set="fileupload_style" t-translation="off">width: 83px;</t>
<button class="oe_button oe_field_button" type="button">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
<span>Select</span>