Skip to content

Commit

Permalink
Merge pull request #2042 from IntersectMBO/hotfix/2036-broken-transla…
Browse files Browse the repository at this point in the history
…tion-for-voting-power

[#2036] fix broken translation in DRep Details
  • Loading branch information
Ryun1 authored Sep 13, 2024
2 parents 3c7e87a + db52a89 commit b1dfe92
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ changes.
- Hide Delegate button in DRep list and details if user has already delegated to this DRep [Issue 1982](https://github.com/IntersectMBO/govtool/issues/1982)
- Fix condition for disabling voting on different GA types [Issue 2008](https://github.com/IntersectMBO/govtool/issues/2008)
- Fix incorrect copy (ex. github) to (e.g. github) [Issue 1748](https://github.com/IntersectMBO/govtool/issues/1748)
- Fix broken translation in DRep Details [Issue 2036](https://github.com/IntersectMBO/govtool/issues/2036)

### Changed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useNavigate } from "react-router-dom";
import { Trans } from "react-i18next";
import { Box, Chip } from "@mui/material";

import { Button } from "@atoms";
Expand Down Expand Up @@ -58,13 +59,18 @@ export const DRepDetailsCardHeader = ({
<Chip
color="primary"
label={
isMe
? isMyDrep
? t("dRepDirectory.myDelegationToYourself")
: t("dRepDirectory.meAsDRep")
: t("dRepDirectory.myDRep", {
ada: correctDRepDirectoryFormat(myVotingPower),
})
<Trans
i18nKey={
isMe
? isMyDrep
? "dRepDirectory.myDelegationToYourself"
: "dRepDirectory.meAsDRep"
: "dRepDirectory.myDRep"
}
values={{
ada: correctDRepDirectoryFormat(myVotingPower),
}}
/>
}
sx={{
boxShadow: (theme) => theme.shadows[2],
Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ export const en = {
meAsDRep: "This DRep ID is connected to your wallet",
myDelegation: "You have delegated <strong>₳ {{ada}}</strong> to:",
myDelegationToYourself:
"You have delegated <strong>₳ {{ada}}</strong> to yourself:",
myDRep: "You have delegated {{ada}} to this DRep.",
"You have delegated <strong>₳ {{ada}}</strong> to yourself",
myDRep: "You have delegated <strong>₳ {{ada}}</strong> to this DRep",
listTitle: "Find a DRep",
noConfidenceDefaultDescription:
"Select this to signal no confidence in the current constitutional committee by voting NO on every proposal and voting YES to no confidence proposals",
Expand Down

0 comments on commit b1dfe92

Please sign in to comment.