-
Notifications
You must be signed in to change notification settings - Fork 186
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
Improve/fix registration status icon text #10527
base: main
Are you sure you want to change the base?
Improve/fix registration status icon text #10527
Conversation
Actually these strings are also used in the 'all competitions' page (both the old and new UI), so this PR just shifts the extra 'in' problem. However, that page is correctly translating the 'days' message. So we probably want a consistent approach between the two - using luxon in both (with correct locale), or explicitly calculating the number of days and directly translating that (note this never would show "1 month", it's always days). For the former approach, I'm not sure how to make those changes in ruby, so someone else would have to pick this up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments about locale handling
app/webpacker/components/MyCompetitions/UpcomingCompetitionTable.jsx
Outdated
Show resolved
Hide resolved
app/webpacker/components/MyCompetitions/UpcomingCompetitionTable.jsx
Outdated
Show resolved
Hide resolved
About the handling of However, for most languages there's a notable difference because of grammar. In German for example, if you just enumerate the time units in a "raw" fashion, it's So I personally feel like it's best to let the Luxon library handle the "in" and "ago" and nasty declensions, and remove them from our translatable I18n keys like you did here. |
since the old entries are used (correctly) elsewhere
Another PR fixed the wrong locale issue. |
I would prefer that, if it's not too much to ask. When you get started and you realize you're wasting more than say ~45 minutes and you have to dig into the source code of some old. deprecated Ruby library, then stop what you're doing, post another comment here and I'll approve the additional transations 😉 |
The only ruby use is in the old competitions overview code. We recently switched over to the new react version. Can we just remove that old code now? I'm under the impression we won't be switching back to it again. |
Your wish be my command! #10674 |
and "starts" -> "will start" for consistency
I reverted to the existing strings and updated them. The old competitions overview ruby code will be wrong, but it doesn't matter since it's being removed and can't be seen in the meantime anyway. I also adjusted it so that for registration open it is precise (since it's a date time), but for competition start the precision is at most days (since it's a date, not a date time). |
This competition is in just over a month. Previously it also said "in 1 month".
This competition is tomorrow. Previously it would have said "in 2 hours".
Unfortunately Luxon doesn't seem to be using the locale, so that will need to be fixed if possible (in another PR). Also, other languages have the extra "in" too, it seems (and missing periods).