@kurakin opened this Issue on August 1st 2009
  1. Since we use urldecode to safe decode labels, we need to use in labels "%2b" instead of "+" sign, because the last one urldecodes to regular space. See attached snapshot: "15 min" displayed, should be "15+ min". Simple patch:
diff -Ebur piwik-4.2.orig/plugins/VisitorInterest/API.php piwik-4.2/plugins/VisitorInterest/API.php
--- piwik-4.2.orig/plugins/VisitorInterest/API.php  2009-05-31 15:31:14 +0400
+++ piwik-4.2/plugins/VisitorInterest/API.php   2009-08-01 00:16:30 +0400
@@ -78,7 +78,7 @@
    }
    $time = intval($label) / 60;
    $plusXMin = Piwik_Translate('VisitorInterest_PlusXMin');
-   return sprintf($plusXMin, '+' . $time);
+   return sprintf($plusXMin, $time. urlencode('+'));
 }

 function Piwik_getPageGapLabel($label)
  1. Labels in "Lenght of Visits" contain extra spaces after '-' sign (see the same snapshot, one of them is selected). Patch for English:
diff -Ebur piwik-4.2.orig/lang/en.php piwik-4.2/lang/en.php
--- piwik-4.2.orig/lang/en.php  2009-07-03 04:20:31 +0400
+++ piwik-4.2/lang/en.php   2009-07-31 22:51:05 +0400
@@ -585,7 +585,7 @@
    'VisitorInterest_WidgetPages' => 'Pages per visit',
    'VisitorInterest_SubmenuFrequencyLoyalty' => 'Frequency & Loyalty',
    'VisitorInterest_PlusXMin' => '%s min',
-   'VisitorInterest_BetweenXYMinutes' => '%1s-%2s min',
+   'VisitorInterest_BetweenXYMinutes' => '%1s-%1s min',
    'VisitorInterest_OnePage' => '1 page',
    'VisitorInterest_NPages' => '%s pages',
    'VisitorInterest_BetweenXYSeconds' => '%1s-%2ss',

If you should accept this patch, I can prepare respective patches for other languages.

@kurakin commented on August 1st 2009

Attachment: Extra spaces and dissapeared "+" sign
snapshot121.png

@robocoder commented on August 1st 2009 Contributor

(In [1346]) fixes #893 - minor adjustments to labels; sent notification to translations (at) piwik.org

This Issue was closed on August 1st 2009
Powered by GitHub Issue Mirror