Skip to content

Commit 7293dad

Browse files
committed
🌐 i18n
1 parent 90f12c1 commit 7293dad

File tree

6 files changed

+125
-99
lines changed

6 files changed

+125
-99
lines changed

src/locales/en.yml

Lines changed: 96 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ welcome:
88

99
about:
1010
title: Project Graph
11+
updater:
12+
available: New version
13+
downloading: Downloading
14+
links:
15+
documentation: Documentation
16+
github: Github
17+
video: Video (Bilibili)
18+
qq: QQ
19+
forum: Forum (d2learn)
1120
intro:
1221
- Software Introduction
1322
- This is a tool for quickly drawing topological graphs based on the Tauri framework, which can be used for project topology diagram drawing and rapid brainstorming drafts.
@@ -49,7 +58,6 @@ about:
4958
- The animation effect of slashing in Fruit Ninja
5059
- The factory assembly line design in the game "Mindustry" is turned into logical nodes
5160
- The concept of state machines
52-
5361
team:
5462
- Team Introduction
5563
- LiRen Tech is a small team founded by Littlefean and Rutubet on May 1, 2017, with ZTY joining the team later.
@@ -59,6 +67,7 @@ about:
5967
- The team is represented by light blue and code green, symbolizing a team culture that coexists with logical rationality and humor.
6068

