Skip to content

Commit 4be1970

Browse files
committed
docs: update english translations
1 parent 9406dcc commit 4be1970

File tree

11 files changed

+127
-47
lines changed

11 files changed

+127
-47
lines changed

docs/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const config: Config = {
2727
// useful metadata like html lang. For example, if your site is Chinese, you
2828
// may want to replace "en" with "zh-Hans".
2929
i18n: {
30-
defaultLocale: 'zh',
31-
locales: ['en', 'zh'],
30+
defaultLocale: 'en',
31+
locales: ['zh', 'en'],
3232
},
3333

3434
presets: [

docs/i18n/en/code.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,5 +309,59 @@
309309
"theme.tags.tagsPageTitle": {
310310
"message": "Tags",
311311
"description": "The title of the tag list page"
312+
},
313+
"home.hero.subTitle": {
314+
"message": "A free CMS and blog system using Next.js."
315+
},
316+
"home.hero.intro": {
317+
"message": "Get Started"
318+
},
319+
"home.hero.try": {
320+
"message": "Try a Demo"
321+
},
322+
"home.feature.intl.title": {
323+
"message": "Componentization"
324+
},
325+
"home.feature.intl.description": {
326+
"message": "Interactive language and visual style based on the latest version of AntDesign component library v5."
327+
},
328+
"home.call.feature": {
329+
"message": "Main Features"
330+
},
331+
"组件化": {
332+
"message": "Componentization"
333+
},
334+
"基于 AntDesign 组件库 v5 最新版的交互语言和视觉风格。": {
335+
"message": "Interactive language and visual style based on the latest version of AntDesign component library v5."
336+
},
337+
"国际化": {
338+
"message": "Internationalization"
339+
},
340+
"支持中英文切换,国际化配置管理能力。": {
341+
"message": "Support switching between Chinese and English, with international configuration management capabilities."
342+
},
343+
"黑白主题": {
344+
"message": "Black and White Theme"
345+
},
346+
"支持亮色和暗黑模式主题自由切换。": {
347+
"message": "Support free switching between bright and dark mode themes."
348+
},
349+
"创作管理": {
350+
"message": "Blog Management"
351+
},
352+
"内置 MarkDown 编辑器,支持文章写文章、分类目录管理,标签管理。": {
353+
"message": "Built in MarkDown editor, supporting article writing, category and table of contents management, and tag management."
354+
},
355+
"内容管理": {
356+
"message": "Content Management"
357+
},
358+
"支持自定义新页面、内容评论管理,完整的社区互动功能。": {
359+
"message": "Support custom new pages, content comment management, and complete community interaction functions."
360+
},
361+
"多端适配": {
362+
"message": "Multi terminal adaptation"
363+
},
364+
"完美适配电脑、平板、移动端H5页面。": {
365+
"message": "Perfectly compatible with H5 pages on computers, tablets, and mobile devices."
312366
}
313367
}

docs/i18n/en/docusaurus-plugin-content-blog/changlog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
slug: changelog
3-
title: ChangeLog
3+
title: Changelog
44
authors: [fecommunity]
55
tags: [reactpress]
66
---

docs/i18n/en/docusaurus-plugin-content-blog/options.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"title": {
3-
"message": "更新日志",
3+
"message": "Changelog",
44
"description": "The title for the blog used in SEO"
55
},
66
"description": {

docs/i18n/en/docusaurus-plugin-content-docs/current.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
},
66
"sidebar.tutorialSidebar.category.基础教程": {
77
"message": "Basic Tutorial",
8-
"description": "The label for category Basic Tutorial in sidebar tutorialSidebar"
8+
"description": "The label for category 基础教程 in sidebar tutorialSidebar"
99
},
1010
"sidebar.tutorialSidebar.category.基础教程.link.generated-index.description": {
1111
"message": "ReactPress Basic Tutorial",
12-
"description": "The generated-index page description for category basic tutorial in sidebar tutorialSidebar"
12+
"description": "The generated-index page description for category 基础教程 in sidebar tutorialSidebar"
1313
},
1414
"sidebar.tutorialSidebar.category.进阶教程": {
1515
"message": "Advanced Tutorial",
16-
"description": "The label for category Advanced Tutorial in sidebar tutorialSidebar"
16+
"description": "The label for category 进阶教程 in sidebar tutorialSidebar"
1717
}
1818
}

