Skip to content

Commit 215c257

Browse files
authored
feat: optimize Try Cloud card Chinese translation and layout (#2987)
1 parent 18bf349 commit 215c257

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

i18n/zh/code.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,19 +418,19 @@
418418
"description": "Did this page help you?"
419419
},
420420
"Try Databend Cloud for FREE": {
421-
"message": "开始使用 Databend Cloud",
421+
"message": "欢迎体验 Databend Cloud",
422422
"description": "Try Databend Cloud for FREE"
423423
},
424424
"Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.": {
425-
"message": "基于对象存储的一体化多模仓库:BI/向量/搜索/地理",
425+
"message": "基于 Rust + 对象存储构建的新一代多模态数仓,一个平台即可进行 BI、向量、全文检索及地理空间分析",
426426
"description": "Try Cloud card body line 1"
427427
},
428428
"Snowflake-compatible SQL with automatic scaling.": {
429-
"message": "Snowflake 兼容 SQL,自动弹性扩展",
429+
"message": "支持标准 SQL,自动弹性伸缩,助您快速构建现代化数据平台",
430430
"description": "Try Cloud card body line 2"
431431
},
432432
"Sign up and get $200 in credits.": {
433-
"message": "注册即享 $200 额度",
433+
"message": "注册即领 ¥200 代金券",
434434
"description": "Try Cloud card body line 3"
435435
},
436436
"Low-cost": {
@@ -450,7 +450,7 @@
450450
"description": "Elastic Scaling"
451451
},
452452
"Try it today": {
453-
"message": "注册",
453+
"message": "注册体验",
454454
"description": "Try it today"
455455
},
456456
"Join our growing community": {
@@ -861,4 +861,4 @@
861861
"message": "版本发布",
862862
"description": "Releases"
863863
}
864-
}
864+
}

src/components/TryCloudCard/index.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const TryCloudCard: FC = (): ReactElement => {
1010
siteConfig: {
1111
customFields: { isChina },
1212
},
13+
i18n: { currentLocale },
1314
} = useDocusaurusContext() as any;
1415
const [hidden, setHiddenFlag] = useSessionStorageState("DATABEND_TOC_CARD", {
1516
defaultValue: "",
@@ -26,13 +27,13 @@ const TryCloudCard: FC = (): ReactElement => {
2627
];
2728
return (
2829
<>
29-
{!hidden && (
30-
<div className={styles.card}>
31-
<div className={styles.header}>
32-
<h6>{$t("Try Databend Cloud for FREE")}</h6>
33-
<span onClick={closeCard} className={styles.close}>
34-
<Close />
35-
</span>
30+
{!hidden && (
31+
<div className={`${styles.card} ${currentLocale === 'zh' ? styles.zh : ''}`}>
32+
<div className={styles.header}>
33+
<h6>{$t("Try Databend Cloud for FREE")}</h6>
34+
<span onClick={closeCard} className={styles.close}>
35+
<Close />
36+
</span>
3637
</div>
3738
<div className={styles.desc}>
3839
{lines.map((text, idx) => (

src/components/TryCloudCard/styles.module.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
@media only screen and (max-width: 1110px) {
1111
display: none;
1212
}
13+
&.zh {
14+
.header h6 {
15+
font-size: 13px;
16+
}
17+
.desc {
18+
font-size: 12px;
19+
}
20+
}
1321
.header {
1422
position: relative;
1523
align-items: center;

0 commit comments

Comments
 (0)