6169
settings:
70+
title: Settings
6271
tabs:
6372
about: About
6473
visual: Visual
@@ -68,6 +77,8 @@ settings:
6877
control: Control
6978
ai: AI
7079
github: GitHub
80+
sounds: Sounds
81+
plugins: Plugins
7182
language:
7283
title: Language
7384
options:
@@ -80,9 +91,9 @@ settings:
8091
black: Dracula Dark Theme
8192
white: Paper White Theme
8293
isRenderCenterPointer:
83-
title: 显示中心十字准星
94+
title: Show Center Crosshair
8495
description: |
85-
开启后,画布中心会显示一个十字准星,用于用于指示快捷键创建节点的位置
96+
When enabled, a crosshair will be displayed at the center of the canvas to indicate the position for creating nodes using shortcut keys
8697
lineStyle:
8798
title: Line Style
8899
options:
@@ -102,11 +113,11 @@ settings:
102113
description: |
103114
These background dots are the intersection points of the horizontal and vertical lines, creating a perforated board effect.
104115
showBackgroundCartesian:
105-
title: 显示背景直角坐标系
116+
title: Show Background Cartesian Coordinate System
106117
description: |
107-
开启后,将会显示x轴、y轴和刻度数字
108-
可以用于观测一些节点的绝对坐标位置
109-
也能很直观的知道当前的视野缩放倍数
118+
When enabled, the x-axis, y-axis, and scale numbers will be displayed
119+
This can be used to observe the absolute coordinates of some nodes
120+
It also provides a clear indication of the current zoom level
110121
windowBackgroundAlpha:
111122
title: Window Background Transparency
112123
showDebug:
@@ -130,21 +141,21 @@ settings:
130141
This is only a visual replacement and will not affect the actual data.
131142
You can turn it off and restore it after providing feedback.
132143
limitCameraInCycleSpace:
133-
title: 开启循环空间限制摄像机移动
144+
title: Enable Camera Movement Limitation in Cycle Space
134145
description: |
135-
开启后,摄像机只能在一个矩形区域内移动
136-
可以防止摄像机移动到很远的地方迷路
137-
该矩形区域会形成一个循环空间,类似于无边贪吃蛇游戏中的地图
138-
走到最上面会回到最下面,走到最左边会回到最右边
139-
注意:该功能还在实验阶段
146+
When enabled, the camera can only move within a rectangular area
147+
This prevents the camera from moving too far away and getting lost
148+
The rectangular area will form a cycle space, similar to the map in the classic Snake game
149+
Moving to the top will return the camera to the bottom, and moving to the left will return it to the right
150+
Note: This feature is still in the experimental stage
140151
cameraCycleSpaceSizeX:
141-
title: 循环空间宽度
152+
title: Cycle Space Width
142153
description: |
143-
循环空间的宽度,单位为像素
154+
The width of the cycle space, in pixels
144155
cameraCycleSpaceSizeY:
145-
title: 循环空间高度
156+
title: Cycle Space Height
146157
description: |
147-
循环空间的高度,单位为像素
158+
The height of the cycle space, in pixels
148159
renderEffect:
149160
title: Rendering Effect
150161
description: Whether to render special effects. If the application is lagging, you can turn this off.
@@ -167,13 +178,13 @@ settings:
167178
Enter `{{time}}` to automatically replace with the current time. The time will be updated automatically when you double-click to create a new node.
168179
You can combine them, for example, `{{i}}-{{date}}-{{time}}`.
169180
autoNamerSectionTemplate:
170-
title: 自动命名分组模板
181+
title: Auto Naming Section Template
171182
description: |
172-
输入`{{i}}` 代表节点名称会自动替换为编号,双击创建时可以自动累加数字。
173-
例如`n{{i}}` 会自动替换为`n1`, `n2`, `n3`...
174-
输入`{{date}}` 会自动替换为当前日期,双击创建时可以自动更新日期。
175-
输入`{{time}}` 会自动替换为当前时间,双击创建时可以自动更新时间。
176-
可以组合使用,例如`{{i}}-{{date}}-{{time}}`
183+
Enter `{{i}}` to automatically replace the node name with a number, which increments automatically when nodes are created by double-click.
184+
For example, `n{{i}}` will be automatically replaced with `n1`, `n2`, `n3`...
185+
Enter `{{date}}` to automatically replace it with the current date, which updates automatically when nodes are created by double-click.
186+
Enter `{{time}}` to automatically replace it with the current time, which updates automatically when nodes are created by double-click.
187+
These can be combined, for example `{{i}}-{{date}}-{{time}}`
177188
autoSaveWhenClose:
178189
title: Automatically save the project file when clicking the close button in the upper right corner of the window
179190
description: |
@@ -216,21 +227,21 @@ settings:
216227
A value of 1 means the scaling will be completed immediately without any intermediate transition effect.
217228
A value of 0 means the scaling will never be completed, which can simulate a locked effect.
218229
scaleCameraByMouseLocation:
219-
title: 视角缩放根据鼠标位置
230+
title: Scale Camera by Mouse Location
220231
description: |
221-
开启后,缩放视角的中心点是鼠标的位置
222-
关闭后,缩放视角的中心点是当前视野的中心
232+
When enabled, the center of the camera scaling will be the position of the mouse
233+
When disabled, the center of the camera scaling will be the center of the current view
223234
allowMoveCameraByWSAD:
224235
title: Allow camera movement with W S A D keys
225236
description: |
226237
When enabled, you can use the W S A D keys to move the camera up, down, left, and right.
227238
When disabled, you can only use the mouse to move the camera, avoiding the endless scroll bug.
228239
cameraKeyboardMoveReverse:
229-
title: 视角移动键盘反向
240+
title: Reverse Camera Movement with Keyboard
230241
description: |
231-
开启后,W S A D按键的移动视角方向会相反
232-
原本的移动逻辑是移动悬浮在画面上的摄像机,但有人会认为是移动画布,这样就反了
233-
于是就有了这个选项
242+
When enabled, the direction of camera movement using the W S A D keys will be reversed
243+
The original movement logic was to move the camera floating on the screen, but some users interpreted it as moving the canvas, which caused confusion
244+
Therefore, this option was introduced
234245
allowAddCycleEdge:
235246
title: Allow adding self-loops between nodes
236247
description: |
@@ -261,10 +272,9 @@ settings:
261272
cut: Cut and Delete Object
262273
moveCamera: Move View
263274
enableDragAutoAlign:
264-
title: 鼠标拖动自动对齐节点
275+
title: Enable Drag Auto Align Nodes
265276
description: |
266-
开启后,拖动节点并松开时会与其他节点在x轴、y轴方向对齐
267-
# Sounds
277+
When enabled, nodes will automatically align with other nodes along the x-axis and y-axis when dragged and released
268278
cuttingLineStartSoundFile:
269279
title: Cutting Line Start Sound File
270280
description: |
@@ -285,9 +295,9 @@ settings:
285295
description: |
286296
The moment of release is when the blade effect is visible.
287297
alignAndAttachSoundFile:
288-
title: 对齐的声音文件
298+
title: Align and Attach Sound File
289299
description: |
290-
鼠标拖动时,对齐节点和时播放的声音文件路径
300+
The file path of the sound played when nodes are aligned and attached during mouse dragging
291301
app:
292302
unsaved: "*"
293303
appMenu:
@@ -298,34 +308,35 @@ appMenu:
298308
open: Open
299309
save: Save
300310
saveAs: Save As
301-
recent: Recent Files
302-
backup: backup
311+
recent: Recents
312+
backup: Backup
303313
location:
304-
title: Location
314+
title: Dirs
305315
items:
306-
openDataFolder: Open Data Folder
307-
openProjectFolder: Open Project Folder
316+
openDataFolder: Data Folder
317+
openProjectFolder: Project Folder
308318
export:
309319
title: Export
310320
items:
311-
exportAsSVGByAll: Export as SVG (All)
312-
exportAsMarkdownBySelected: Export as Markdown (Selected)
321+
exportAsSVGByAll: Export all as SVG
322+
exportAsMarkdownBySelected: Export selected as Markdown
323+
exportAsPlainText: Export all as Plain Text
313324
view:
314325
title: View
315326
items:
316-
resetByAll: Reset View by All Content
317-
resetBySelect: Reset View by Selected Content
318-
resetScale: Reset the scale to the standard size
327+
resetByAll: Reset View
328+
resetBySelect: Reset View by selected
329+
resetScale: Scale to 100%
319330
more:
320331
title: More
321332
items:
322333
settings: Settings
323334
about: About
324-
welcome: Welcome Screen
335+
welcome: Welcome Page
325336
window:
326337
title: Window
327338
items:
328-
refresh: Refresh
339+
refresh: Reload app
329340
fullscreen: Full Screen
330341

331342
startFilePanel:
@@ -361,67 +372,66 @@ keyBinds:
361372
If no content is selected, reset the view based on all content;
362373
If content is selected, reset the view based on the selected content
363374
resetCameraScale:
364-
title: 重置缩放
365-
description: 将视野缩放重置为标准大小
375+
title: Reset Zoom Level
376+
description: Reset the view zoom level to the standard size
366377
folderSection:
367-
title: 折叠或展开Section框
368-
description: 按下后选中的Section框会切换折叠或展开状态
378+
title: Toggle Section Folder
379+
description: Press to toggle the selected Section folder between collapsed and expanded states
369380
reverseEdges:
370-
title: 反转连线的方向
381+
title: Reverse Selected Edge Direction
371382
description: |
372-
按下后,选中的连线的方向会变成相反方向
373-
例如,原先是 A -> B,按下后变成 B -> A
374-
此功能的意义在于快速创建一个节点连向多个节点的情况
375-
因为目前的连线只能一次性做到多连一。
383+
Press to reverse the direction of the selected edge
384+
For example, if the original direction was A -> B, pressing will change it to B -> A
385+
This feature is useful for quickly creating a node that connects to multiple nodes
386+
Since the current edge creation only supports one-to-many connections
376387
reverseSelectedNodeEdge:
377-
title: 反转选中的节点的所有连线的方向
388+
title: Reverse All Edges of Selected Nodes
378389
description: |
379-
按下后,所有框选选中的节点中
380-
每个节点的所有连线都会反转方向
381-
进而实现更快捷的一连多
390+
Press to reverse the direction of all edges connected to the selected nodes
391+
Each node's edges will be reversed, enabling faster one-to-many connections
382392
packEntityToSection:
383-
title: 将选中的实体打包到Section框中
393+
title: Pack Selected Entities into Section
384394
description: |
385-
按下后,选中的实体会自动包裹到新Section框中
395+
Press to automatically wrap the selected entities into a new Section folder
386396
deleteSelectedStageObjects:
387-
title: 删除选中的舞台物体
397+
title: Delete Selected Stage Objects
388398
description: |
389-
按下后,选中的舞台物体会被删除
390-
舞台物体包括实体(节点和Section等独立存在的东西)和关系(节点之间的连线)
391-
默认是delete键,您可以改成backspace键
399+
Press to delete the selected stage objects
400+
Stage objects include entities (nodes and Sections) and relationships (lines between nodes)
401+
The default key is the delete key, but you can change it to the backspace key
392402
editEntityDetails:
393-
title: 编辑选中的实体的详细信息
403+
title: Edit Selected Entity Details
394404
description: |
395-
按下后,选中的实体的详细信息会被打开编辑
396-
只有选中的物体数量为1时才有效
405+
Press to open the details of the selected entity for editing
406+
This option is only valid when exactly one object is selected
397407
openColorPanel:
398-
title: 打开颜色面板快捷键
408+
title: Open Color Panel Shortcut
399409
description: |
400-
按下后,打开颜色面板,可以用于快速切换节点颜色
410+
Press to open the color panel, which can be used to quickly change node colors
401411
createTextNodeFromCameraLocation:
402-
title: 创建文本节点
412+
title: Create Text Node
403413
description: |
404-
按下后,在当前视野中心的位置创建一个文本节点
405-
等同于鼠标双击创建节点的功能
414+
Press to create a text node at the center of the current view
415+
This is equivalent to the functionality of double-clicking to create a node
406416
createTextNodeFromSelectedTop:
407-
title: 在当前选中的节点正上方创建文本节点
417+
title: Create Text Node Above Selected Node
408418
description: |
409-
按下后,在当前选中的节点正上方创建一个文本节点
419+
Press to create a text node directly above the selected node
410420
createTextNodeFromSelectedDown:
411-
title: 在当前选中的节点正下方创建文本节点
421+
title: Create Text Node Below Selected Node
412422
description: |
413-
按下后,在当前选中的节点正下方创建一个文本节点
423+
Press to create a text node directly below the selected node
414424
createTextNodeFromSelectedLeft:
415-
title: 在当前选中的节点左侧创建文本节点
425+
title: Create Text Node to the Left of Selected Node
416426
description: |
417-
按下后,在当前选中的节点左侧创建一个文本节点
427+
Press to create a text node to the left of the selected node
418428
createTextNodeFromSelectedRight:
419-
title: 在当前选中的节点右侧创建文本节点
429+
title: Create Text Node to the Right of Selected Node
420430
description: |
421-
按下后,在当前选中的节点右侧创建一个文本节点
431+
Press to create a text node to the right of the selected node
422432
CameraScaleZoomIn:
423-
title: 放大视野
424-
description: 按下后,视野放大
433+
title: Zoom In on View
434+
description: Press to zoom in on the view
425435
CameraScaleZoomOut:
426-
title: 缩小视野
427-
description: 按下后,视野缩小
436+
title: Zoom Out on View
437+
description: Press to zoom out on the view

src/locales/zh-CN.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ welcome:
77
qq: QQ 群
88

99
about:
10+
updater:
11+
available: 新版本
12+
downloading: 下载中
13+
links:
14+
documentation: 文档
15+
github: Github
16+
video: 视频教程
17+
qq: QQ 群
18+
forum: 论坛
1019
intro:
1120
- 软件介绍
1221
- 这是一个基于tauri框架的快速绘制节点图的工具,可以用于项目拓扑图绘制、快速头脑风暴草稿
@@ -57,6 +66,7 @@ about:
5766
- 团队以浅蓝色和代码绿为代表颜色,象征着逻辑合理与整活幽默并存的团队文化。
5867

5968
settings:
69+
title: 设置
6070
tabs:
6171
about: 关于
6272
visual: 显示
@@ -322,6 +332,7 @@ appMenu:
322332
items:
323333
exportAsSVGByAll: 导出为SVG(全部)
324334
exportAsMarkdownBySelected: 导出为Markdown(选中)
335+
exportAsPlainText: 导出为纯文本
325336
view:
326337
title: 视图
327338
items:

src/pages/_app_menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ export default function AppMenu({
458458
{t("export.items.exportAsMarkdownBySelected")}
459459
</Col>
460460
<Col icon={<FileCode />} onClick={onExportTreeText}>
461-
导出纯文本
461+
{t("export.items.exportAsPlainText")}
462462
</Col>
463463
</Row>
464464
<Row icon={<View />} title={t("view.title")}>
@@ -499,7 +499,7 @@ export default function AppMenu({
499499
<Row icon={<AppWindow />} title={t("window.title")}>
500500
{import.meta.env.DEV && (
501501
<Col icon={<RefreshCcw />} onClick={() => window.location.reload()}>
502-
重载
502+
{t("window.items.refresh")}
503503
</Col>
504504
)}
505505
<Col

src/pages/settings/_layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Info,
66
Keyboard,
77
Plug,
8+
Settings,
89
Sparkles,
910
Speaker,
1011
} from "lucide-react";
@@ -17,7 +18,10 @@ export default function SettingsLayout() {
1718

1819
return (
1920
<div className="fixed bottom-20 left-20 right-20 top-24">
20-
<h1 className="text-3xl font-bold">设置</h1>
21+
<h1 className="flex items-center gap-2 text-3xl font-bold">
22+
<Settings className="h-8 w-8" />
23+
{t("title")}
24+
</h1>
2125
<div className="mt-4 flex h-full gap-8">
2226
<div className="flex flex-col gap-2 *:flex *:cursor-pointer *:items-center *:gap-2 *:rounded-full *:px-3 *:py-2 *:transition hover:*:bg-neutral-800 active:*:scale-90 page:*:bg-white/10">
2327
<NavLink to="/settings/about">

0 commit comments

Comments
 (0)