Skip to content

Commit 53a1c58

Browse files
authored
Merge pull request #9086 from ethereum/setupWhoUsesEthereumTranslation
setup AdoptionChart for translation
2 parents 59c6bbb + 377f513 commit 53a1c58

File tree

2 files changed

+53
-14
lines changed

2 files changed

+53
-14
lines changed

src/components/AdoptionChart.tsx

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
// Libraries
12
import React, { ReactNode } from "react"
23
import { Box, BoxProps, Flex, useColorMode } from "@chakra-ui/react"
34

5+
// Components
6+
import Translation from "./Translation"
7+
48
const Column: React.FC<{ children: ReactNode }> = ({ children }) => {
59
return (
610
<Flex
@@ -60,26 +64,52 @@ const AdoptionChart: React.FC<IProps> = () => {
6064
<Flex>
6165
<Column>
6266
<ColumnName>2010</ColumnName>
63-
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
67+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>
68+
<Translation id="adoption-chart-investors-label" />
69+
</Cell>
6470
</Column>
6571

6672
<Column>
6773
<ColumnName>2014</ColumnName>
68-
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
69-
<Cell color={isDark ? "#9EC885" : "#67954C"}>Developers</Cell>
70-
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>Companies</Cell>
74+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>
75+
<Translation id="adoption-chart-investors-label" />
76+
</Cell>
77+
<Cell color={isDark ? "#9EC885" : "#67954C"}>
78+
<Translation id="adoption-chart-developers-label" />
79+
</Cell>
80+
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>
81+
<Translation id="adoption-chart-companies-label" />
82+
</Cell>
7183
</Column>
7284

7385
<Column>
74-
<ColumnName>Now</ColumnName>
75-
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
76-
<Cell color={isDark ? "#9EC885" : "#67954C"}>Developers</Cell>
77-
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>Companies</Cell>
78-
<Cell color={isDark ? "#8EA8CA" : "#5E7492"}>Artists</Cell>
79-
<Cell color={isDark ? "#AC85C2" : "#88669B"}>Musicians</Cell>
80-
<Cell color={isDark ? "#CA928E" : "#985955"}>Writers</Cell>
81-
<Cell color={isDark ? "#B9B9B9" : "#9E9E9E"}>Gamers</Cell>
82-
<Cell color={isDark ? "#E2B79E" : "#E78A54"}>Refugees</Cell>
86+
<ColumnName>
87+
<Translation id="adoption-chart-column-now-label" />
88+
</ColumnName>
89+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>
90+
<Translation id="adoption-chart-investors-label" />
91+
</Cell>
92+
<Cell color={isDark ? "#9EC885" : "#67954C"}>
93+
<Translation id="adoption-chart-developers-label" />
94+
</Cell>
95+
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>
96+
<Translation id="adoption-chart-companies-label" />
97+
</Cell>
98+
<Cell color={isDark ? "#8EA8CA" : "#5E7492"}>
99+
<Translation id="adoption-chart-artists-label" />
100+
</Cell>
101+
<Cell color={isDark ? "#AC85C2" : "#88669B"}>
102+
<Translation id="adoption-chart-musicians-label" />
103+
</Cell>
104+
<Cell color={isDark ? "#CA928E" : "#985955"}>
105+
<Translation id="adoption-chart-writers-label" />
106+
</Cell>
107+
<Cell color={isDark ? "#B9B9B9" : "#9E9E9E"}>
108+
<Translation id="adoption-chart-gamers-label" />
109+
</Cell>
110+
<Cell color={isDark ? "#E2B79E" : "#E78A54"}>
111+
<Translation id="adoption-chart-refugees-label" />
112+
</Cell>
83113
</Column>
84114
</Flex>
85115
)

src/intl/en/page-what-is-ethereum.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,14 @@
106106
"page-what-is-ethereum-the-year-in-ethereum-2021-desc": "Jan 17, 2022 - Josh Stark and Evan Van Ness",
107107
"page-what-is-ethereum-atoms-institutions-blockchains": "Atoms, Institutions, Blockchains",
108108
"page-what-is-ethereum-atoms-institutions-blockchains-desc": "- Why blockchains matter?",
109-
"page-what-is-ethereum-ethereum-in-numbers-title": "Ethereum in numbers"
109+
"page-what-is-ethereum-ethereum-in-numbers-title": "Ethereum in numbers",
110+
"adoption-chart-column-now-label": "Now",
111+
"adoption-chart-investors-label": "Investors",
112+
"adoption-chart-developers-label": "Developers",
113+
"adoption-chart-companies-label": "Companies",
114+
"adoption-chart-artists-label": "Artists",
115+
"adoption-chart-musicians-label": "Musicians",
116+
"adoption-chart-writers-label": "Writers",
117+
"adoption-chart-gamers-label": "Gamers",
118+
"adoption-chart-refugees-label": "Refugees"
110119
}

0 commit comments

Comments
 (0)