diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-09-14 04:14:41 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-09-14 04:14:41 +0400 |
commit | a62732648844e330e0e33a2a8ecc04642fdf2d5e (patch) | |
tree | 6a27d8e638ad9257f5c494c9b48322ebe70a13f1 /plugins | |
parent | cf279bc8aa095c849932182bd3eb1c60ed9f67a3 (diff) | |
parent | 55cbbec3d77b162103eb90e244d476404704d641 (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/CoreHome.php | 4 | ||||
-rw-r--r-- | plugins/CoreHome/javascripts/dataTable.js | 6 | ||||
-rw-r--r-- | plugins/Dashboard/Dashboard.php | 20 | ||||
-rw-r--r-- | plugins/Dashboard/javascripts/widgetMenu.js | 10 |
4 files changed, 27 insertions, 13 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index f6f1a5a3a3..062b638092 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -103,5 +103,9 @@ class CoreHome extends \Piwik\Plugin $translationKeys[] = 'CoreHome_ExcludeRowsWithLowPopulation'; $translationKeys[] = 'CoreHome_DataTableIncludeAggregateRows'; $translationKeys[] = 'CoreHome_DataTableExcludeAggregateRows'; + $translationKeys[] = 'CoreHome_Default'; + $translationKeys[] = 'CoreHome_PageOf'; + $translationKeys[] = 'CoreHome_FlattenDataTable'; + $translationKeys[] = 'CoreHome_UnFlattenDataTable'; } }
\ No newline at end of file diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 3bcae5609f..c9e64d42bc 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -469,7 +469,7 @@ dataTable.prototype = // only show this string if there is some rows in the datatable if (totalRows != 0) { - var str = sprintf(_pk_translate('CoreHome_PageOf_js'), offset + '-' + offsetEndDisp, totalRows); + var str = sprintf(_pk_translate('CoreHome_PageOf'), offset + '-' + offsetEndDisp, totalRows); $(this).text(str); } } @@ -963,7 +963,7 @@ dataTable.prototype = text = _pk_translate(text); if (text.indexOf('%s') > 0) { text = text.replace('%s', '<br /><span class="action">» '); - if (addDefault) text += ' (' + _pk_translate('CoreHome_Default_js') + ')'; + if (addDefault) text += ' (' + _pk_translate('CoreHome_Default') + ')'; text += '</span>'; } return text; @@ -1003,7 +1003,7 @@ dataTable.prototype = // handle flatten $('.dataTableFlatten', domElem) .each(function () { - setText(this, 'flat', 'CoreHome_UnFlattenDataTable_js', 'CoreHome_FlattenDataTable_js'); + setText(this, 'flat', 'CoreHome_UnFlattenDataTable', 'CoreHome_FlattenDataTable'); }) .click(generateClickCallback('flat')); diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php index 73a25ca60f..0ff0ba82bc 100644 --- a/plugins/Dashboard/Dashboard.php +++ b/plugins/Dashboard/Dashboard.php @@ -29,11 +29,12 @@ class Dashboard extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', - 'UsersManager.deleteUser' => 'deleteDashboardLayout', - 'Menu.add' => 'addMenus', - 'TopMenu.add' => 'addTopMenu', + 'AssetManager.getJsFiles' => 'getJsFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', + 'UsersManager.deleteUser' => 'deleteDashboardLayout', + 'Menu.add' => 'addMenus', + 'TopMenu.add' => 'addTopMenu', + 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys' ); } @@ -273,4 +274,13 @@ class Dashboard extends \Piwik\Plugin { Db::dropTables(Common::prefixTable('user_dashboard')); } + + public function getClientSideTranslationKeys(&$translationKeys) + { + $translationKeys[] = 'Dashboard_AddPreviewedWidget'; + $translationKeys[] = 'Dashboard_WidgetPreview'; + $translationKeys[] = 'Dashboard_Maximise'; + $translationKeys[] = 'Dashboard_Minimise'; + $translationKeys[] = 'General_Close'; + } } diff --git a/plugins/Dashboard/javascripts/widgetMenu.js b/plugins/Dashboard/javascripts/widgetMenu.js index 06d941b47d..c20b322264 100644 --- a/plugins/Dashboard/javascripts/widgetMenu.js +++ b/plugins/Dashboard/javascripts/widgetMenu.js @@ -99,13 +99,13 @@ widgetsHelper.getEmptyWidgetHtml = function (uniqueId, widgetName) { return '<div id="' + uniqueId + '" class="widget">' + '<div class="widgetTop">' + '<div class="button" id="close">' + - '<img src="plugins/Zeitgeist/images/close.png" title="' + _pk_translate('Dashboard_Close_js') + '" />' + + '<img src="plugins/Zeitgeist/images/close.png" title="' + _pk_translate('General_Close') + '" />' + '</div>' + '<div class="button" id="maximise">' + - '<img src="plugins/Zeitgeist/images/maximise.png" title="' + _pk_translate('Dashboard_Maximise_js') + '" />' + + '<img src="plugins/Zeitgeist/images/maximise.png" title="' + _pk_translate('Dashboard_Maximise') + '" />' + '</div>' + '<div class="button" id="minimise">' + - '<img src="plugins/Zeitgeist/images/minimise.png" title="' + _pk_translate('Dashboard_Minimise_js') + '" />' + + '<img src="plugins/Zeitgeist/images/minimise.png" title="' + _pk_translate('Dashboard_Minimise') + '" />' + '</div>' + '<div class="button" id="refresh">' + '<img src="plugins/Zeitgeist/images/refresh.png" title="' + _pk_translate('Dashboard_Refresh_js') + '" />' + @@ -309,8 +309,8 @@ widgetsHelper.getEmptyWidgetHtml = function (uniqueId, widgetName) { var emptyWidgetHtml = widgetsHelper.getEmptyWidgetHtml( widgetUniqueId, - '<div title="' + _pk_translate("Dashboard_AddPreviewedWidget_js") + '">' + - _pk_translate('Dashboard_WidgetPreview_js') + + '<div title="' + _pk_translate("Dashboard_AddPreviewedWidget") + '">' + + _pk_translate('Dashboard_WidgetPreview') + '</div>' ); previewElement.html(emptyWidgetHtml); |