Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements for "Lenght of Visits" view (patches included) #893

Closed
kurakin opened this issue Aug 1, 2009 · 2 comments
Closed

Minor improvements for "Lenght of Visits" view (patches included) #893

kurakin opened this issue Aug 1, 2009 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@kurakin
Copy link

kurakin commented Aug 1, 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
Copy link
Author

kurakin commented Aug 1, 2009

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

@robocoder
Copy link
Contributor

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

@kurakin kurakin added this to the Piwik 0.4.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants