From 8d062bfc2cdc63c2959338bf45683fae5e6f0f3a Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Thu, 12 Mar 2015 10:31:48 +0100 Subject: [PATCH] Piwik: Use plugin JS i18n --- piwik/indico_piwik/static/js/statistics.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/piwik/indico_piwik/static/js/statistics.js b/piwik/indico_piwik/static/js/statistics.js index 682f50c..ed181c5 100644 --- a/piwik/indico_piwik/static/js/statistics.js +++ b/piwik/indico_piwik/static/js/statistics.js @@ -1,4 +1,5 @@ $(function() { + var $t = $T.domain('piwik'); var treeDOMTarget = '#materialTree'; /** @@ -43,12 +44,12 @@ $(function() { showMarker:false, lineWidth: 1, color: '#CCCCCC', - label: $T('Total Hits') + label: $t.gettext('Total Hits') }, { showMarker:false, lineWidth: 1, color: '#0B63A5', - label: $T('Unique Hits') + label: $t.gettext('Unique Hits') }] }; @@ -168,7 +169,7 @@ $(function() { if (data.material.tree !== null) { draw_jqTree(data.material.tree); } else { - $(treeDOMTarget).html($T('No material found')); + $(treeDOMTarget).html($t.gettext('No material found')); } } }); @@ -215,7 +216,7 @@ $(function() { if (data.graphs[request.report] !== null) { graph_holder.attr('src', data.graphs[request.report]); } else { - var error = $('
').text($T("No graph data received")); + var error = $('
').text($t.gettext("No graph data received")); graph_holder.replaceWith(error); } }