Skip to content

Commit

Permalink
add some translations
Browse files Browse the repository at this point in the history
  • Loading branch information
1330Petrel committed Feb 17, 2025
1 parent 9e16510 commit b543446
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
23 changes: 23 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"homepage.topBanner": {
"message": "Call for Papers, commence!"
},
"homepage.features.software.title": {
"message": "Software Department"
},
"homepage.features.software.description": {
"message": "The software department is responsible for the construction and testing of the artificial intelligence challenge, the student festival game platform, the electronic design competition platform, website maintenance, etc. We pay attention to code quality and team collaboration, and welcome you to join!"
},
"homepage.features.hardware.title": {
"message": "Hardware Department"
},
"homepage.features.hardware.description": {
"message": "The hardware department focuses on hardware innovation and development, and is responsible for the development of electronic design competitions, robot dogs and other competitions. Looking forward to your joining!"
},
"homepage.features.innovation.title": {
"message": "Learning and Innovation Department"
},
"homepage.features.innovation.description": {
"message": "The Department of Learning and Innovation is responsible for docking with various scientific research and training projects of the school, such as the Spark Project, the Challenge Cup, and the enterprise laboratory, to help students complete their life development planning. Welcome you to join!"
}
}
3 changes: 3 additions & 0 deletions i18n/en/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"title": {
"message": "ASTA"
},
"logo.alt": {
"message": "ASTA"
},
"item.label.文档": {
"message": "Docs"
},
Expand Down
28 changes: 16 additions & 12 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import clsx from 'clsx';
import Translate, { translate } from '@docusaurus/Translate';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
import SoftwareSvg from '@site/static/img/software.svg';
import HardwareSvg from '@site/static/img/hardware.svg';
import InnovationSvg from '@site/static/img/innovation.svg';

import React, { JSX } from 'react';

Expand All @@ -15,29 +13,35 @@ type FeatureItem = {

const FeatureList: FeatureItem[] = [
{
title: '软件部',
Svg: SoftwareSvg,
title: translate({ "message": '软件部', "id": "homepage.features.software.title" }),
Svg: 'img/software.svg',
description: (
<p>
软件部负责人工智能挑战赛,学生节游戏平台,电子设计大赛平台的搭建测试,网站维护等工作,我们注重代码质量和团队协作,欢迎你的加入!
<Translate id="homepage.features.software.description">
软件部负责人工智能挑战赛,学生节游戏平台,电子设计大赛平台的搭建测试,网站维护等工作,我们注重代码质量和团队协作,欢迎你的加入!
</Translate>
</p>
),
},
{
title: '硬件部',
Svg: HardwareSvg,
title: translate({ "message": '硬件部', "id": "homepage.features.hardware.title" }),
Svg: 'img/hardware.svg',
description: (
<p>
硬件部专注于硬件创新与开发,负责电子设计大赛,机器狗等比赛的开发,期待你的加入!
<Translate id="homepage.features.hardware.description">
硬件部专注于硬件创新与开发,负责电子设计大赛,机器狗等比赛的开发,期待你的加入!
</Translate>
</p>
),
},
{
title: '学创部',
Svg: InnovationSvg,
title: translate({ "message": '学创部', "id": "homepage.features.innovation.title" }),
Svg: 'img/innovation.svg',
description: (
<p>
学创部负责对接学校的各类科研培养项目,如星火计划、挑战杯,与企业实验室对接,帮助同学们完成人生发展规划,欢迎你的加入!
<Translate id="homepage.features.innovation.description">
学创部负责对接学校的各类科研培养项目,如星火计划、挑战杯,与企业实验室对接,帮助同学们完成人生发展规划,欢迎你的加入!
</Translate>
</p>
),
},
Expand Down

0 comments on commit b543446

Please sign in to comment.