-
Notifications
You must be signed in to change notification settings - Fork 104
Simplify all times shown to not use any words, just exact numbers #184
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
Conversation
5a219c5
to
514e2b5
Compare
So everything is hardcoded to English and we don't need to set a locale or having mixed-language phrases all over the place.
We don't need that anymore now that everything has been hardcoded to English.
56a4223
to
9d3d85a
Compare
@rosa, are you open to this being a config option? We actually found the English words a lot more useful than what it is now currently doing. When looking at "In Progress jobs", now there are just a bunch of date/times in UTC, and you no longer can easily see how long a job as been running for. Also we now find that the "Recurring tasks" tab is less helpful, as it is just displaying date/times in UTC, and now it is not easy to determine "how long ago" a job ran, and how long until it'll run again, etc. We actually liked that you could hover over the words and see the date/time if you needed. |
@matthewbjones yeah, that's a good point; we've been using this for a bit now in production, and I find myself also missing the words 😅 The problem is the annoyance with the locale, having to set it to English and then having to do ugly stuff to avoid crashing when English is not available 😅 I didn't like that code at all. I basically want a way to use the words helpers but force them to be in English without even bothering to check the locale 😆 This doesn't seem possible in Rails right now... but maybe we can do something around it... I think a config option for this is too heavy... let me think about it a bit more. |
@rosa Rails can be configured to fallback to another locale when translations are missing: https://guides.rubyonrails.org/v5.2.0/configuring.html#configuring-i18n So without forcing a locale (aka, reverting 56a4223), you can run Mission Control in a Rails app with non-English locale set as the default, and have the usual I'm just now trying to play around with the idea of the |
@rosa Unfortunately, I wasn't able to come up with a simple/elegant solution |
No worries @matthewbjones, and sorry I missed your last comment!
Yes! That was the first problem we had, because the UI would show mixed languages, English for the hardcoded parts, and whatever locale was set for the texts added by Rails when using the time helpers 😅 #136 . The example there was "enqueued 5 minuten ago". The solution for that was to set English as the locale for Mission Control, but then, that caused trouble for people who don't have English in their locale list: #156 😅 This is why I don't want to mess up with locales, what I'd like here is that the Rails time helpers would use always English words, like hours, minutes, seconds, etc. and not, say, horas, minutos, segundos, which would be all mixed with English words. I haven't spent enough time investigating if there's a way to do this. I had a quick look last week and it doesn't seem so. |
@matthewbjones, I think I finally came up with a good way to handle this and go back to the relative, in-words times: #217 |
@rosa amazing! Very exciting. |
So everything is hardcoded to English, and we don't need to set a locale or have mixed-language phrases all over the place. Arguably, having the more "human-friendly" times such as "10 minutes ago" was not that useful in the end, when you're trying to get the exact time a job was enqueued to compare it with another time and so on. I found myself hovering over these times super often, so in this way, we just simplify the whole thing.
This would fix the issue described in #156 and would avoid having to mess up with locales.