From f1fd144abb0a85c06c59f1d0e1115dec531bd74b Mon Sep 17 00:00:00 2001 From: Nicolas Widart Date: Sat, 16 Sep 2017 16:00:39 +0200 Subject: [PATCH] Get the translations from the window global --- Modules/Core/Assets/js/mixins/Translate.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/Core/Assets/js/mixins/Translate.js b/Modules/Core/Assets/js/mixins/Translate.js index da8ed69bd..6f0e51587 100644 --- a/Modules/Core/Assets/js/mixins/Translate.js +++ b/Modules/Core/Assets/js/mixins/Translate.js @@ -1,10 +1,15 @@ export default { - props: { - translations: {default: null} + data() { + return { + translations: {}, + }; }, methods: { translate(namespace, name) { return _.get(this.translations[namespace], name); } + }, + mounted() { + this.translations = window.translations; } }