Skip to content

Commit 9417a84

Browse files
authored
Merge pull request #14022 from ethereum/fix-dropdown-intl
fix: dropdown intl bugs
2 parents 380a149 + 395d032 commit 9417a84

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

src/hooks/useStakingConsiderations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ export const useStakingConsiderations = ({
389389
pageData[activeIndex]
390390

391391
const dropdownLinks: ButtonDropdownList = {
392-
text: "Staking Considerations",
393-
ariaLabel: "Dropdown menu for staking considerations",
392+
text: t("page-staking-considerations-dropdown-text"),
393+
ariaLabel: t("page-staking-considerations-dropdown-aria-label"),
394394
items: pageData.map(({ title, matomo }) => ({
395395
text: title,
396396
callback: setActiveIndex,

src/intl/en/page-staking.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
"page-staking-comparison-saas-pools": "These are similar in that you're generally relying on someone else to run the validator client, but unlike SaaS, pooled staking allows you to participate with smaller amounts of ETH. If you're looking to stake with less than 32 ETH, consider checking these out.",
9090
"page-staking-comparison-pools-solo": "Pooled staking has a significantly lower barrier to entry when compared to home staking, but comes with additional risk by delegating all node operations to a third-party, and with a fee. Home staking gives full sovereignty and control over the choices that go into choosing a staking setup. Stakers never have to hand over their keys, and they earn full rewards without any middlemen taking a cut.",
9191
"page-staking-comparison-pools-saas": "These are similar in that stakers do not run the validator software themselves, but unlike pooling options, SaaS requires a full 32 ETH deposit to activate a validator. Rewards accumulate to the staker, and usually involve a monthly fee or other stake to use the service. If you'd prefer your own validator keys and are looking to stake at least 32 ETH, using a SaaS provider may be a good option for you.",
92+
"page-staking-considerations-dropdown-text": "Staking Considerations",
93+
"page-staking-considerations-dropdown-aria-label": "Dropdown menu for staking considerations",
9294
"page-staking-considerations-solo-1-title": "Open source",
9395
"page-staking-considerations-solo-1-description": "Essential code is 100% open source and available to the public to fork and use",
9496
"page-staking-considerations-solo-1-warning": "Closed source",

src/layouts/md/Roadmap.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { useTranslation } from "next-i18next"
2+
13
import type { ChildOnlyProp } from "@/lib/types"
24
import type { MdPageContent, RoadmapFrontmatter } from "@/lib/interfaces"
35

@@ -34,12 +36,14 @@ export const RoadmapLayout = ({
3436
tocItems,
3537
contentNotTranslated,
3638
}: RoadmapLayoutProps) => {
39+
const { t } = useTranslation("common")
40+
3741
const dropdownLinks: ButtonDropdownList = {
38-
text: "nav-roadmap-options",
39-
ariaLabel: "nav-roadmap-options-alt",
42+
text: t("common:nav-roadmap-options"),
43+
ariaLabel: t("common:nav-roadmap-options-alt"),
4044
items: [
4145
{
42-
text: "nav-roadmap-home",
46+
text: t("common:nav-roadmap-home"),
4347
href: "/roadmap/",
4448
matomo: {
4549
eventCategory: `Roadmap dropdown`,
@@ -48,7 +52,7 @@ export const RoadmapLayout = ({
4852
},
4953
},
5054
{
51-
text: "nav-roadmap-security",
55+
text: t("common:nav-roadmap-security"),
5256
href: "/roadmap/security",
5357
matomo: {
5458
eventCategory: `Roadmap security dropdown`,
@@ -57,7 +61,7 @@ export const RoadmapLayout = ({
5761
},
5862
},
5963
{
60-
text: "nav-roadmap-scaling",
64+
text: t("common:nav-roadmap-scaling"),
6165
href: "/roadmap/scaling",
6266
matomo: {
6367
eventCategory: `Roadmap scaling dropdown`,
@@ -66,7 +70,7 @@ export const RoadmapLayout = ({
6670
},
6771
},
6872
{
69-
text: "nav-roadmap-user-experience",
73+
text: t("common:nav-roadmap-user-experience"),
7074
href: "/roadmap/user-experience/",
7175
matomo: {
7276
eventCategory: `Roadmap user experience dropdown`,
@@ -75,7 +79,7 @@ export const RoadmapLayout = ({
7579
},
7680
},
7781
{
78-
text: "nav-roadmap-future-proofing",
82+
text: t("common:nav-roadmap-future-proofing"),
7983
href: "/roadmap/future-proofing",
8084
matomo: {
8185
eventCategory: `Roadmap future-proofing dropdown`,

0 commit comments

Comments
 (0)