From de2d6e0b9a1323301f8e7f58f7e965130299fd43 Mon Sep 17 00:00:00 2001
From: Benaka Moorthi <benaka.moorthi@gmail.com>
Date: Thu, 12 Sep 2013 14:39:12 -0400
Subject: [PATCH] Refs #3089, display 'visitor profile' text in popup loading
 message when loading visitor profile.

---
 plugins/Live/Live.php                      | 8 +++++++-
 plugins/Live/javascripts/visitorProfile.js | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php
index e9c9d146ea..adebac8ba6 100644
--- a/plugins/Live/Live.php
+++ b/plugins/Live/Live.php
@@ -42,10 +42,11 @@ class Live extends \Piwik\Plugin
     {
         return array(
             'AssetManager.getJsFiles'                  => 'getJsFiles',
-            'AssetManager.getStylesheetFiles'                 => 'getStylesheetFiles',
+            'AssetManager.getStylesheetFiles'          => 'getStylesheetFiles',
             'WidgetsList.add'                          => 'addWidget',
             'Menu.add'                                 => 'addMenu',
             'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties',
+            'Translate.getClientSideTranslationKeys'   => 'getClientSideTranslationKeys'
         );
     }
 
@@ -79,6 +80,11 @@ class Live extends \Piwik\Plugin
         $properties['Live.getLastVisitsDetails'] = $this->getDisplayPropertiesForGetLastVisitsDetails();
     }
 
+    public function getClientSideTranslationKeys(&$translationKeys)
+    {
+        $translationKeys[] = "Live_VisitorProfile";
+    }
+
     private function getDisplayPropertiesForGetLastVisitsDetails()
     {
         return array(
diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js
index b7e53f8938..3f4dff1693 100644
--- a/plugins/Live/javascripts/visitorProfile.js
+++ b/plugins/Live/javascripts/visitorProfile.js
@@ -51,7 +51,7 @@
             url += '&showMap=0';
         }
         
-        Piwik_Popover.createPopupAndLoadUrl(url, '', 'visitor-profile-popup');
+        Piwik_Popover.createPopupAndLoadUrl(url, _pk_translate('Live_VisitorProfile'), 'visitor-profile-popup');
     };
 
     $.extend(VisitorProfileControl.prototype, UIControl.prototype, {
-- 
GitLab