@@ -29,11 +29,14 @@ import {
2929} from "lucide-react" ;
3030import { FieldGroup , SettingField } from "../../components/Field" ;
3131import { isMac } from "../../utils/platform" ;
32+ import { useTranslation } from "react-i18next" ;
3233
3334export default function Control ( ) {
35+ const { t } = useTranslation ( "controlSettingsGroup" ) ;
36+
3437 return (
3538 < >
36- < FieldGroup title = "Mouse 鼠标设定" icon = { < Mouse /> } >
39+ < FieldGroup title = { t ( "mouse.title" ) } icon = { < Mouse /> } >
3740 < SettingField icon = { < MousePointerClick /> } settingKey = "mouseRightDragBackground" type = "select" />
3841 < SettingField icon = { < AlignStartVertical /> } settingKey = "enableDragAutoAlign" type = "switch" />
3942 < SettingField icon = { < Mouse /> } settingKey = "mouseWheelMode" type = "select" />
@@ -44,7 +47,7 @@ export default function Control() {
4447 < SettingField icon = { < Grab /> } settingKey = "mouseSideWheelMode" type = "select" />
4548 { isMac && < SettingField icon = { < Mouse /> } settingKey = "macMouseWheelIsSmoothed" type = "switch" /> }
4649 </ FieldGroup >
47- < FieldGroup title = "TouchPad 触摸板设定" icon = { < Touchpad /> } >
50+ < FieldGroup title = { t ( "touchpad.title" ) } icon = { < Touchpad /> } >
4851 < SettingField icon = { < Hand /> } settingKey = "enableWindowsTouchPad" type = "switch" />
4952 { isMac && < SettingField icon = { < Hand /> } settingKey = "macTrackpadAndMouseWheelDifference" type = "select" /> }
5053 { isMac && (
@@ -58,14 +61,14 @@ export default function Control() {
5861 />
5962 ) }
6063 </ FieldGroup >
61- < FieldGroup title = "Camera Move 摄像机/视野 移动" icon = { < Fullscreen /> } >
64+ < FieldGroup title = { t ( "cameraMove.title" ) } icon = { < Fullscreen /> } >
6265 < SettingField icon = { < Keyboard /> } settingKey = "allowMoveCameraByWSAD" type = "switch" />
6366 < SettingField icon = { < Crosshair /> } settingKey = "cameraFollowsSelectedNodeOnArrowKeys" type = "switch" />
6467 < SettingField icon = { < Keyboard /> } settingKey = "cameraKeyboardMoveReverse" type = "switch" />
6568 < SettingField icon = { < Move /> } settingKey = "moveAmplitude" type = "slider" min = { 0 } max = { 10 } step = { 0.1 } />
6669 < SettingField icon = { < Move /> } settingKey = "moveFriction" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
6770 </ FieldGroup >
68- < FieldGroup title = "Camera Scale 摄像机/视野 缩放" icon = { < Scaling /> } >
71+ < FieldGroup title = { t ( "cameraZoom.title" ) } icon = { < Scaling /> } >
6972 < SettingField icon = { < ScanEye /> } settingKey = "scaleExponent" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
7073 < SettingField
7174 icon = { < Fullscreen /> }
@@ -85,12 +88,12 @@ export default function Control() {
8588 step = { 0.1 }
8689 />
8790 </ FieldGroup >
88- < FieldGroup title = "RectangleSelect 框选" icon = { < SquareDashedMousePointer /> } >
91+ < FieldGroup title = { t ( "rectangleSelect.title" ) } icon = { < SquareDashedMousePointer /> } >
8992 < SettingField icon = { < SquareArrowDownRight /> } settingKey = "rectangleSelectWhenRight" type = "select" />
9093 < SettingField icon = { < SquareArrowUpLeft /> } settingKey = "rectangleSelectWhenLeft" type = "select" />
9194 </ FieldGroup >
9295
93- < FieldGroup title = "TextNode 文本节点" icon = { < TextSelect /> } >
96+ < FieldGroup title = { t ( "textNode.title" ) } icon = { < TextSelect /> } >
9497 < SettingField icon = { < ListRestart /> } settingKey = "textNodeStartEditMode" type = "select" />
9598 < SettingField icon = { < ListEnd /> } settingKey = "textNodeContentLineBreak" type = "select" />
9699 < SettingField icon = { < ListCheck /> } settingKey = "textNodeExitEditMode" type = "select" />
@@ -102,14 +105,14 @@ export default function Control() {
102105 < SettingField icon = { < TextCursorInput /> } settingKey = "textNodeSelectAllWhenStartEditByKeyboard" type = "switch" />
103106 </ FieldGroup >
104107
105- < FieldGroup title = "Edge 连线" icon = { < GitCompareArrows /> } >
108+ < FieldGroup title = { t ( "edge.title" ) } icon = { < GitCompareArrows /> } >
106109 < SettingField icon = { < RotateCw /> } settingKey = "allowAddCycleEdge" type = "switch" />
107110 </ FieldGroup >
108- < FieldGroup title = "GenerateNode 通过键盘生长节点" icon = { < Network className = "-rotate-90" /> } >
111+ < FieldGroup title = { t ( "generateNode.title" ) } icon = { < Network className = "-rotate-90" /> } >
109112 < SettingField icon = { < ListTree /> } settingKey = "autoLayoutWhenTreeGenerate" type = "switch" />
110113 </ FieldGroup >
111114
112- < FieldGroup title = "Gamepad 手柄相关" icon = { < Gamepad2 /> } >
115+ < FieldGroup title = { t ( "gamepad.title" ) } icon = { < Gamepad2 /> } >
113116 < SettingField icon = { < Skull /> } settingKey = "gamepadDeadzone" type = "slider" min = { 0 } max = { 1 } step = { 0.01 } />
114117 </ FieldGroup >
115118 { /* 已经有快捷键专栏了,这里不再显示快捷键相关 */ }
0 commit comments