summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-07-05 16:21:21 +0200
committerSimon Lejeune <sle@openerp.com>2016-07-05 17:48:33 +0200
commitb0a25e5b0ea129dda488674282ab8898d1b8f882 (patch)
treeb2e2ca03fc5bb2b4c836b09e26fc0c3b91b3e699 /addons/web/static/src/js/framework
parent95a391f815df48b76a459b524d1c14f6f4ee1cc5 (diff)
[FIX] web: translation: don't reset database on `set_bundle`
set_bundle is called twice (one time by the session, another time by the web_editor). As the `set_bundle` actually drop the dict of translations instead of updating it and as web_editor only load the terms of its module, depending on which call to `set_bundle` ends first result on having your translations or not. This commit update the database of translation instead of dropping it, which fixe the current issue (the dict of traductions empty of the traduction you really need) but another fix would be to remove the useless call by web_editor when launched in the backend (which is probably there because it was needed when the web_editor was only working in the website).
Diffstat (limited to 'addons/web/static/src/js/framework')
-rw-r--r--addons/web/static/src/js/framework/translation.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/addons/web/static/src/js/framework/translation.js b/addons/web/static/src/js/framework/translation.js
index 2b6e5a4cecc..e02553ad203 100644
--- a/addons/web/static/src/js/framework/translation.js
+++ b/addons/web/static/src/js/framework/translation.js
@@ -17,7 +17,6 @@ var TranslationDataBase = Class.extend(/** @lends instance.TranslationDataBase#
},
set_bundle: function(translation_bundle) {
var self = this;
- this.db = {};
this.multi_lang = translation_bundle.multi_lang
var modules = _.keys(translation_bundle.modules);
modules.sort();