1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00
unleash.unleash/frontend/src/constants
Thomas Heartman 7cc3c32eb2
fix: date localizations for chart (#10581)
Adds date localization to the charts on the analytics page. In doing so,
I have extracted the default locales that we allow the user to set into
constants, so that we can reference it from other places. I have also
sorted the list and added my personal favorite format (ja) to it.

Because we have multiple charts on the analytics page, it felt weird
that only one chart should follow your preferred format. It also aligns
the existing charts' tooltip date format with the new one (`P` instead
of `PPP`).

In short: previously, the charts would show you only your system locale
(I think), which for me defaults to en-US, regardless of what setting
you'd set in your profile. Now we respect your setting as long as it's
one of the default ones.

Before (date formatting is en-US):
<img width="1444" height="1658" alt="image"
src="https://github.com/user-attachments/assets/99a893c7-efb6-4e55-b47c-9df66bf97636"
/>


After (date formatting is sv-SE):
<img width="1383" height="1653" alt="image"
src="https://github.com/user-attachments/assets/d408afd9-a8a7-46f3-8c13-9f7fde608cc4"
/>
2025-09-01 09:29:45 +00:00
..
apiErrors.ts
authTypes.ts
constraintId.ts delete legacy constraint accordion (#10110) 2025-06-11 12:22:55 +02:00
defaultLocales.ts fix: date localizations for chart (#10581) 2025-09-01 09:29:45 +00:00
environmentTypes.ts
featureToggleTypes.ts
links.ts
misc.ts
navigate.ts
operators.test.ts feat: Unleash v7 ESM migration (#9877) 2025-05-14 09:47:12 +02:00
operators.ts chore: make operator checking more ergonomic and type-ful (#9932) 2025-05-08 14:10:57 +02:00
roles.ts
statusCodes.ts
variantTypes.ts
weightTypes.ts