Skip to content

Commit 871290d

Browse files
committed
Fixing the issue (#486) with the wording of relative time after a deadline.
1 parent 3d208f7 commit 871290d

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/components/Solutions/SolutionStatus/SolutionStatus.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import ImmutablePropTypes from 'react-immutable-proptypes';
44
import { Table, Modal, OverlayTrigger, Tooltip } from 'react-bootstrap';
5-
import { FormattedMessage, FormattedNumber, FormattedRelativeTime } from 'react-intl';
5+
import { FormattedMessage, FormattedNumber } from 'react-intl';
66
import { Link } from 'react-router-dom';
77
import classnames from 'classnames';
88
import { defaultMemoize } from 'reselect';
9+
import moment from 'moment';
910

1011
import EditSolutionNoteForm from '../../forms/EditSolutionNoteForm';
1112
import Box from '../../widgets/Box';
@@ -239,13 +240,8 @@ class SolutionStatus extends Component {
239240
<>
240241
<span className="px-1"> </span>
241242
<small className="text-muted">
242-
(<FormattedMessage id="app.solution.deadlineWasShort" defaultMessage="deadline was" />{' '}
243-
<FormattedRelativeTime
244-
value={firstDeadline - submittedAt}
245-
numeric="auto"
246-
updateIntervalInSeconds={1000000}
247-
/>
248-
)
243+
({moment.duration(firstDeadline - submittedAt, 'seconds').humanize()}{' '}
244+
<FormattedMessage id="app.solution.afterDeadline" defaultMessage="after the deadline" />)
249245
</small>
250246
</>
251247
)}

src/locales/cs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,10 +1693,10 @@
16931693
"app.solution.actions.review.reopen": "Znovu otevřít revizi",
16941694
"app.solution.actions.revokeAccept": "Odakceptovat",
16951695
"app.solution.actions.revokeAcceptLong": "Zrušit akceptaci",
1696+
"app.solution.afterDeadline": "po termínu",
16961697
"app.solution.allSolutions": "všechna řešení",
16971698
"app.solution.anotherAcceptedWarning": "Jiné řešení již bylo označeno jako akceptované. Body tohoto řešení nejsou bráný v potaz.",
16981699
"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).",
1699-
"app.solution.deadlineWasShort": "termín byl",
17001700
"app.solution.editNoteModalTitle": "Upravit poznámku řešení",
17011701
"app.solution.emptyNote": "prázdná",
17021702
"app.solution.environment": "Použitý jazyk:",

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,10 +1693,10 @@
16931693
"app.solution.actions.review.reopen": "Reopen Review",
16941694
"app.solution.actions.revokeAccept": "Revoke",
16951695
"app.solution.actions.revokeAcceptLong": "Revoke as Final",
1696+
"app.solution.afterDeadline": "after the deadline",
16961697
"app.solution.allSolutions": "all solutions",
16971698
"app.solution.anotherAcceptedWarning": "Another solution has been marked as accepted. Points of this solution are not taken into account.",
16981699
"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).",
1699-
"app.solution.deadlineWasShort": "deadline was",
17001700
"app.solution.editNoteModalTitle": "Edit Solution Note",
17011701
"app.solution.emptyNote": "empty",
17021702
"app.solution.environment": "Used language:",

0 commit comments

Comments
 (0)