-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow users to configure their locale and provide a default date format based on locale #909
Comments
This is an interesting problem I may want to solve. |
I probably should have mentioned that before, but I would to use |
I think @vsme had a good start to this in #889. While we cannot accept bulk translations right now, I think this would be a good opportunity for us to configure the ability for users to set their preferred locale. Since date formats are set once for locale, this would be a small enough scope for us to introduce without adding much overhead. The requirements should probably be something like:
I think we'll want to set the locale via the strategy outlined here: https://edgeguides.rubyonrails.org/i18n.html#setting-the-locale-from-user-preferences @justinfar do we have some designs for this that we could post on this issue? |
On it! |
Just added a page in the community file Here's how it's looking: I've basically just added a |
@justinfar looks good to me! This issue is up for grabs for anyone who wants to tackle it. Otherwise I'll circle back and knock it out after some of the investment portfolio work I'm doing. |
Another idea would be still activating the locale selection with a note next to it stating that it only applies to dates for now. This would already put the data in a model that can easily be applied to other things. That way you could gradually add more places to use it, like the date or the default suggested Currency But i dont know enough about the codebase to judge if this is a viable solution |
I could be very interested in trying to implement the date format selection and persisting it, as a first issue in this repo! If anyone else would like to do so as well, feel free since I'm not well versed in ruby, so it'll most likely take some time for me, and I respect others being faster :D |
@MagnusHJensen you're more than welcome to give this one a shot! To answer some of your questions:
Correct, no changes will be made to the data storage format. This is 100% a read concern.
Good point here. For the time being, it's okay if input formats don't respect the user's preferred date format. Long term, we will likely introduce a custom Stimulus powered date-picker to handle subtleties like this along with locales that browser native datepickers don't support very well.
Yep, and also for setting default formats for data imports. |
Any thoughts on localize currency format too? |
@imist the UI should be localizing currencies already. If you're not seeing that, would you mind sharing a screenshot of where it is incorrect so we can fix it? |
Currently, dates are presented as
mm/dd/yyyy
.This is not intuitive for many people, and has lead to multiple wrong entries for me.
Having the ability to configure how you want the date to be presented would be really helpful
The text was updated successfully, but these errors were encountered: