diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2008-06-09 04:44:10 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2008-06-09 04:44:10 +0400 |
commit | bf0716bfb6ef4128973d5dd211dac02490ab86a5 (patch) | |
tree | 8993f7ee5ff9a0dc7cb59a963ab85f93c23d7014 /plugins/VisitorInterest/API.php | |
parent | 07b25eca5f81d6d08c768949931c387855ae3e08 (diff) |
- adding 7 new translations: german, spanish, italian, russian, ukranian, catalan, dutch
- translations fallback to english by default (customizable in config file)
- adding a few strings that weren't translatable before
- 'translationAvailable' plugin information entry is now optional (defaults to false)
refs #251
git-svn-id: http://dev.piwik.org/svn/trunk@518 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/VisitorInterest/API.php')
-rw-r--r-- | plugins/VisitorInterest/API.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php index 157ebdc3b4..3a662aae01 100644 --- a/plugins/VisitorInterest/API.php +++ b/plugins/VisitorInterest/API.php @@ -53,7 +53,6 @@ class Piwik_VisitorInterest_API extends Piwik_Apiable } } -//TODO i18n function Piwik_getDurationLabel($label) { if(($pos = strpos($label,'-')) !== false) @@ -63,19 +62,22 @@ function Piwik_getDurationLabel($label) if($min == 0 || $min == 30) { - return $min.'-'.$max.'s'; + $XYSeconds = Piwik_Translate('VisitorInterest_BetweenXYSeconds'); + return sprintf($XYSeconds, $min, $max); } else { $min = $min / 60; $max = $max / 60; - return $min.'-'.$max.' min'; + $XYMin = Piwik_Translate('VisitorInterest_BetweenXYMinutes'); + return sprintf($XYMin, $min, $max); } } else { $time = intval($label) / 60; - return urlencode('+').$time.' min'; + $plusXMin = Piwik_Translate('VisitorInterest_PlusXMin'); + return sprintf($plusXMin, urlencode('+').$time); } } @@ -100,8 +102,7 @@ function Piwik_getPageGapLabel($label) if($return == 1) { - return $return . " page"; + return Piwik_Translate('VisitorInterest_OnePage'); } - - return $return . " pages"; + return sprintf(Piwik_Translate('VisitorInterest_NPages'), $return); } |