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

feat(web): add an option to change the date formats #7174

Merged
merged 20 commits into from Feb 22, 2024
Merged

Conversation

martabal
Copy link
Member

@martabal martabal commented Feb 18, 2024

Add an option to change the date formats.

All locales are stored in a json file. This seems to be the only way to get the list (see https://github.com/nextcloud/server/blob/c7ef27d066aea2406c8009bd1a49888d1610b889/resources/locales.json). Sorry if I forgot any.

Screenshots

2024-02-18.18-00-04.mp4

(my default locale is en-US)

@alextran1502
Copy link
Contributor

Maybe put it under "Date & Time" section instead of Appearance?

@michelheusschen
Copy link
Contributor

Browsers may not support all locales, have you tested what happens in that case? We also use $locale for formatting numbers besides date/time, maybe add that to the setting description. Other than that, looks good to me 👍

Copy link

cloudflare-pages bot commented Feb 18, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c039ebc
Status: ✅  Deploy successful!
Preview URL: https://635cf9d9.immich.pages.dev
Branch Preview URL: https://feat-user-locale.immich.pages.dev

View logs

@martabal
Copy link
Member Author

Maybe put it under "Date & Time" section instead of Appearance?

What dateTime section are you speaking about ? Do you want me to create a new section or rename it from "Local" to "Date and Time"?

@martabal martabal force-pushed the feat/user-locale branch 4 times, most recently from fc3b359 to c2282fc Compare February 18, 2024 15:37
@alextran1502
Copy link
Contributor

Maybe put it under "Date & Time" section instead of Appearance?

What dateTime section are you speaking about ? Do you want me to create a new section or rename it from "Local" to "Date and Time"?

Yes, I am thinking of a new accordion dedicated to date-time settings.

@martabal
Copy link
Member Author

Hmm, I don't know if it's a good idea to add a new one, there are already a lot. Maybe rename “Appearance” to “Customization”?

martabal and others added 4 commits February 22, 2024 09:25
Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com>
@jrasm91
Copy link
Contributor

jrasm91 commented Feb 22, 2024

I moved locales to a javascript object instead, so it has type information.

@jrasm91 jrasm91 enabled auto-merge (squash) February 22, 2024 14:26
@jrasm91 jrasm91 merged commit 01d6707 into main Feb 22, 2024
25 checks passed
@jrasm91 jrasm91 deleted the feat/user-locale branch February 22, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants