From 6b5e3580fb72683f5c666336c131e5ba18bc281c Mon Sep 17 00:00:00 2001 From: titor-z Date: Sat, 15 Mar 2025 01:21:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=88=91=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Navbar.jsx | 16 ++--- src/main.jsx | 5 +- src/pages/LandingPage.jsx | 130 +++++++++++++++++-------------------- src/pages/Templates.jsx | 31 +++++---- src/templates/template1.js | 4 +- src/templates/template2.js | 4 +- src/templates/template3.js | 4 +- src/templates/template4.js | 4 +- src/templates/template5.js | 4 +- src/templates/template6.js | 4 +- 10 files changed, 96 insertions(+), 110 deletions(-) diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 8ef775d..9ddbaf1 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -24,25 +24,25 @@ export default function Navbar() { .scrollIntoView({ behavior: "smooth" }) } > - Features + 功能 - Editor + 编辑器 - Templates + 模板 - Docs + 文档
@@ -100,28 +100,28 @@ export default function Navbar() { setOpenMenu(false); }} > - Features + 功能
- Editor + 编辑器
- Templates + 模板
- Docs + 文档 diff --git a/src/main.jsx b/src/main.jsx index f09f468..36b78ff 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -3,13 +3,14 @@ import { LocaleProvider } from "@douyinfe/semi-ui"; import { Analytics } from "@vercel/analytics/react"; import { SpeedInsights } from "@vercel/speed-insights/react"; import App from "./App.jsx"; -import en_US from "@douyinfe/semi-ui/lib/es/locale/source/en_US"; +// import en_US from "@douyinfe/semi-ui/lib/es/locale/source/en_US"; import "./index.css"; import "./i18n/i18n.js"; +import { zh } from "./i18n/locales/zh.js"; const root = ReactDOM.createRoot(document.getElementById("root")); root.render( - + diff --git a/src/pages/LandingPage.jsx b/src/pages/LandingPage.jsx index 0398cb8..ab550c3 100644 --- a/src/pages/LandingPage.jsx +++ b/src/pages/LandingPage.jsx @@ -9,13 +9,13 @@ import postgres_icon from "../assets/postgres.png"; import sqlite_icon from "../assets/sqlite.png"; import mariadb_icon from "../assets/mariadb.png"; import sql_server_icon from "../assets/sql-server.png"; -import discord from "../assets/discord.png"; -import github from "../assets/github.png"; +// import discord from "../assets/discord.png"; +// import github from "../assets/github.png"; import screenshot from "../assets/screenshot.png"; import FadeIn from "../animations/FadeIn"; import axios from "axios"; import { languages } from "../i18n/i18n"; -import { Tweet } from "react-tweet"; +// import { Tweet } from "react-tweet"; import { socials } from "../data/socials"; function shortenNumber(number) { @@ -49,7 +49,7 @@ export default function LandingPage() { {showSurvey && (
- Help us improve! Share your feedback. + 帮助我们改进!分享您的反馈。
- Try it for yourself + 自行尝试
@@ -120,7 +119,7 @@ export default function LandingPage() { {shortenNumber(stats.stars)}
- GitHub stars + GitHub 星标
@@ -128,7 +127,7 @@ export default function LandingPage() { {shortenNumber(stats.forks)}
- GitHub forks + GitHub 收藏
@@ -136,19 +135,18 @@ export default function LandingPage() { {shortenNumber(languages.length)}
- Languages + 语言
- Build diagrams with a few clicks, see the full picture, export SQL - scripts, customize your editor, and more. + 用几下点击构建图表,全面了解,导出 SQL 脚本,自定义你的编辑器,更多功能。
- Design for your database + 设计你的数据库
{dbs.map((s, i) => ( @@ -179,10 +177,10 @@ export default function LandingPage() {
- More than just an editor + 不仅仅是一个编辑器
- What drawDB has to offer + drawDB 的功能介绍
{features.map((f, i) => ( @@ -203,9 +201,9 @@ export default function LandingPage() {
{/* Tweets */} -
+ {/*
- What the internet says about us + 网上关于我们的说法
-
+
*/} {/* Contact us */} -
- Reach out to us + 联系我们
- We love hearing from you. Join our community on Discord, GitHub, and - X. + 我们很乐意听到您的声音。加入我们在 Discord、GitHub 和 X 上的社区。
@@ -250,7 +247,7 @@ export default function LandingPage() {
- See the source + 查看源代码
@@ -263,7 +260,7 @@ export default function LandingPage() {
- Join us on Discord + 在 Discord 加入我们
@@ -275,20 +272,19 @@ export default function LandingPage() { >
-
Follow us on X
+
在 X 上关注我们
-
+
*/} -
- Attention! The diagrams are saved in your browser. Before clearing the - browser make sure to back up your data. +
+ 注意!图表会在您的浏览器中保存。在清除浏览器之前,请确保备份您的数据。

- © 2024 drawDB - All right reserved. + © 2024 drawDB - 保留所有权利。
); @@ -304,123 +300,113 @@ const dbs = [ const features = [ { - title: "Export", + title: "导出", content: (
- Export the DDL script to run on your database or export the diagram as a - JSON or an image. + 导出 DDL 脚本以在您的数据库中运行或将图表导出为 JSON 或图像。
), footer: "", }, { - title: "Reverse engineer", + title: "反向工程", content: (
- Already have a schema? Import a DDL script to generate a diagram. + 已经有模式了吗?导入 DDL 脚本来生成图表。
), footer: "", }, { - title: "Customizable workspace", + title: "可定制的工作区", content: (
- Customize the UI to fit your preferences. Select the components you want - in your view. + 自定义界面以符合您的偏好。选择您想要在视图中显示的组件。
), footer: "", }, { - title: "Keyboard shortcuts", + title: "键盘快捷键", content: (
- Speed up development with keyboard shortuts. See all available shortcuts + 使用键盘快捷键加快开发速度。在 - here - - . + >这里查看所有可用的快捷键。
), footer: "", }, { - title: "Templates", + title: "模板", content: (
- Start off with pre-built templates. Get a quick start or get inspirition - for your design. + 使用预建模板开始。快速入门或为您的设计获取灵感。
), footer: "", }, { - title: "Custom Templates", + title: "自定义模板", content: (
- Have boilerplate structures? Save time by saving them as templates and - load them when needed. + 有模板结构?通过保存它们作为模板来节省时间,在需要时加载它们。
), footer: "", }, { - title: "Robust editor", + title: "强大的编辑器", content: (
- Undo, redo, copy, paste, duplacate and more. Add tables, subject areas, - and notes. + 撤销、重做、复制、粘贴、复制更多。添加表、主题区域和注释。
), footer: "", }, { - title: "Issue detection", + title: "问题检测", content: (
- Detect and tackle errors in the diagram to make sure the scripts are - correct. + 检测并解决图中的错误,确保脚本正确。
), footer: "", }, { - title: "Relational databases", + title: "关系型数据库", content: (
- We support 5 relational databases - MySQL, PostgreSQL, SQLite, MariaDB, - SQL Server. + 我们支持 5 种关系型数据库 - MySQL、PostgreSQL、SQLite、MariaDB、SQL Server。
), footer: "", }, { - title: "Object-Relational databases", + title: "对象关系型数据库", content: (
- Add custom types for object-relational databases, or create custom JSON - schemes. + 为对象关系型数据库添加自定义类型,或创建自定义 JSON 方案。
), footer: "", }, { - title: "Presentation mode", + title: "演示模式", content: (
- Present your diagrams on a big screen during team meetings and - discussions. + 在团队会议和讨论中,在大屏幕上展示您的图表。
), footer: "", }, { - title: "Track todos", - content:
Keep track of tasks and mark them done when finished.
, + title: "跟踪待办事项", + content: ( +
用于跟踪任务并在完成时标记为已完成。
+ ), footer: "", }, ]; diff --git a/src/pages/Templates.jsx b/src/pages/Templates.jsx index 58f1558..6969d3c 100644 --- a/src/pages/Templates.jsx +++ b/src/pages/Templates.jsx @@ -48,7 +48,7 @@ export default function Templates() { />
- Templates + 模板
@@ -56,16 +56,15 @@ export default function Templates() {
- Database schema templates + 数据库模式模板
- A compilation of database entity relationship diagrams to give you - a quick start or inspire your application's architecture. + 一个数据库实体关系图的集合,帮助你快速开始或启发你的应用程序架构。
Default templates} + tab={默认模板} itemKey="1" >
@@ -101,7 +100,7 @@ export default function Templates() {
Your templates} + tab={你的模板} itemKey="2" > {customTemplates?.length > 0 ? ( @@ -134,7 +133,7 @@ export default function Templates() { onClick={() => editTemplate(c.id)} > -
Edit
+
编辑
@@ -157,7 +156,7 @@ export default function Templates() { bordered icon={null} closeIcon={null} - description={
You have no custom templates saved.
} + description={
您还没有保存自定义模板。
} />
- How to save a template + 如何保存模板?
diff --git a/src/templates/template1.js b/src/templates/template1.js index fd4948d..c6bf6c2 100644 --- a/src/templates/template1.js +++ b/src/templates/template1.js @@ -342,8 +342,8 @@ export const template1 = { notes: [], subjectAreas: [], types: [], - title: "Blog database schema", + title: "博客数据库模式", description: - "A blog database including tables such as posts, users, comments, and tags to facilitate the storage and retrieval of blog-related information.", + "一个博客数据库,包括帖子、用户、评论和标签等表,以方便存储和检索博客相关信息。", custom: 0, }; diff --git a/src/templates/template2.js b/src/templates/template2.js index 89014bc..b4500b6 100644 --- a/src/templates/template2.js +++ b/src/templates/template2.js @@ -346,8 +346,8 @@ export const template2 = { notes: [], subjectAreas: [], types: [], - title: "Human resources schema", + title: "人力资源方案", description: - "A Human Resources (HR) schema designed to manage employee and project related information within an organization.", + "一个旨在管理组织内员工和项目相关信息的人力资源(HR)方案。", custom: 0, }; diff --git a/src/templates/template3.js b/src/templates/template3.js index 7cfb737..a8941f4 100644 --- a/src/templates/template3.js +++ b/src/templates/template3.js @@ -418,8 +418,8 @@ export const template3 = { notes: [], subjectAreas: [], types: [], - title: "E-commerce schema", + title: "电子商务方案", description: - "An e-commerce schema designed to manage various aspects of an online store, including products, orders, and customers.", + '一个电子商务架构,用于管理在线商店的各种方面,包括产品、订单和客户。', custom: 0, }; diff --git a/src/templates/template4.js b/src/templates/template4.js index 997c277..eb10f6a 100644 --- a/src/templates/template4.js +++ b/src/templates/template4.js @@ -358,8 +358,8 @@ export const template4 = { notes: [], subjectAreas: [], types: [], - title: "Library schema", + title: "图书馆架构", description: - "A library schema designed to manage the books, genres, reservations, and other aspects of a library system", + '一个图书馆架构,用于管理书籍、类型、预订以及其他图书馆系统方面的内容。', custom: 0, }; diff --git a/src/templates/template5.js b/src/templates/template5.js index 2dbe15d..597187e 100644 --- a/src/templates/template5.js +++ b/src/templates/template5.js @@ -629,8 +629,8 @@ export const template5 = { notes: [], subjectAreas: [], types: [], - title: "Bank schema", + title: "银行方案", description: - "A financial schema designed to manage financial transactions, accounts, customers, and other aspects of financial data.", + '一个用于管理金融交易、账户、客户及其他金融数据的金融方案设计。', custom: 0, }; diff --git a/src/templates/template6.js b/src/templates/template6.js index 251fd47..265dd88 100644 --- a/src/templates/template6.js +++ b/src/templates/template6.js @@ -453,8 +453,8 @@ export const template6 = { notes: [], subjectAreas: [], types: [], - title: "University schema", + title: "大学方案", description: - "A university schema designed to manage information about students, courses, instructors, and other aspects of university-related data.", + '一个用于管理学生、课程、教师及其他大学相关数据信息的大学模式。', custom: 0, };