Closed Bug 857948 Opened 12 years ago Closed 12 years ago

[FHR] jquery.plot.js plugin has hardcoded month names

Categories

(Firefox Health Report Graveyard :: Web: Health Report, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pascalc, Assigned: espressive)

References

Details

https://github.com/mozilla/fhr-jelly/blame/master/js/jquery.flot.js#L2550 Maybe Replacing the month names by month numbers would work: monthNames = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; then displaying dates as: 22/04 instead of Apr 22
Pascal: wouldn't we then need to localize the date formats anyway? Although I suppose we could go all ISO on it and make the dates YYYY-MM-DD?
whatever doesn't expose English words is fine for me :)
we have now a date.lang file in each locales folder, it is converted from properties to .lang directly from Firefox source code. If you need them in another format for js, I can generate json files for example. That should cover most of our needs for dates in the graphs.
Component: General → about:healthreport
Product: Webtools → Firefox Health Report
Assignee: nobody → sneethling
I am wondering can we have the months in a properties style file like so: short_month_names = Jan,Feb,Mar,Apr.... full_month_names= January,February,March,April... The current format below does not play well with webl10n.js: ;Jan Dwe me acel ;Feb Dwe me aryo ;Mar Dwe me adek ;Apr Dwe me angwen Perhaps we can make it work but, it is not ideal.
Pascal, thoughts on the above?
Flags: needinfo?(pascalc)
sure, we could just copy the properties file from Firefox source code into out repositories. I can do that on Friday.
Flags: needinfo?(pascalc)
(In reply to Pascal Chevrel:pascalc from comment #6) > sure, we could just copy the properties file from Firefox source code into > out repositories. I can do that on Friday. Much appreciated Pascal
(In reply to Pascal Chevrel:pascalc from comment #6) > sure, we could just copy the properties file from Firefox source code into > out repositories. I can do that on Friday. Just ping this bug once it is done. Thanks again!
Files copied in r115824
Hi, any update on this? For what I understand of flot, it should be enough to add a localized monthNames array here instead of messing with the library code https://github.com/mozilla/fhr-jelly/blob/master/js/fhr.js#L101
So we have localized data into the folder, the only thing someone must do is to load the months into the script.
Yes, it is pretty simple. This is on my todo list for this week.
Any news on this one? Thanks
(In reply to Pascal Chevrel:pascalc from comment #14) > Any news on this one? Thanks Got distracted by some other projects and other PRs on FHR, will be back on this one next.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.