Skip to content

Commit 1218da2

Browse files
committed
优化翻译
1 parent 5301df0 commit 1218da2

File tree

12 files changed

+81
-91
lines changed

12 files changed

+81
-91
lines changed

lib/domain/services/raw_keyboard_mouse.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ class RawKeyEventDataMouse extends RawKeyEventData {
2929
String get keyLabel {
3030
switch (id) {
3131
case leftClickId:
32-
return "Left Click";
32+
return "左键";
3333

3434
case middleClickId:
35-
return "Middle Click";
35+
return "中键";
3636

3737
case rightClickId:
38-
return "Right Click";
38+
return "右键";
3939

4040
case dragId:
41-
return "Drag";
41+
return "拖动";
4242

4343
case scrollId:
44-
return "Scroll";
44+
return "缩放";
4545
}
4646
return '';
4747
}

lib/providers/key_event.dart

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,43 +48,32 @@ enum ModifierKey {
4848

4949
// key visualization history mode
5050
enum VisualizationHistoryMode {
51-
none,
52-
vertical,
53-
horizontal;
51+
none("无"),
52+
vertical("垂直排列"),
53+
horizontal("水平排列");
54+
55+
const VisualizationHistoryMode(this.label);
56+
57+
final String label;
5458

5559
@override
56-
String toString() {
57-
return this == VisualizationHistoryMode.none
58-
? "无"
59-
: this == VisualizationHistoryMode.vertical
60-
? "垂直排列"
61-
: "水平排列";
62-
}
60+
String toString() => label;
6361
}
6462

6563
// keycap animation style
6664
enum KeyCapAnimationType {
67-
none,
68-
fade,
69-
wham,
70-
grow,
71-
slide;
65+
none("无动画"),
66+
fade("淡入淡出"),
67+
wham("冲击效果"),
68+
grow("放大效果"),
69+
slide("滑动效果");
70+
71+
const KeyCapAnimationType(this.label);
72+
73+
final String label;
7274

7375
@override
74-
String toString() {
75-
switch (this) {
76-
case KeyCapAnimationType.none:
77-
return "无动画";
78-
case KeyCapAnimationType.fade:
79-
return "淡入淡出";
80-
case KeyCapAnimationType.wham:
81-
return "冲击效果";
82-
case KeyCapAnimationType.grow:
83-
return "放大效果";
84-
case KeyCapAnimationType.slide:
85-
return "滑动效果";
86-
}
87-
}
76+
String toString() => label;
8877
}
8978

9079
extension on MouseEvent {

lib/providers/key_style.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ enum KeyCapStyle {
2222

2323
// text capitalization
2424
enum TextCap {
25-
upper("TT"),
26-
capitalize("Tt"),
27-
lower("tt");
25+
upper("TT", "大写"),
26+
capitalize("Tt", "首字母大写"),
27+
lower("tt", "小写");
2828

29-
const TextCap(this.symbol);
29+
const TextCap(this.symbol, this.label);
3030

3131
final String symbol;
32+
final String label;
3233

3334
@override
34-
String toString() => name.capitalize();
35+
String toString() => label;
3536
}
3637

3738
// modifier text length

lib/windows/settings/views/about.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class AboutView extends StatelessWidget {
7272
defaultPadding * 1.5,
7373
).copyWith(right: defaultPadding * 4),
7474
child: Text(
75-
"这是一个alpha测试版本,因此可能有BUG。"
75+
"这是一个alpha测试版本,因此有很多BUG。"
7676
"如果您发现任何错误请报告给我们!",
7777
style: context.textTheme.labelSmall?.copyWith(
7878
fontSize: 14,
@@ -114,9 +114,10 @@ class AboutView extends StatelessWidget {
114114
),
115115
IconButton(
116116
onPressed: () => launchUrl(
117-
Uri.parse("mailto:[email protected]"),
117+
Uri.parse(
118+
"https://mail.google.com/mail/u/0/#inbox?compose=DmwnWtMgBvjfGQMlLgJZwhjKxPxXLmmfCXbkrBKwrtdFgVwmlDQmmNRjhbJdnQzGhwwPMDsdQnLv"),
118119
),
119-
tooltip: "邮箱",
120+
tooltip: "邮箱[email protected]",
120121
icon: const SvgIcon(icon: VuesaxIcons.mail),
121122
),
122123
],
@@ -150,11 +151,11 @@ class AboutView extends StatelessWidget {
150151
const VerySmallColumnGap(),
151152
Text(
152153
"嗨,我是keyviz的开发者Rahul Mula。"
153-
"我是一名教练,我在线教课程\n\n"
154-
"录制我的屏幕时,我总是觉得需要"
155-
"向观众展示我的击键。那是我的时候"
156-
"决定开发keyviz,并与他人分享"
157-
"帮助像我这样的人。",
154+
"我是一名老师,在线上课\n\n"
155+
"在录制我的屏幕时,我总是觉得需要"
156+
"向观众展示我的按键。那时我"
157+
"决定开发keyviz,并与他人分享"
158+
"帮助和我有相同需求的人。",
158159
style: context.textTheme.bodyLarge,
159160
),
160161
],
@@ -180,9 +181,9 @@ class AboutView extends StatelessWidget {
180181
),
181182
const VerySmallColumnGap(),
182183
Text(
183-
"由于keyViz是免费软件,我唯一可以赚钱的方法是"
184+
"由于keyviz是免费软件,我唯一可以赚钱的方法是"
184185
"通过您的慷慨捐赠。这有助于解放我的时间"
185-
"并在keyviz上工作。",
186+
"并在keyviz上投入更多时间。",
186187
style: context.textTheme.bodyLarge,
187188
),
188189
const Spacer(),
@@ -192,14 +193,14 @@ class AboutView extends StatelessWidget {
192193
onPressed: () => launchUrlString(
193194
"https://github.com/sponsors/mulaRahul",
194195
),
195-
tooltip: "Github 赞助商",
196+
tooltip: "通过 Github 赞助",
196197
icon: const SvgIcon(icon: "assets/img/github-logo.svg"),
197198
),
198199
IconButton(
199200
onPressed: () => launchUrlString(
200201
"https://opencollective.com/keyviz",
201202
),
202-
tooltip: "Open Collective",
203+
tooltip: "通过 Open Collective 赞助",
203204
icon: SvgPicture.asset(
204205
"assets/img/opencollective-logo.svg",
205206
width: defaultPadding,

lib/windows/settings/views/mouse.dart

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MouseTabView extends StatelessWidget {
1717
children: [
1818
PanelItem(
1919
title: "鼠标点击可视化",
20-
subtitle: "按下鼠标按钮时显示单击",
20+
subtitle: "点击鼠标时显示高亮",
2121
action: Selector<KeyEventProvider, bool>(
2222
selector: (_, keyEvent) => keyEvent.showMouseClicks,
2323
builder: (context, showMouseClicks, _) => XSwitch(
@@ -34,7 +34,7 @@ class MouseTabView extends StatelessWidget {
3434
builder: (context, enabled, _) {
3535
return PanelItem(
3636
enabled: enabled,
37-
title: "单击动画",
37+
title: "点击动画",
3838
action: Selector<KeyStyleProvider, MouseClickAnimation>(
3939
selector: (_, keyStyle) => keyStyle.clickAnimation,
4040
builder: (context, value, _) {
@@ -55,11 +55,11 @@ class MouseTabView extends StatelessWidget {
5555
selector: (_, keyEvent) => keyEvent.showMouseClicks,
5656
builder: (context, enabled, _) => PanelItem(
5757
enabled: enabled,
58-
title: "单击颜色",
58+
title: "高亮颜色",
5959
subtitle: "鼠标光标周围高亮的颜色",
6060
actionFlex: 2,
6161
action: RawColorInputSubPanelItem(
62-
label: "鼠标单击颜色",
62+
label: "鼠标高亮颜色",
6363
defaultValue: context.keyStyle.clickColor,
6464
onChanged: (color) => context.keyStyle.clickColor = color,
6565
),
@@ -85,11 +85,10 @@ class MouseTabView extends StatelessWidget {
8585
),
8686
const Divider(),
8787
PanelItem(
88-
title: "阻力阈值",
89-
subtitle:
90-
"显示阻力事件的最小距离。设置为更高的值,以避免意外阻力。",
88+
title: "拖动阈值",
89+
subtitle: "显示拖动事件的最小距离。设置为较高的值,可避免意外显示拖动事件。",
9190
action: XNumberInput(
92-
title: "阻力阈值",
91+
title: "拖动阈值",
9392
suffix: "px",
9493
defaultValue: context.keyEvent.dragThreshold.toInt(),
9594
onChanged: (value) {
@@ -100,7 +99,7 @@ class MouseTabView extends StatelessWidget {
10099
const Divider(),
101100
PanelItem(
102101
title: "显示鼠标事件",
103-
subtitle: "可视化鼠标事件,例如点击,拖动等以及关键事件",
102+
subtitle: "可视化鼠标事件,例如点击,拖动等事件",
104103
action: Selector<KeyEventProvider, bool>(
105104
selector: (_, keyEvent) => keyEvent.showMouseEvents,
106105
builder: (context, showMouseEvents, _) => XSwitch(

lib/windows/settings/views/style/border.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class BorderView extends StatelessWidget {
3737
if (!differentColors)
3838
RawColorInputSubPanelItem(
3939
enabled: enabled,
40-
label: "Border Color",
40+
label: "边框颜色",
4141
defaultValue: context.keyStyle.borderColor,
4242
onChanged: (color) {
4343
context.keyStyle.borderColor = color;
@@ -49,11 +49,11 @@ class BorderView extends StatelessWidget {
4949
const VerySmallColumnGap(),
5050
SubPanelItem(
5151
enabled: enabled,
52-
title: "常规",
52+
title: "常规键",
5353
child: SizedBox(
5454
width: defaultPadding * 10,
5555
child: RawColorInputSubPanelItem(
56-
label: "Normal Border Color",
56+
label: "常规键边框颜色",
5757
defaultValue: context.keyStyle.borderColor,
5858
onChanged: (color) {
5959
context.keyStyle.borderColor = color;
@@ -64,11 +64,11 @@ class BorderView extends StatelessWidget {
6464
const VerySmallColumnGap(),
6565
SubPanelItem(
6666
enabled: enabled,
67-
title: "【修饰】",
67+
title: "控制键",
6868
child: SizedBox(
6969
width: defaultPadding * 10,
7070
child: RawColorInputSubPanelItem(
71-
label: "Modifier Border Color",
71+
label: "【控制键】边框颜色",
7272
defaultValue: context.keyStyle.mBorderColor,
7373
onChanged: (color) {
7474
context.keyStyle.mBorderColor = color;
@@ -83,7 +83,7 @@ class BorderView extends StatelessWidget {
8383
const VerySmallColumnGap(),
8484
SubPanelItem(
8585
enabled: enabled,
86-
title: "Thickness",
86+
title: "厚度",
8787
child: Selector<KeyStyleProvider, double>(
8888
selector: (_, keyStyle) => keyStyle.borderWidth,
8989
builder: (context, borderWidth, _) => XSlider(
@@ -97,7 +97,7 @@ class BorderView extends StatelessWidget {
9797
),
9898
const VerySmallColumnGap(),
9999
SubPanelItem(
100-
title: "Rounded Corner",
100+
title: "圆角",
101101
child: Selector<KeyStyleProvider, double>(
102102
selector: (_, keyStyle) => keyStyle.cornerSmoothing,
103103
builder: (context, cornerSmoothing, _) {

0 commit comments

Comments
 (0)