Skip to content

Commit 2faeeb4

Browse files
authored
fix: i18n (#1126)
* fix: i18n * fix: i18n * fix: i18n * fix: Databend Speaker svg
1 parent 197784b commit 2faeeb4

File tree

6 files changed

+45
-2
lines changed

6 files changed

+45
-2
lines changed

docs/en/guides/00-overview/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ slug: /
44
---
55

66
import DocsOverview from '@site/src/components/DocsOverview'
7+
import Speaker from '@site/src/components/Speaker'
78

8-
Welcome to the Databend (pronounced as /ˈdeɪtəˌbɛnd/) Guides, covering all Databend products.
9+
Welcome to the Databend (pronounced as /ˈdeɪtəˌbɛnd/)<Speaker /> Guides, covering all Databend products.
910

1011
<DocsOverview />
1112

i18n/en/code.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,5 +668,13 @@
668668
"Upgrading Databend": {
669669
"message": "Upgrading Databend",
670670
"description": "Link text for Upgrading Databend"
671+
},
672+
"Changelog": {
673+
"message": "Changelog",
674+
"description": "Changelog"
675+
},
676+
"FAQ": {
677+
"message": "FAQ",
678+
"description": "FAQ"
671679
}
672680
}

i18n/zh/code.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@
542542
"description": "了解更多的链接文字"
543543
},
544544
"Bulk import data into Databend(Cloud) in multiple formats.": {
545-
"message": "以多种格式批量导入数据到 Databend(云)",
545+
"message": "以多种格式批量导入数据到 Databend(Cloud)",
546546
"description": "加载数据到 Databend 部分的描述"
547547
},
548548
"AI & BI & Visualization & Notebooks": {
@@ -684,5 +684,13 @@
684684
"Upgrading Databend": {
685685
"message": "升级 Databend",
686686
"description": "升级 Databend 的链接文字"
687+
},
688+
"Changelog": {
689+
"message": "发布记录",
690+
"description": "Changelog"
691+
},
692+
"FAQ": {
693+
"message": "常见问题",
694+
"description": "FAQ"
687695
}
688696
}

src/components/Speaker/index.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2024 DatabendLabs.
2+
import { FC, ReactElement } from "react";
3+
import SpeakerSvg from "@site/static/icons/speaker.svg";
4+
import styles from "./style.module.scss";
5+
6+
const Speaker: FC = (): ReactElement => {
7+
return (
8+
<span
9+
className={styles.out}
10+
onClick={() => {
11+
var utterance = new SpeechSynthesisUtterance("Databend");
12+
utterance.lang = "en-US";
13+
speechSynthesis.speak(utterance);
14+
}}
15+
>
16+
<SpeakerSvg></SpeakerSvg>
17+
</span>
18+
);
19+
};
20+
export default Speaker;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.out {
2+
&:hover {
3+
color: var(--text-blue-600);
4+
}
5+
}

static/icons/speaker.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)