BUGFIX: Wrong plural form in modal of coding contract (#1939)

This commit is contained in:
catloversg
2025-02-02 12:42:56 +07:00
committed by GitHub
parent 1cc0288cd8
commit 67aff2a6a0
9 changed files with 37 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ import { EventEmitter } from "../../utils/EventEmitter";
import Typography from "@mui/material/Typography";
import TextField from "@mui/material/TextField";
import Button from "@mui/material/Button";
import { pluralize } from "../../utils/I18nUtils";
interface CodingContractProps {
c: CodingContract;
@@ -63,8 +64,9 @@ export function CodingContractModal(): React.ReactElement {
<Modal open={contract !== null} onClose={close}>
<CopyableText variant="h4" value={contract.c.type} />
<Typography>
You are attempting to solve a Coding Contract. You have {contract.c.getMaxNumTries() - contract.c.tries} tries
remaining, after which the contract will self-destruct.
You are attempting to solve a Coding Contract. You have{" "}
{pluralize(contract.c.getMaxNumTries() - contract.c.tries, "try", "tries")} remaining, after which the contract
will self-destruct.
</Typography>
<br />
<Typography>{description}</Typography>