@@ -29,11 +29,14 @@ import {
29
29
} from "lucide-react" ;
30
30
import { FieldGroup , SettingField } from "../../components/Field" ;
31
31
import { isMac } from "../../utils/platform" ;
32
+ import { useTranslation } from "react-i18next" ;
32
33
33
34
export default function Control ( ) {
35
+ const { t } = useTranslation ( "controlSettingsGroup" ) ;
36
+
34
37
return (
35
38
< >
36
- < FieldGroup title = "Mouse 鼠标设定" icon = { < Mouse /> } >
39
+ < FieldGroup title = { t ( "mouse.title" ) } icon = { < Mouse /> } >
37
40
< SettingField icon = { < MousePointerClick /> } settingKey = "mouseRightDragBackground" type = "select" />
38
41
< SettingField icon = { < AlignStartVertical /> } settingKey = "enableDragAutoAlign" type = "switch" />
39
42
< SettingField icon = { < Mouse /> } settingKey = "mouseWheelMode" type = "select" />
@@ -44,7 +47,7 @@ export default function Control() {
44
47
< SettingField icon = { < Grab /> } settingKey = "mouseSideWheelMode" type = "select" />
45
48
{ isMac && < SettingField icon = { < Mouse /> } settingKey = "macMouseWheelIsSmoothed" type = "switch" /> }
46
49
</ FieldGroup >
47
- < FieldGroup title = "TouchPad 触摸板设定" icon = { < Touchpad /> } >
50
+ < FieldGroup title = { t ( "touchpad.title" ) } icon = { < Touchpad /> } >
48
51
< SettingField icon = { < Hand /> } settingKey = "enableWindowsTouchPad" type = "switch" />
49
52
{ isMac && < SettingField icon = { < Hand /> } settingKey = "macTrackpadAndMouseWheelDifference" type = "select" /> }
50
53
{ isMac && (
@@ -58,14 +61,14 @@ export default function Control() {
58
61
/>
59
62
) }
60
63
</ FieldGroup >
61
- < FieldGroup title = "Camera Move 摄像机/视野 移动" icon = { < Fullscreen /> } >
64
+ < FieldGroup title = { t ( "cameraMove.title" ) } icon = { < Fullscreen /> } >
62
65
< SettingField icon = { < Keyboard /> } settingKey = "allowMoveCameraByWSAD" type = "switch" />
63
66
< SettingField icon = { < Crosshair /> } settingKey = "cameraFollowsSelectedNodeOnArrowKeys" type = "switch" />
64
67
< SettingField icon = { < Keyboard /> } settingKey = "cameraKeyboardMoveReverse" type = "switch" />
65
68
< SettingField icon = { < Move /> } settingKey = "moveAmplitude" type = "slider" min = { 0 } max = { 10 } step = { 0.1 } />
66
69
< SettingField icon = { < Move /> } settingKey = "moveFriction" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
67
70
</ FieldGroup >
68
- < FieldGroup title = "Camera Scale 摄像机/视野 缩放" icon = { < Scaling /> } >
71
+ < FieldGroup title = { t ( "cameraZoom.title" ) } icon = { < Scaling /> } >
69
72
< SettingField icon = { < ScanEye /> } settingKey = "scaleExponent" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
70
73
< SettingField
71
74
icon = { < Fullscreen /> }
@@ -85,12 +88,12 @@ export default function Control() {
85
88
step = { 0.1 }
86
89
/>
87
90
</ FieldGroup >
88
- < FieldGroup title = "RectangleSelect 框选" icon = { < SquareDashedMousePointer /> } >
91
+ < FieldGroup title = { t ( "rectangleSelect.title" ) } icon = { < SquareDashedMousePointer /> } >
89
92
< SettingField icon = { < SquareArrowDownRight /> } settingKey = "rectangleSelectWhenRight" type = "select" />
90
93
< SettingField icon = { < SquareArrowUpLeft /> } settingKey = "rectangleSelectWhenLeft" type = "select" />
91
94
</ FieldGroup >
92
95
93
- < FieldGroup title = "TextNode 文本节点" icon = { < TextSelect /> } >
96
+ < FieldGroup title = { t ( "textNode.title" ) } icon = { < TextSelect /> } >
94
97
< SettingField icon = { < ListRestart /> } settingKey = "textNodeStartEditMode" type = "select" />
95
98
< SettingField icon = { < ListEnd /> } settingKey = "textNodeContentLineBreak" type = "select" />
96
99
< SettingField icon = { < ListCheck /> } settingKey = "textNodeExitEditMode" type = "select" />
@@ -102,14 +105,14 @@ export default function Control() {
102
105
< SettingField icon = { < TextCursorInput /> } settingKey = "textNodeSelectAllWhenStartEditByKeyboard" type = "switch" />
103
106
</ FieldGroup >
104
107
105
- < FieldGroup title = "Edge 连线" icon = { < GitCompareArrows /> } >
108
+ < FieldGroup title = { t ( "edge.title" ) } icon = { < GitCompareArrows /> } >
106
109
< SettingField icon = { < RotateCw /> } settingKey = "allowAddCycleEdge" type = "switch" />
107
110
</ FieldGroup >
108
- < FieldGroup title = "GenerateNode 通过键盘生长节点" icon = { < Network className = "-rotate-90" /> } >
111
+ < FieldGroup title = { t ( "generateNode.title" ) } icon = { < Network className = "-rotate-90" /> } >
109
112
< SettingField icon = { < ListTree /> } settingKey = "autoLayoutWhenTreeGenerate" type = "switch" />
110
113
</ FieldGroup >
111
114
112
- < FieldGroup title = "Gamepad 手柄相关" icon = { < Gamepad2 /> } >
115
+ < FieldGroup title = { t ( "gamepad.title" ) } icon = { < Gamepad2 /> } >
113
116
< SettingField icon = { < Skull /> } settingKey = "gamepadDeadzone" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
114
117
</ FieldGroup >
115
118
{ /* 已经有快捷键专栏了,这里不再显示快捷键相关 */ }
0 commit comments