isaozler / grafana-shift-selector

The shift selector allows you to adjust the time range of your grafana dashboard to one specific shift or a range of shifts.
Apache License 2.0
6 stars 6 forks source link

Suggestion: Add german labels for icon mapping #14

Closed Ogoku closed 1 year ago

Ogoku commented 1 year ago

Hi Isa,

I realy appreciate this plugin. It is a wounderfull addition.

I was trying to debug issue #8 and came across another problem. We named our shifts Früh, Spät and Nacht. Unfortunately, just one icon was displayed on the night shift button. The reason for this is that in ShiftSelector.tsx on line 174 the function buttonTypes returns "undefined".

Suggestion: Add the german labels to utils.ts like this:

const mapping: any = { 'sunset-down': ['afternoon', 'middag', 'früh'], sunny: ['morning', 'morgen', 'day', 'spät'], night: ['night', 'nacht'], }

Looking forward for an update

isaozler commented 1 year ago

Thanks, @Ogok. Glad it helps. The localization for the icons is undoubtedly doable. I will publish it along with the override bug you mentioned. That one is a bit harder to tackle, but I will update the tickets as soon as they are ready to go.