Skip to content

Commit

Permalink
Update string arg names
Browse files Browse the repository at this point in the history
and "starts" -> "will start" for consistency
  • Loading branch information
kr-matthews committed Jan 21, 2025
1 parent 5144f92 commit 1dd30cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ function RegistrationStatus({ comp, isLoading }) {
content={
I18n.t(
'competitions.index.tooltips.registration.opens_in',
{ duration: DateTime.fromISO(comp.registration_open).toRelative(toRelativeOptions.default) },
{ relativeDate: DateTime.fromISO(comp.registration_open).toRelative(toRelativeOptions.default) },

Check failure on line 457 in app/webpacker/components/CompetitionsOverview/ListViewSection.js

View workflow job for this annotation

GitHub Actions / test

This line has a length of 109. Maximum allowed is 100.
)
}
position="top center"
Expand All @@ -470,7 +470,7 @@ function RegistrationStatus({ comp, isLoading }) {
content={
I18n.t(
'competitions.index.tooltips.registration.closed',
{ days: DateTime.fromISO(comp.start_date).toRelative(toRelativeOptions.roundUpAndAtBestDayPrecision) },
{ relativeDate: DateTime.fromISO(comp.start_date).toRelative(toRelativeOptions.roundUpAndAtBestDayPrecision) },

Check failure on line 473 in app/webpacker/components/CompetitionsOverview/ListViewSection.js

View workflow job for this annotation

GitHub Actions / test

This line has a length of 123. Maximum allowed is 100.
)
}
position="top center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const competingStatusIcon = (competingStatus) => {

const registrationStatusIconText = (competition) => {
if (competition.registration_status === 'not_yet_opened') {
return I18n.t('competitions.index.tooltips.registration.opens_in', { duration: DateTime.fromISO(competition.registration_open).toRelative(toRelativeOptions.default) });
return I18n.t('competitions.index.tooltips.registration.opens_in', { relativeDate: DateTime.fromISO(competition.registration_open).toRelative(toRelativeOptions.default) });
}
if (competition.registration_status === 'past') {
return I18n.t('competitions.index.tooltips.registration.closed', { days: DateTime.fromISO(competition.start_date).toRelative(toRelativeOptions.roundUpAndAtBestDayPrecision) });
return I18n.t('competitions.index.tooltips.registration.closed', { relativeDate: DateTime.fromISO(competition.start_date).toRelative(toRelativeOptions.roundUpAndAtBestDayPrecision) });
}
if (competition.registration_status === 'full') {
return I18n.t('competitions.index.tooltips.registration.full');
Expand Down
4 changes: 2 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1575,8 +1575,8 @@ en:
recent: "Last %{count} days"
#context: the registration status icon
registration:
opens_in: "Registration will open %{duration}."
closed: "Registration has closed. Competition starts %{days}."
opens_in: "Registration will open %{relativeDate}."
closed: "Registration has closed. Competition will start %{relativeDate}."
open: "Registration is open!"
full: "Competitor limit reached, new registrations will go to the waiting list."
no_more_comps: "No more competitions."
Expand Down

0 comments on commit 1dd30cb

Please sign in to comment.