stats icon indicating copy to clipboard operation
stats copied to clipboard

Localize timeseries tooltips

Open yuzawa-san opened this issue 5 months ago • 7 comments

I found the tooltips were not localized, so I formatted the date/time in the user's locale.

example: for locale en_US image

yuzawa-san avatar Jul 23 '25 12:07 yuzawa-san

LGTM, thx

exelban avatar Jul 23 '25 16:07 exelban

@yuzawa-san no monospaced font, it causes crashes on some macs

exelban avatar Jul 25 '25 17:07 exelban

i updated it.

do you know which version(s) it is an issue? i think this app could benefit nicely from monospaced digit system font being used more widely especially given how many digits we display. would it be worthwhile to add (not in this PR) some sort of polyfill like this

extension NSFont {
func safeMonospacedDigitSystemFont(... ){
 if #available(macOS 13.0, *)  {
   return NSFont.monospacedDigitSystemFont(...)
 } else {
  return NSFont.SystemFont(...)
 }
 }
}

i can make an issue and/or give it a try if you want

yuzawa-san avatar Jul 25 '25 20:07 yuzawa-san

no monospaced font. I was ready to merge that, but I have noticed that you make a lot of unnecessary changes. What is for? Im pretty sure that static width was for some reason since there was some problem with dynamic width.

It's a PR for localize timeseries tooltips, so please make sure it's only one change.

exelban avatar Aug 03 '25 10:08 exelban

reverted back to the initial commit you were ready to approve

yuzawa-san avatar Aug 03 '25 12:08 yuzawa-san

this is all becoming too much trouble, so i propose https://github.com/exelban/stats/pull/2689 instead

yuzawa-san avatar Sep 01 '25 14:09 yuzawa-san

@exelban i have attempted to fix the jitter on this. the solution i came up with was to keep a max width of the localized date string. so it will converge to the longest value it encounters and hold onto it.

yuzawa-san avatar Nov 10 '25 01:11 yuzawa-san