Skip to content

Commit

Permalink
Fixing the issue (#486) with the wording of relative time after a dea…
Browse files Browse the repository at this point in the history
…dline.
  • Loading branch information
krulis-martin committed Aug 22, 2023
1 parent 3d208f7 commit 871290d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/components/Solutions/SolutionStatus/SolutionStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { Table, Modal, OverlayTrigger, Tooltip } from 'react-bootstrap';
import { FormattedMessage, FormattedNumber, FormattedRelativeTime } from 'react-intl';
import { FormattedMessage, FormattedNumber } from 'react-intl';
import { Link } from 'react-router-dom';
import classnames from 'classnames';
import { defaultMemoize } from 'reselect';
import moment from 'moment';

import EditSolutionNoteForm from '../../forms/EditSolutionNoteForm';
import Box from '../../widgets/Box';
Expand Down Expand Up @@ -239,13 +240,8 @@ class SolutionStatus extends Component {
<>
<span className="px-1"> </span>
<small className="text-muted">
(<FormattedMessage id="app.solution.deadlineWasShort" defaultMessage="deadline was" />{' '}
<FormattedRelativeTime
value={firstDeadline - submittedAt}
numeric="auto"
updateIntervalInSeconds={1000000}
/>
)
({moment.duration(firstDeadline - submittedAt, 'seconds').humanize()}{' '}
<FormattedMessage id="app.solution.afterDeadline" defaultMessage="after the deadline" />)
</small>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1693,10 +1693,10 @@
"app.solution.actions.review.reopen": "Znovu otevřít revizi",
"app.solution.actions.revokeAccept": "Odakceptovat",
"app.solution.actions.revokeAcceptLong": "Zrušit akceptaci",
"app.solution.afterDeadline": "po termínu",
"app.solution.allSolutions": "všechna řešení",
"app.solution.anotherAcceptedWarning": "Jiné řešení již bylo označeno jako akceptované. Body tohoto řešení nejsou bráný v potaz.",
"app.solution.anotherBestWarning": "Jiné řešení je považováno za nejlepší (tzn. má více bodů nebo má stejně bodů a bylo odevzdáno později).",
"app.solution.deadlineWasShort": "termín byl",
"app.solution.editNoteModalTitle": "Upravit poznámku řešení",
"app.solution.emptyNote": "prázdná",
"app.solution.environment": "Použitý jazyk:",
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1693,10 +1693,10 @@
"app.solution.actions.review.reopen": "Reopen Review",
"app.solution.actions.revokeAccept": "Revoke",
"app.solution.actions.revokeAcceptLong": "Revoke as Final",
"app.solution.afterDeadline": "after the deadline",
"app.solution.allSolutions": "all solutions",
"app.solution.anotherAcceptedWarning": "Another solution has been marked as accepted. Points of this solution are not taken into account.",
"app.solution.anotherBestWarning": "Another solution is considered as the best (i.e., it has gained more points or it has the same points but it was submitted later).",
"app.solution.deadlineWasShort": "deadline was",
"app.solution.editNoteModalTitle": "Edit Solution Note",
"app.solution.emptyNote": "empty",
"app.solution.environment": "Used language:",
Expand Down

0 comments on commit 871290d

Please sign in to comment.