diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2009-04-06 10:46:59 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2009-04-06 10:46:59 +0400 |
commit | f2d9eeb063b2c43fba4e3d9d2e64c915226b1d3b (patch) | |
tree | dfeea1da48bddd1c5f0e24660e85ecafb207c74f /plugins/VisitorInterest/API.php | |
parent | 4c02aee97947b8e267f442816a66b9099913358d (diff) |
- make sure all "Others" type legends are correct on all graphs
- regression: 'label' should always be first column, prettier in API results
- translate some text in plugin + show how easy it is to translate a plugin
git-svn-id: http://dev.piwik.org/svn/trunk@1047 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/VisitorInterest/API.php')
-rw-r--r-- | plugins/VisitorInterest/API.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php index f12a704121..a7cf3718b4 100644 --- a/plugins/VisitorInterest/API.php +++ b/plugins/VisitorInterest/API.php @@ -11,7 +11,6 @@ /** - * * @package Piwik_VisitorInterest */ class Piwik_VisitorInterest_API @@ -73,12 +72,13 @@ function Piwik_getDurationLabel($label) return sprintf($XYMin, $min, $max); } } - else + if(!is_numeric($label)) { - $time = intval($label) / 60; - $plusXMin = Piwik_Translate('VisitorInterest_PlusXMin'); - return sprintf($plusXMin, '+' . $time); + return $label; } + $time = intval($label) / 60; + $plusXMin = Piwik_Translate('VisitorInterest_PlusXMin'); + return sprintf($plusXMin, '+' . $time); } function Piwik_getPageGapLabel($label) @@ -103,5 +103,6 @@ function Piwik_getPageGapLabel($label) { return Piwik_Translate('VisitorInterest_OnePage'); } + return sprintf(Piwik_Translate('VisitorInterest_NPages'), $return); } |