Skip to content

Commit 5301df0

Browse files
committed
优化翻译和显示器选项逻辑
1 parent d4db4d3 commit 5301df0

File tree

7 files changed

+37
-39
lines changed

7 files changed

+37
-39
lines changed

lib/providers/key_style.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ enum TextCap {
3737
// modifier text length
3838
enum ModifierTextLength {
3939
iconOnly("仅图标"),
40-
shortLength("简略信息"),
41-
fullLength("全部信息");
40+
shortLength("缩写"),
41+
fullLength("不缩写");
4242

4343
const ModifierTextLength(this.label);
4444

lib/windows/settings/views/appearance.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ class AppearanceTabView extends StatelessWidget {
1616
Widget build(BuildContext context) {
1717
return Column(
1818
children: [
19-
if (context.keyEvent.screens.length > 1) ...[
20-
PanelItem(
21-
title: "显示",
22-
subtitle: "更改监视器/显示以进行可视化。"
23-
"如果行为异常,可能需要重新启动。",
24-
action: Selector<KeyEventProvider, int>(
25-
selector: (_, keyEvent) => keyEvent.screenIndex,
26-
builder: (context, value, _) => XDropdown<int>(
27-
value: value,
28-
options: List.generate(
29-
context.keyEvent.screens.length,
30-
(i) => i,
31-
),
32-
labelBuilder: (option) => "显示器 ${option + 1}",
33-
onChanged: (value) => context.keyEvent.screenIndex = value,
19+
PanelItem(
20+
title: "显示器",
21+
subtitle: "更改监视器/显示器以进行显示。"
22+
"如果行为异常,可能需要重新启动。",
23+
action: Selector<KeyEventProvider, int>(
24+
selector: (_, keyEvent) => keyEvent.screenIndex,
25+
builder: (context, value, _) => XDropdown<int>(
26+
value: value,
27+
options: List.generate(
28+
context.keyEvent.screens.length,
29+
(i) => i,
3430
),
31+
labelBuilder: (option) => context.keyEvent.screens.length > 1
32+
? "显示器 ${option + 1}"
33+
: "唯一显示器",
34+
onChanged: (value) => context.keyEvent.screenIndex = value,
3535
),
3636
),
37-
const Divider(),
38-
],
37+
),
38+
const Divider(),
3939
PanelItem(
4040
title: "对齐",
4141
subtitle: "关键可视化在屏幕上的位置。如果启用了历史记录,则此处将显示最新的键",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class BackgroundView extends StatelessWidget {
2121
SubPanelItemGroup(
2222
items: [
2323
RawSubPanelItem(
24-
title: "Enable",
24+
title: "启用",
2525
child: XSwitch(
2626
value: enabled,
2727
onChange: (value) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BorderView extends StatelessWidget {
2626
SubPanelItemGroup(
2727
items: [
2828
RawSubPanelItem(
29-
title: "Enable",
29+
title: "启用",
3030
child: XSwitch(
3131
value: enabled,
3232
onChange: (value) {
@@ -49,7 +49,7 @@ class BorderView extends StatelessWidget {
4949
const VerySmallColumnGap(),
5050
SubPanelItem(
5151
enabled: enabled,
52-
title: "Normal",
52+
title: "常规",
5353
child: SizedBox(
5454
width: defaultPadding * 10,
5555
child: RawColorInputSubPanelItem(
@@ -64,7 +64,7 @@ class BorderView extends StatelessWidget {
6464
const VerySmallColumnGap(),
6565
SubPanelItem(
6666
enabled: enabled,
67-
title: "Modifier",
67+
title: "【修饰】",
6868
child: SizedBox(
6969
width: defaultPadding * 10,
7070
child: RawColorInputSubPanelItem(

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ColorView extends StatelessWidget {
2424
return Row(
2525
children: [
2626
XTextButton(
27-
"Solid",
27+
"实心",
2828
selected: !isGradient,
2929
onTap: () => context.keyStyle.isGradient = false,
3030
),
@@ -36,13 +36,13 @@ class ColorView extends StatelessWidget {
3636
builder: (context, disabled, _) {
3737
return disabled
3838
? Tooltip(
39-
message: "Solid is fine",
39+
message: "实心 is fine",
4040
child: Padding(
4141
padding: const EdgeInsets.symmetric(
4242
horizontal: defaultPadding * .6,
4343
),
4444
child: Text(
45-
"Gradient",
45+
"梯度",
4646
style: context.textTheme.labelSmall?.copyWith(
4747
fontSize: 14,
4848
color: context.colorScheme.tertiary
@@ -52,7 +52,7 @@ class ColorView extends StatelessWidget {
5252
),
5353
)
5454
: XTextButton(
55-
"Gradient",
55+
"梯度",
5656
selected: isGradient,
5757
onTap: () => context.keyStyle.isGradient = true,
5858
);
@@ -82,9 +82,7 @@ class ColorView extends StatelessWidget {
8282
),
8383
const VerySmallRowGap(),
8484
IconButton(
85-
tooltip: differentColors
86-
? "Link modifier color"
87-
: "Separate modifier color",
85+
tooltip: differentColors ? "与【修饰】颜色同步" : "与【修饰】颜色分离",
8886
onPressed: () {
8987
context.keyStyle.differentColorForModifiers =
9088
!differentColors;
@@ -97,7 +95,7 @@ class ColorView extends StatelessWidget {
9795
),
9896
const VerySmallRowGap(),
9997
Text(
100-
"Modifier",
98+
"【修饰】",
10199
style: context.textTheme.titleSmall?.copyWith(
102100
color: context.colorScheme.tertiary
103101
.withOpacity(differentColors ? .25 : 1),
@@ -199,7 +197,7 @@ class ColorView extends StatelessWidget {
199197
bottom: defaultPadding * .5,
200198
),
201199
child: Text(
202-
"Modifier",
200+
"【修饰】",
203201
style: context.textTheme.titleSmall?.copyWith(
204202
color: context.colorScheme.tertiary,
205203
),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class LayoutView extends StatelessWidget {
9494
keyStyle.keyCapStyle != KeyCapStyle.minimal,
9595
builder: (_, enabled, child) => SubPanelItem(
9696
enabled: enabled,
97-
title: "Symbol",
97+
title: "符号",
9898
child: child!,
9999
),
100100
child: Selector<KeyStyleProvider, bool>(

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ class TypographyView extends StatelessWidget {
3838
),
3939
const VerySmallColumnGap(),
4040
SubPanelItem(
41-
title: "普通颜色",
41+
title: "颜色",
4242
child: SizedBox(
4343
width: defaultPadding * 10,
4444
child: RawColorInputSubPanelItem(
45-
label: "普通字体颜色",
45+
label: "字体颜色",
4646
defaultValue: context.keyStyle.fontColor,
4747
onChanged: (Color value) {
4848
context.keyStyle.fontColor = value;
@@ -52,11 +52,11 @@ class TypographyView extends StatelessWidget {
5252
),
5353
const VerySmallColumnGap(),
5454
SubPanelItem(
55-
title: "编辑颜色(Edit Color)",
55+
title: "编辑时的颜色",
5656
child: SizedBox(
5757
width: defaultPadding * 10,
5858
child: RawColorInputSubPanelItem(
59-
label: "编辑字体颜色(Edit Font Color)",
59+
label: "编辑时的字体颜色",
6060
defaultValue: context.keyStyle.mFontColor,
6161
onChanged: (Color value) {
6262
context.keyStyle.mFontColor = value;
@@ -91,7 +91,7 @@ class TypographyView extends StatelessWidget {
9191
SubPanelItemGroup(
9292
items: [
9393
RawSubPanelItem(
94-
title: "Caps",
94+
title: "大小写",
9595
child: Selector<KeyStyleProvider, TextCap>(
9696
selector: (_, keyStyle) => keyStyle.textCap,
9797
builder: (context, textCap, _) => Row(
@@ -128,7 +128,7 @@ class TypographyView extends StatelessWidget {
128128
),
129129
),
130130
RawSubPanelItem(
131-
title: "Modifier",
131+
title: "描述信息",
132132
child: SizedBox(
133133
width: defaultPadding * 5,
134134
child: Selector<KeyStyleProvider, ModifierTextLength>(

0 commit comments

Comments
 (0)