Skip to content

Commit c455148

Browse files
committed
Different Language Support
Signed-off-by: kartik <kartikrautan0@gmail.com>
1 parent 76717a7 commit c455148

20 files changed

+8245
-6383
lines changed

package-lock.json

Lines changed: 7720 additions & 6184 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"dompurify": "^3.3.1",
3535
"highlight.js": "^11.10.0",
3636
"html2pdf.js": "^0.14.0",
37+
"i18next": "^25.8.13",
38+
"i18next-browser-languagedetector": "^8.2.1",
3739
"immer": "^10.1.1",
3840
"jest-canvas-mock": "^2.5.2",
3941
"lz-string": "^1.5.0",
@@ -46,6 +48,7 @@
4648
"react-dark-mode-toggle": "^0.2.0",
4749
"react-dom": "^18.2.0",
4850
"react-dropdown": "^1.11.0",
51+
"react-i18next": "^16.5.4",
4952
"react-icons": "^5.5.0",
5053
"react-markdown": "^9.0.1",
5154
"react-resizable-panels": "^3.0.3",
@@ -109,4 +112,4 @@
109112
"not ie <= 11",
110113
"Safari >= 10"
111114
]
112-
}
115+
}

src/components/Footer.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React, { useState } from "react";
2+
import { useTranslation } from 'react-i18next';
23
import { Layout, Row, Col, Typography, Space, Button, Image, Grid } from "antd";
34
import {
45
GithubOutlined,
@@ -16,6 +17,7 @@ const { Text, Link } = Typography;
1617
const { useBreakpoint } = Grid;
1718

1819
const CustomFooter: React.FC = () => {
20+
const { t } = useTranslation();
1921
const year = new Date().getFullYear();
2022
const screens = useBreakpoint();
2123
const [expanded, setExpanded] = useState(false);
@@ -41,7 +43,7 @@ const CustomFooter: React.FC = () => {
4143
/>
4244
</Link>
4345
<Text style={{ color: "rgba(255, 255, 255, 0.65)" }}>
44-
The open-source smart legal contract stack
46+
{t('footer.tagline')}
4547
</Text>
4648
<Link href="mailto:admin@accordproject.org">
4749
<Text strong style={{ color: "rgba(255, 255, 255, 0.65)" }}>
@@ -60,7 +62,7 @@ const CustomFooter: React.FC = () => {
6062
border: "none",
6163
}}
6264
>
63-
Join
65+
{t('footer.join')}
6466
</Button>
6567
</Link>
6668
</Space>
@@ -73,7 +75,7 @@ const CustomFooter: React.FC = () => {
7375
onClick={() => setExpanded(!expanded)}
7476
style={{ color: "white", fontSize: "16px", marginBottom: "10px" }}
7577
>
76-
{expanded ? <UpOutlined /> : <DownOutlined />} Other Links
78+
{expanded ? <UpOutlined /> : <DownOutlined />} {t('footer.otherLinks')}
7779
</Button>
7880
)}
7981

@@ -114,14 +116,14 @@ const CustomFooter: React.FC = () => {
114116
<Row justify="space-between" align="middle" style={{ marginTop: "40px" }}>
115117
<Col>
116118
<Text style={{ color: "rgba(255, 255, 255, 0.85)" }}>
117-
copyright © {year} accord project &bull;{" "}
119+
{t('footer.copyright')} © {year} accord project &bull;{" "}
118120
<Link
119121
strong
120122
href="https://accordproject.org/privacy"
121123
target="_blank"
122124
style={{ color: "rgba(255, 255, 255, 0.85)" }}
123125
>
124-
trademark policy
126+
{t('footer.trademarkPolicy')}
125127
</Link>{" "}
126128
&bull;{" "}
127129
<Link
@@ -130,7 +132,7 @@ const CustomFooter: React.FC = () => {
130132
target="_blank"
131133
style={{ color: "rgba(255, 255, 255, 0.85)" }}
132134
>
133-
brand assets
135+
{t('footer.brandAssets')}
134136
</Link>
135137
</Text>
136138
</Col>

src/components/FullScreenModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React, { useState, useEffect } from "react";
2+
import { useTranslation } from 'react-i18next';
23
import { Modal } from "antd";
34
import AgreementHtml from "../AgreementHtml";
45
import { MdFullscreen } from "react-icons/md";
56
import useAppStore from "../store/store";
67

78
const FullScreenModal: React.FC = () => {
89
const [open, setOpen] = useState<boolean>(false);
10+
const { t } = useTranslation();
911
const textColor = useAppStore((state) => state.textColor);
1012
const backgroundColor = useAppStore((state) => state.backgroundColor);
1113

@@ -42,7 +44,7 @@ const FullScreenModal: React.FC = () => {
4244
onClick={() => setOpen(true)}
4345
/>
4446
<Modal
45-
title="Output"
47+
title={t('fullscreen.output')}
4648
centered
4749
open={open}
4850
onOk={() => setOpen(false)}

0 commit comments

Comments
 (0)