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

German localisation: Avg. generation time shown in full seconds in row evolution graph #5330

Closed
anonymous-matomo-user opened this issue Jun 10, 2014 · 5 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

PIWIK 2.3.0, german localisation:
In the row evolution graphs the avg. generation time is displayed rounded to full seconds instead of rounded to two decimal places.

In the english language version this behaviour doesn't occur.

Keywords: row evolution view german localisation

@anonymous-matomo-user
Copy link
Author

Attachment:
piwik-row-evolution1.png

@mattab
Copy link
Member

mattab commented Jun 11, 2014

Thanks for the report!

I could reproduce also. the problem comes from the fact that in German numbers are: 0,8s and this results in the bug (in english they are displayed as 0.8s)

@anonymous-matomo-user anonymous-matomo-user added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 8, 2014
@sgiehl
Copy link
Member

sgiehl commented Aug 3, 2014

That one already works for me on the current demo.

@tsteur
Copy link
Member

tsteur commented Nov 10, 2014

Might be fixed in #6435. Please note even if it seems to be fixed on the current demo it could be still broken depending on which locale Piwik uses to track and archive data.

I just tried to reproduce on demo and it still shows the data in full seconds instead of floats when using German language... I'll have a quick look

tsteur added a commit that referenced this issue Nov 10, 2014
…s used or another locale that uses a comma instead of dot to separate decimal
@tsteur
Copy link
Member

tsteur commented Nov 10, 2014

I have a fix for this that I will merge as soon as the tests pass. It will now output actual float values but it will use a dot instead of a comma to separate the decimal part which is wrong. I cannot really fix this currently as we need a lib to format numbers in JavaScript depending on the users language/country etc. We should fix this in #6620 and pick a lib there. It shows once more how important this issue is.

I cannot format the number in PHP (I tried it) as it will be converted to float in JavaScript again: parseFloat('0,34') results in 0 as it is not a valid float.

@tsteur tsteur self-assigned this Nov 10, 2014
@tsteur tsteur modified the milestones: Piwik 2.9.0, Short term Nov 10, 2014
@tsteur tsteur closed this as completed Nov 10, 2014
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

4 participants