Skip to content

Commit 23325b8

Browse files
refactor(leaderboard): apply intl to list aria-label
1 parent 5e26d49 commit 23325b8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/components/Leaderboard.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import Emoji from "./Emoji"
1414
import Link from "./Link"
1515

1616
import Translation from "./Translation"
17+
import { translateMessageId } from "../utils/translations"
18+
import { useIntl } from "react-intl"
1719

1820
const githubUrl = `https://github.com/`
1921

@@ -42,13 +44,18 @@ const Leaderboard: React.FC<IProps> = ({ content, limit = 100 }) => {
4244
}
4345
)
4446

47+
const intl = useIntl()
48+
4549
return (
4650
<List
4751
bgColor="background"
4852
boxShadow={colorModeStyles.listBoxShadow}
4953
w="100%"
5054
mb={8}
51-
aria-label="Bug hunting leaderboard"
55+
aria-label={translateMessageId(
56+
"page-upgrades-bug-bounty-leaderboard-list",
57+
intl
58+
)}
5259
>
5360
{content
5461
.filter((_, idx) => idx < limit)

src/intl/en/page-upgrades-get-involved-bug-bounty.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"page-upgrades-bug-bounty-hunting-li-3": "Employees and contractors of the Ethereum Foundation or client teams in scope of the bounty program may participate in the program only in the accrual of points and will not receive monetary rewards.",
2828
"page-upgrades-bug-bounty-hunting-li-4": "Ethereum bounty program considers a number of variables in determining rewards. Determinations of eligibility, score and all terms related to an award are at the sole and final discretion of the Ethereum Foundation bug bounty panel.",
2929
"page-upgrades-bug-bounty-leaderboard": "See full leaderboards",
30+
"page-upgrades-bug-bounty-leaderboard-list": "Bug bounty leaderboard",
3031
"page-upgrades-bug-bounty-leaderboard-points": "points",
3132
"page-upgrades-bug-bounty-ledger-desc": "The Ethereum Specifications detail the design rationale for the Execution Layer and Consensus Layer.",
3233
"page-upgrades-bug-bounty-ledger-title": "Specification bugs",

0 commit comments

Comments
 (0)