docs/i18n/en/docusaurus-theme-classic/footer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
},
66
"link.title.社区": {
77
"message": "Community",
8-
"description": "The title of the footer links column with title=Community in the footer"
8+
"description": "The title of the footer links column with title=社区 in the footer"
99
},
1010
"link.title.更多": {
1111
"message": "More",
12-
"description": "The title of the footer links column with title=More in the footer"
12+
"description": "The title of the footer links column with title=更多 in the footer"
1313
},
1414
"link.item.label.教程": {
1515
"message": "Tutorial",
16-
"description": "The label of footer link with label=Tutorial linking to /docs/intro"
16+
"description": "The label of footer link with label=教程 linking to /docs/intro"
1717
},
1818
"link.item.label.Stack Overflow": {
1919
"message": "Stack Overflow",

docs/i18n/en/docusaurus-theme-classic/navbar.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
},
1010
"item.label.教程": {
1111
"message": "Tutorial",
12-
"description": "Navbar item with label Tutorial"
12+
"description": "Navbar item with label 教程"
1313
},
1414
"item.label.博客": {
1515
"message": "Blog",
16-
"description": "Navbar item with label Blog"
16+
"description": "Navbar item with label 博客"
1717
},
1818
"item.label.Demo演示": {
1919
"message": "Demo",
20-
"description": "Navbar item with label Demo"
20+
"description": "Navbar item with label Demo演示"
2121
},
2222
"item.label.GitHub": {
2323
"message": "GitHub",

docs/src/components/Features/index.tsx

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
22
import clsx from 'clsx';
33
import Heading from '@theme/Heading';
44
import styles from './styles.module.css';
5+
import Translate, { translate } from '@docusaurus/Translate';
56

67
type FeatureItem = {
78
title: string;
@@ -11,34 +12,58 @@ type FeatureItem = {
1112

1213
const FeatureList: FeatureItem[] = [
1314
{
14-
title: '组件化',
15+
title: translate({
16+
message: '组件化',
17+
}),
1518
Svg: require('@site/static/img/undraw_react.svg').default,
16-
description: <>基于 AntDesign 组件库 v5 最新版的交互语言和视觉风格。</>,
19+
description: translate({
20+
message: '基于 AntDesign 组件库 v5 最新版的交互语言和视觉风格。',
21+
}),
1722
},
1823
{
19-
title: '国际化',
24+
title: translate({
25+
message: '国际化',
26+
}),
2027
Svg: require('@site/static/img/undraw_around_the_world.svg').default,
21-
description: <>支持中英文切换,国际化配置管理能力。</>,
28+
description: translate({
29+
message: '支持中英文切换,国际化配置管理能力。',
30+
}),
2231
},
2332
{
24-
title: '黑白主题',
33+
title: translate({
34+
message: '黑白主题',
35+
}),
2536
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default,
26-
description: <>支持亮色和暗黑模式主题自由切换。</>,
37+
description: translate({
38+
message: '支持亮色和暗黑模式主题自由切换。',
39+
}),
2740
},
2841
{
29-
title: '创作管理',
42+
title: translate({
43+
message: '创作管理',
44+
}),
3045
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
31-
description: <>内置 MarkDown 编辑器,支持文章写文章、分类目录管理,标签管理。</>,
46+
description: translate({
47+
message: '内置 MarkDown 编辑器,支持文章写文章、分类目录管理,标签管理。',
48+
}),
3249
},
3350
{
34-
title: '内容管理',
51+
title: translate({
52+
message: '内容管理',
53+
}),
3554
Svg: require('@site/static/img/undraw_version_control.svg').default,
36-
description: <>支持自定义新页面、内容评论管理,完整的社区互动功能。</>,
55+
description: translate({
56+
message: '支持自定义新页面、内容评论管理,完整的社区互动功能。',
57+
}),
3758
},
3859
{
39-
title: '多端适配',
60+
title: translate({
61+
message: '多端适配',
62+
}),
4063
Svg: require('@site/static/img/undraw_typewriter.svg').default,
41-
description: <>完美适配电脑、平板、移动端H5页面。</>,
64+
description: translate({
65+
message: '完美适配电脑、平板、移动端H5页面。',
66+
}),
4267
},
4368
];
4469

docs/src/pages/Home/CallToAction/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import React from 'react';
99

1010
import Features from '@site/src/components/Features';
11+
import Translate from '@docusaurus/Translate';
1112

1213
import styles from './styles.module.css';
1314

@@ -16,7 +17,9 @@ function CallToAction() {
1617
<div className={styles.wrapper}>
1718
<div className={styles.background} />
1819
<div className={styles.container}>
19-
<h1 className={styles.title}>主要特性</h1>
20+
<h1 className={styles.title}>
21+
<Translate id="home.call.feature">主要特性</Translate>
22+
</h1>
2023
<Features />
2124
</div>
2225
</div>

docs/src/pages/Home/Hero/index.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ import GridBackground from '@site/src/pages/Home/Hero/GridBackground';
1313
import FloorBackground from '@site/src/pages/Home/Hero/FloorBackground';
1414
import Devices from '@site/src/pages/Home/Hero/Devices';
1515
import styles from './styles.module.css';
16+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
17+
import Translate from '@docusaurus/Translate';
1618

1719
function Hero() {
20+
const { siteConfig } = useDocusaurusContext();
21+
1822
return (
1923
<div className={styles.container}>
2024
<div className={styles.backgroundContainer}>
@@ -30,14 +34,16 @@ function Hero() {
3034
</div>
3135
<div className={styles.content}>
3236
<Logo className={styles.logo} />
33-
<h1 className={styles.title}>ReactPress</h1>
34-
<h2 className={styles.subtitle}>一个基于Next.js的博客&CMS系统。</h2>
37+
<h1 className={styles.title}>{siteConfig.title}</h1>
38+
<h2 className={styles.subtitle}>
39+
<Translate id="home.hero.subTitle">一个基于Next.js的博客&CMS系统。</Translate>
40+
</h2>
3541
<div className={styles.buttonContainer}>
3642
<a href="/docs/intro" className={styles.primaryButton}>
37-
入门指南
43+
<Translate id="home.hero.intro">入门指南</Translate>
3844
</a>
3945
<a href="https://blog.gaoredu.com" target="_blank" className={styles.secondaryButton}>
40-
试用一下
46+
<Translate id="home.hero.try">试用一下</Translate>
4147
</a>
4248
<a href="https://github.com/fecommunity/reactpress" target="_blank" className={styles.githubButton}>
4349
<img src="https://img.shields.io/github/stars/fecommunity/reactpress?color=green&style=social" />

0 commit comments

Comments
 (0)