From 871290da912ced3757be83d08d56c8f9a018a87e Mon Sep 17 00:00:00 2001 From: Martin Krulis Date: Tue, 22 Aug 2023 11:34:03 +0200 Subject: [PATCH] Fixing the issue (#486) with the wording of relative time after a deadline. --- .../Solutions/SolutionStatus/SolutionStatus.js | 12 ++++-------- src/locales/cs.json | 2 +- src/locales/en.json | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/Solutions/SolutionStatus/SolutionStatus.js b/src/components/Solutions/SolutionStatus/SolutionStatus.js index 2f3f51f13..a43436a52 100644 --- a/src/components/Solutions/SolutionStatus/SolutionStatus.js +++ b/src/components/Solutions/SolutionStatus/SolutionStatus.js @@ -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'; @@ -239,13 +240,8 @@ class SolutionStatus extends Component { <> - ({' '} - - ) + ({moment.duration(firstDeadline - submittedAt, 'seconds').humanize()}{' '} + ) )} diff --git a/src/locales/cs.json b/src/locales/cs.json index 5b9535065..76ab040f7 100644 --- a/src/locales/cs.json +++ b/src/locales/cs.json @@ -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:", diff --git a/src/locales/en.json b/src/locales/en.json index ee16f69c3..2b14225fe 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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:",