Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2013-09-14 17:45:44 +0400
committersgiehl <stefan@piwik.org>2013-09-14 17:45:44 +0400
commit2fa88c207c1f626a933873feec27cc3089f7b610 (patch)
treea08e665e2b7a04b7a4690bb00bdcf7337ef758c7 /plugins
parent103f1a9be8b4f4af2deb5e2759024e6928f25583 (diff)
refs #4151 refacoted some more usages of _js hack
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/Annotations/templates/getEvolutionIcons.twig4
-rw-r--r--plugins/CoreHome/CoreHome.php1
-rw-r--r--plugins/CoreHome/javascripts/dataTable.js2
-rw-r--r--plugins/Dashboard/Dashboard.php3
-rw-r--r--plugins/Dashboard/javascripts/dashboard.js2
-rwxr-xr-xplugins/Dashboard/javascripts/dashboardWidget.js2
-rw-r--r--plugins/Dashboard/javascripts/widgetMenu.js2
-rw-r--r--plugins/Goals/Goals.php9
-rw-r--r--plugins/Goals/javascripts/goalsForm.js6
-rw-r--r--plugins/Live/Live.php3
-rw-r--r--plugins/Live/javascripts/visitorProfile.js6
-rw-r--r--plugins/Live/templates/getVisitorProfilePopup.twig4
-rw-r--r--plugins/SitesManager/SitesManager.php15
-rw-r--r--plugins/SitesManager/javascripts/SitesManager.js4
-rw-r--r--plugins/UserCountry/UserCountry.php7
-rwxr-xr-xplugins/UserCountry/javascripts/userCountry.js4
-rwxr-xr-xplugins/UserCountry/templates/adminIndex.twig2
-rw-r--r--plugins/UsersManager/UsersManager.php16
-rw-r--r--plugins/UsersManager/javascripts/usersManager.js2
19 files changed, 65 insertions, 29 deletions
diff --git a/plugins/Annotations/templates/getEvolutionIcons.twig b/plugins/Annotations/templates/getEvolutionIcons.twig
index 583d0573a7..e7d2df434c 100755
--- a/plugins/Annotations/templates/getEvolutionIcons.twig
+++ b/plugins/Annotations/templates/getEvolutionIcons.twig
@@ -3,10 +3,10 @@
{% set date=dateCountPair[0] %}
{% set counts=dateCountPair[1] %}
<span data-date="{{ date }}" data-count="{{ counts.count }}" data-starred="{{ counts.starred }}"
- {% if counts.count == 0 %}title="{{ 'Annotations_AddAnnotationsFor_js'|translate(date) }}"
+ {% if counts.count == 0 %}title="{{ 'Annotations_AddAnnotationsFor'|translate(date) }}"
{% elseif counts.count == 1 %}title="{{ 'Annotations_AnnotationOnDate'|translate(date,
counts.note)|raw }}{{ 'Annotations_ClickToEditOrAdd'|translate }}"
- {% else %}}title="{{ 'Annotations_ViewAndAddAnnotations_js'|translate(date) }}"{% endif %}>
+ {% else %}}title="{{ 'Annotations_ViewAndAddAnnotations'|translate(date) }}"{% endif %}>
<img src="plugins/Zeitgeist/images/{% if counts.starred > 0 %}yellow_marker.png{% else %}grey_marker.png{% endif %}" width="16" height="16"/>
</span>
{% endfor %}
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 062b638092..a1bd603fca 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -107,5 +107,6 @@ class CoreHome extends \Piwik\Plugin
$translationKeys[] = 'CoreHome_PageOf';
$translationKeys[] = 'CoreHome_FlattenDataTable';
$translationKeys[] = 'CoreHome_UnFlattenDataTable';
+ $translationKeys[] = 'Annotations_ViewAndAddAnnotations';
}
} \ No newline at end of file
diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js
index c9e64d42bc..30b1b7e421 100644
--- a/plugins/CoreHome/javascripts/dataTable.js
+++ b/plugins/CoreHome/javascripts/dataTable.js
@@ -584,7 +584,7 @@ dataTable.prototype =
$('.annotationView img', domElem)
.attr('title', _pk_translate('Annotations_IconDesc_js'));
- var viewAndAdd = _pk_translate('Annotations_ViewAndAddAnnotations_js'),
+ var viewAndAdd = _pk_translate('Annotations_ViewAndAddAnnotations'),
hideNotes = _pk_translate('Annotations_HideAnnotationsFor_js');
// change the tooltip of the previously clicked evolution icon (if any)
diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php
index 0ff0ba82bc..526807f059 100644
--- a/plugins/Dashboard/Dashboard.php
+++ b/plugins/Dashboard/Dashboard.php
@@ -281,6 +281,9 @@ class Dashboard extends \Piwik\Plugin
$translationKeys[] = 'Dashboard_WidgetPreview';
$translationKeys[] = 'Dashboard_Maximise';
$translationKeys[] = 'Dashboard_Minimise';
+ $translationKeys[] = 'Dashboard_LoadingWidget';
+ $translationKeys[] = 'Dashboard_WidgetNotFound';
+ $translationKeys[] = 'Dashboard_DashboardCopied';
$translationKeys[] = 'General_Close';
}
}
diff --git a/plugins/Dashboard/javascripts/dashboard.js b/plugins/Dashboard/javascripts/dashboard.js
index a8cb6865d6..17c1f2cfa5 100644
--- a/plugins/Dashboard/javascripts/dashboard.js
+++ b/plugins/Dashboard/javascripts/dashboard.js
@@ -190,7 +190,7 @@ function copyDashboardToUser() {
}, 'post');
ajaxRequest.setCallback(
function (id) {
- $('#alert').find('h2').text(_pk_translate('Dashboard_DashboardCopied_js'));
+ $('#alert').find('h2').text(_pk_translate('Dashboard_DashboardCopied'));
piwikHelper.modalConfirm('#alert', {});
}
);
diff --git a/plugins/Dashboard/javascripts/dashboardWidget.js b/plugins/Dashboard/javascripts/dashboardWidget.js
index a59ed325c4..be0f5e0be6 100755
--- a/plugins/Dashboard/javascripts/dashboardWidget.js
+++ b/plugins/Dashboard/javascripts/dashboardWidget.js
@@ -191,7 +191,7 @@
var widgetName = widgetsHelper.getWidgetNameFromUniqueId(uniqueId);
if (!widgetName) {
- widgetName = _pk_translate('Dashboard_WidgetNotFound_js');
+ widgetName = _pk_translate('Dashboard_WidgetNotFound');
}
var emptyWidgetContent = widgetsHelper.getEmptyWidgetHtml(uniqueId, widgetName);
diff --git a/plugins/Dashboard/javascripts/widgetMenu.js b/plugins/Dashboard/javascripts/widgetMenu.js
index c20b322264..4e842cddd2 100644
--- a/plugins/Dashboard/javascripts/widgetMenu.js
+++ b/plugins/Dashboard/javascripts/widgetMenu.js
@@ -114,7 +114,7 @@ widgetsHelper.getEmptyWidgetHtml = function (uniqueId, widgetName) {
'</div>' +
'<div class="widgetContent">' +
'<div class="widgetLoading">' +
- _pk_translate('Dashboard_LoadingWidget_js') +
+ _pk_translate('Dashboard_LoadingWidget') +
'</div>' +
'</div>' +
'</div>';
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index 43ef4b1717..7c0a9930db 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -100,6 +100,7 @@ class Goals extends \Piwik\Plugin
'SitesManager.deleteSite' => 'deleteSiteGoals',
'Goals.getReportsWithGoalMetrics' => 'getActualReportsWithGoalMetrics',
'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
return $hooks;
}
@@ -629,4 +630,12 @@ class Goals extends \Piwik\Plugin
return $result;
}
+
+
+ public function getClientSideTranslationKeys(&$translationKeys)
+ {
+ $translationKeys[] = 'Goals_AddGoal';
+ $translationKeys[] = 'Goals_UpdateGoal';
+ $translationKeys[] = 'Goals_DeleteGoalConfirm';
+ }
}
diff --git a/plugins/Goals/javascripts/goalsForm.js b/plugins/Goals/javascripts/goalsForm.js
index 354e061978..a3bc643119 100644
--- a/plugins/Goals/javascripts/goalsForm.js
+++ b/plugins/Goals/javascripts/goalsForm.js
@@ -146,7 +146,7 @@ function bindListGoalEdit() {
$('a[name=linkEditGoal]').click(function () {
var goalId = $(this).attr('id');
var goal = piwik.goals[goalId];
- initGoalForm("Goals.updateGoal", _pk_translate('Goals_UpdateGoal_js'), goal.name, goal.match_attribute, goal.pattern, goal.pattern_type, (goal.case_sensitive != '0'), goal.revenue, goal.allow_multiple, goalId);
+ initGoalForm("Goals.updateGoal", _pk_translate('Goals_UpdateGoal'), goal.name, goal.match_attribute, goal.pattern, goal.pattern_type, (goal.case_sensitive != '0'), goal.revenue, goal.allow_multiple, goalId);
showAddNewGoal();
return false;
});
@@ -155,7 +155,7 @@ function bindListGoalEdit() {
var goalId = $(this).attr('id');
var goal = piwik.goals[goalId];
- $('#confirm').find('h2').text(sprintf(_pk_translate('Goals_DeleteGoalConfirm_js'), '"' + goal.name + '"'));
+ $('#confirm').find('h2').text(sprintf(_pk_translate('Goals_DeleteGoalConfirm'), '"' + goal.name + '"'));
piwikHelper.modalConfirm('#confirm', {yes: function () {
ajaxDeleteGoal(goalId);
}});
@@ -168,6 +168,6 @@ function bindListGoalEdit() {
}
function initAndShowAddGoalForm() {
- initGoalForm('Goals.addGoal', _pk_translate('Goals_AddGoal_js'), '', 'url', '', 'contains', /*caseSensitive = */false, /*allowMultiple = */'0', '0');
+ initGoalForm('Goals.addGoal', _pk_translate('Goals_AddGoal'), '', 'url', '', 'contains', /*caseSensitive = */false, /*allowMultiple = */'0', '0');
return showAddNewGoal();
}
diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php
index b7bee31970..4f30172753 100644
--- a/plugins/Live/Live.php
+++ b/plugins/Live/Live.php
@@ -79,6 +79,9 @@ class Live extends \Piwik\Plugin
public function getClientSideTranslationKeys(&$translationKeys)
{
$translationKeys[] = "Live_VisitorProfile";
+ $translationKeys[] = "Live_NoMoreVisits";
+ $translationKeys[] = "Live_ShowMap";
+ $translationKeys[] = "Live_HideMap";
}
public function getReportDisplayProperties(&$properties)
diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js
index 6d5f5c5ed8..dbac72498a 100644
--- a/plugins/Live/javascripts/visitorProfile.js
+++ b/plugins/Live/javascripts/visitorProfile.js
@@ -149,12 +149,12 @@
}
$map.slideDown('slow');
- var newLabel = 'Live_HideMap_js';
+ var newLabel = 'Live_HideMap';
piwikHelper.lazyScrollTo($('.visitor-profile-location', $element)[0], 400);
} else { // hide the map if it is shown
$map.slideUp('slow');
- var newLabel = 'Live_ShowMap_js';
+ var newLabel = 'Live_ShowMap';
}
newLabel = _pk_translate(newLabel).replace(' ', '\xA0');
@@ -211,7 +211,7 @@
},
_showNoMoreVisitsSpan: function () {
- var noMoreSpan = $('<span/>').text(_pk_translate('Live_NoMoreVisits_js')).addClass('visitor-profile-no-visits');
+ var noMoreSpan = $('<span/>').text(_pk_translate('Live_NoMoreVisits')).addClass('visitor-profile-no-visits');
$('.visitor-profile-more-info', this.$element).html(noMoreSpan);
},
diff --git a/plugins/Live/templates/getVisitorProfilePopup.twig b/plugins/Live/templates/getVisitorProfilePopup.twig
index f1f58a0c27..50ea1c92c1 100644
--- a/plugins/Live/templates/getVisitorProfilePopup.twig
+++ b/plugins/Live/templates/getVisitorProfilePopup.twig
@@ -75,7 +75,7 @@
{% set entryCountry %}<img src="{{ entry.flag }}" title="{{ entry.prettyName }}"/>&nbsp;{{ entry.prettyName }}{% endset %}
{{- 'General_XFromY'|translate(entryVisits, entryCountry)|raw -}}{% if not loop.last %}, {% endif %}
{%- endfor %}
- <a class="visitor-profile-show-map" href="#" {% if userCountryMapUrl|default('') is empty %}style="display:none"{% endif %}>({{ 'Live_ShowMap_js'|translate|replace({' ': '&nbsp;'})|raw }})</a> <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/>
+ <a class="visitor-profile-show-map" href="#" {% if userCountryMapUrl|default('') is empty %}style="display:none"{% endif %}>({{ 'Live_ShowMap'|translate|replace({' ': '&nbsp;'})|raw }})</a> <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/>
</p>
<div class="visitor-profile-map" style="display:none" data-href="{{ userCountryMapUrl|default('') }}">
</div>
@@ -95,7 +95,7 @@
{% if visitorData.lastVisits.getRowsCount() >= constant("Piwik\\Plugins\\Live\\API::VISITOR_PROFILE_MAX_VISITS_TO_SHOW") %}
<a href="#">{{ 'Live_LoadMoreVisits'|translate }}</a> <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/>
{% else %}
- <span class="visitor-profile-no-visits">{{ 'Live_NoMoreVisits_js'|translate }}</span>
+ <span class="visitor-profile-no-visits">{{ 'Live_NoMoreVisits'|translate }}</span>
{% endif %}
</div>
</div>
diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php
index 9e8c0abd05..b16d679375 100644
--- a/plugins/SitesManager/SitesManager.php
+++ b/plugins/SitesManager/SitesManager.php
@@ -28,10 +28,11 @@ class SitesManager extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'AssetManager.getJsFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'AdminMenu.add' => 'addMenu',
- 'Common.fetchWebsiteAttributes' => 'recordWebsiteDataInCache',
+ 'AssetManager.getJsFiles' => 'getJsFiles',
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'AdminMenu.add' => 'addMenu',
+ 'Common.fetchWebsiteAttributes' => 'recordWebsiteDataInCache',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
);
}
@@ -206,4 +207,10 @@ class SitesManager extends \Piwik\Plugin
}
return $hosts;
}
+
+ public function getClientSideTranslationKeys(&$translationKeys)
+ {
+ $translationKeys[] = "SitesManager_OnlyOneSiteAtTime";
+ $translationKeys[] = "SitesManager_DeleteConfirm";
+ }
}
diff --git a/plugins/SitesManager/javascripts/SitesManager.js b/plugins/SitesManager/javascripts/SitesManager.js
index e3bcd8c516..b783b764c3 100644
--- a/plugins/SitesManager/javascripts/SitesManager.js
+++ b/plugins/SitesManager/javascripts/SitesManager.js
@@ -205,7 +205,7 @@ function SitesManager(_timezones, _currencies, _defaultTimezone, _defaultCurrenc
var nameToDelete = $(this).parent().parent().find('input#siteName').val() || $(this).parent().parent().find('td#siteName').html();
var idsiteToDelete = $(this).parent().parent().find('#idSite').html();
- $('#confirm').find('h2').text(sprintf(_pk_translate('SitesManager_DeleteConfirm_js'), '"' + nameToDelete + '" (idSite = ' + idsiteToDelete + ')'));
+ $('#confirm').find('h2').text(sprintf(_pk_translate('SitesManager_DeleteConfirm'), '"' + nameToDelete + '" (idSite = ' + idsiteToDelete + ')'));
piwikHelper.modalConfirm('#confirm', {yes: function () {
sendDeleteSiteAJAX(idsiteToDelete);
}});
@@ -219,7 +219,7 @@ function SitesManager(_timezones, _currencies, _defaultTimezone, _defaultCurrenc
var idRow = $(this).attr('id');
if (alreadyEdited[idRow] == 1) return;
if (siteBeingEdited) {
- $('#alert').find('h2').text(sprintf(_pk_translate('SitesManager_OnlyOneSiteAtTime_js'), '"' + $("<div/>").html(siteBeingEditedName).text() + '"'));
+ $('#alert').find('h2').text(sprintf(_pk_translate('SitesManager_OnlyOneSiteAtTime'), '"' + $("<div/>").html(siteBeingEditedName).text() + '"'));
piwikHelper.modalConfirm('#alert', {});
return;
}
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index a6a850542c..2e071cdd02 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -51,6 +51,7 @@ class UserCountry extends \Piwik\Plugin
'Tracker.getVisitorLocation' => 'getVisitorLocation',
'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
);
return $hooks;
}
@@ -404,4 +405,10 @@ class UserCountry extends \Piwik\Plugin
&& $provider->isAvailable() === true
&& $provider->isWorking() === true;
}
+
+ public function getClientSideTranslationKeys(&$translationKeys)
+ {
+ $translationKeys[] = "UserCountry_FatalErrorDuringDownload";
+ $translationKeys[] = "UserCountry_SetupAutomaticUpdatesOfGeoIP";
+ }
}
diff --git a/plugins/UserCountry/javascripts/userCountry.js b/plugins/UserCountry/javascripts/userCountry.js
index 572dd51aa6..cbafd5bd8e 100755
--- a/plugins/UserCountry/javascripts/userCountry.js
+++ b/plugins/UserCountry/javascripts/userCountry.js
@@ -96,7 +96,7 @@ $(document).ready(function () {
}
});
ajaxRequest.setErrorCallback(function () {
- callback({error: _pk_translate('UserCountry_FatalErrorDuringDownload_js')});
+ callback({error: _pk_translate('UserCountry_FatalErrorDuringDownload')});
});
ajaxRequest.send(false);
};
@@ -132,7 +132,7 @@ $(document).ready(function () {
$('body')
.on('click', '#start-automatic-update-geoip', function () {
$('#geoipdb-screen1').hide("slide", {direction: "left"}, 800, function () {
- $('#geoip-db-mangement').text(_pk_translate('UserCountry_SetupAutomaticUpdatesOfGeoIP_js'));
+ $('#geoip-db-mangement').text(_pk_translate('UserCountry_SetupAutomaticUpdatesOfGeoIP'));
$('#geoipdb-update-info').fadeIn(1000);
});
})
diff --git a/plugins/UserCountry/templates/adminIndex.twig b/plugins/UserCountry/templates/adminIndex.twig
index fd9d0cbe35..d3f93db18a 100755
--- a/plugins/UserCountry/templates/adminIndex.twig
+++ b/plugins/UserCountry/templates/adminIndex.twig
@@ -98,7 +98,7 @@
{% if not geoIPDatabasesInstalled %}
<h2 id="geoip-db-mangement">{{ 'UserCountry_GeoIPDatabases'|translate }}</h2>
{% else %}
- <h2 id="geoip-db-mangement">{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP_js'|translate }}</h2>
+ <h2 id="geoip-db-mangement">{{ 'UserCountry_SetupAutomaticUpdatesOfGeoIP'|translate }}</h2>
{% endif %}
{% if showGeoIPUpdateSection %}
diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php
index 1b58ee3626..1591801c39 100644
--- a/plugins/UsersManager/UsersManager.php
+++ b/plugins/UsersManager/UsersManager.php
@@ -31,11 +31,12 @@ class UsersManager extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'AdminMenu.add' => 'addMenu',
- 'AssetManager.getJsFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'SitesManager.deleteSite' => 'deleteSite',
- 'Common.fetchWebsiteAttributes' => 'recordAdminUsersInCache',
+ 'AdminMenu.add' => 'addMenu',
+ 'AssetManager.getJsFiles' => 'getJsFiles',
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'SitesManager.deleteSite' => 'deleteSite',
+ 'Common.fetchWebsiteAttributes' => 'recordAdminUsersInCache',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
);
}
@@ -133,4 +134,9 @@ class UsersManager extends \Piwik\Plugin
// to change how the root pwd is saved in the config file
return md5($password);
}
+
+ public function getClientSideTranslationKeys(&$translationKeys)
+ {
+ $translationKeys[] = "UsersManager_DeleteConfirm";
+ }
}
diff --git a/plugins/UsersManager/javascripts/usersManager.js b/plugins/UsersManager/javascripts/usersManager.js
index e9b76a66b6..dbca1e3470 100644
--- a/plugins/UsersManager/javascripts/usersManager.js
+++ b/plugins/UsersManager/javascripts/usersManager.js
@@ -196,7 +196,7 @@ $(document).ready(function () {
piwikHelper.hideAjaxError();
var idRow = $(this).attr('id');
var loginToDelete = $(this).parent().parent().find('#userLogin').html();
- $('#confirmUserRemove').find('h2').text(sprintf(_pk_translate('UsersManager_DeleteConfirm_js'), '"' + loginToDelete + '"'));
+ $('#confirmUserRemove').find('h2').text(sprintf(_pk_translate('UsersManager_DeleteConfirm'), '"' + loginToDelete + '"'));
piwikHelper.modalConfirm('#confirmUserRemove', {yes: function () { sendDeleteUserAJAX(loginToDelete); }});
}
);