From 83afae39607ac3c567072c5892ae0b1fe4ac024f Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 4 Mar 2015 16:48:37 +0000 Subject: [PATCH] Fix some bugs causing missing translations in home --- etemplate/js/et2_widget_portlet.js | 4 +++- home/inc/class.home_favorite_portlet.inc.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_portlet.js b/etemplate/js/et2_widget_portlet.js index 98cb30df0f..6f5fbab9d3 100644 --- a/etemplate/js/et2_widget_portlet.js +++ b/etemplate/js/et2_widget_portlet.js @@ -108,7 +108,7 @@ var et2_portlet = et2_valueWidget.extend( this._super.apply(this, arguments); var self = this; - + // Create DOM nodes this.div = $j(document.createElement("div")) .addClass(this.options.class) @@ -185,6 +185,8 @@ var et2_portlet = et2_valueWidget.extend( for(var action_name in this.default_actions) { defaults[action_name] = this.default_actions[action_name]; + // Translate caption here, as translations aren't available earlier + defaults[action_name].caption = this.egw().lang(this.default_actions[action_name].caption); if(typeof this[action_name] == "function") { defaults[action_name].onExecute = jQuery.proxy(this[action_name],this); diff --git a/home/inc/class.home_favorite_portlet.inc.php b/home/inc/class.home_favorite_portlet.inc.php index 263cbc7133..d2d87fca70 100644 --- a/home/inc/class.home_favorite_portlet.inc.php +++ b/home/inc/class.home_favorite_portlet.inc.php @@ -100,6 +100,8 @@ class home_favorite_portlet extends home_portlet } } $this->nm_settings['columnselection_pref'] = "nextmatch-home.{$this->context['id']}"; + + translation::add_app($context['appname']); } public function exec($id = null, etemplate_new &$etemplate = null) {