Open thelooter opened 2 weeks ago
This is an interesting problem I may want to solve.
I probably should have mentioned that before, but I would to use dd/mm/yyy
notation
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 Soon
tag (that we use within the Security page) within the language field and added the Date format field with 5 of the most common date formats.
@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
I've being looking a tiny bit into this.
I can see with translations (locales) this should maybe be doable, where you can provide a format that works for that specific locale, so it's hard to if you don't have other languages yet. (Could of course add it to the english version, and then it's set up for any other locales)
If going for the dropdown with options no matter what locale you choose, then there needs to be a list of pre-defined formats (Maybe the options currently present in figma?)
It then comes down to two other things:
I can also see in the transaction lists, the date is already formatted nicely.
I can though see there is places where the date string is used as is, like here:
I'm assuming it's the last case where this really have an effect?
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