Skip to content

Commit f163133

Browse files
authored
Merge pull request #18 from vbenjs/tabbar-contextmenu
chore: add translation for tabbar context menu
2 parents fa78163 + 3d45b41 commit f163133

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

packages/business/layouts/src/basic/tabbar/use-tabs.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function useTabs() {
116116
},
117117
icon: IcRoundRefresh,
118118
key: 'reload',
119-
text: '重新加载',
119+
text: $t('preferences.tabbar.context-menu.reload'),
120120
},
121121
{
122122
disabled: !!affixTab || disabled,
@@ -125,7 +125,7 @@ function useTabs() {
125125
},
126126
icon: IcRoundClose,
127127
key: 'close',
128-
text: '关闭标签页',
128+
text: $t('preferences.tabbar.context-menu.close'),
129129
},
130130
{
131131
handler: async () => {
@@ -136,7 +136,9 @@ function useTabs() {
136136
icon: affixTab ? MdiPinOff : MdiPin,
137137
key: 'affix',
138138
separator: true,
139-
text: affixTab ? '取消固定标签页' : '固定标签页',
139+
text: affixTab
140+
? $t('preferences.tabbar.context-menu.unpin')
141+
: $t('preferences.tabbar.context-menu.pin'),
140142
},
141143
{
142144
disabled: closeLeftDisabled,
@@ -145,7 +147,7 @@ function useTabs() {
145147
},
146148
icon: MdiFormatHorizontalAlignLeft,
147149
key: 'close-left',
148-
text: '关闭左侧标签页',
150+
text: $t('preferences.tabbar.context-menu.close-left'),
149151
},
150152
{
151153
disabled: closeRightDisabled,
@@ -155,7 +157,7 @@ function useTabs() {
155157
icon: MdiFormatHorizontalAlignRight,
156158
key: 'close-right',
157159
separator: true,
158-
text: '关闭右侧标签页',
160+
text: $t('preferences.tabbar.context-menu.close-right'),
159161
},
160162
{
161163
disabled: closeOtherDisabled,
@@ -164,7 +166,7 @@ function useTabs() {
164166
},
165167
icon: MdiArrowExpandHorizontal,
166168
key: 'close-other',
167-
text: '关闭其他标签页',
169+
text: $t('preferences.tabbar.context-menu.close-other'),
168170
},
169171
{
170172
disabled,
@@ -173,7 +175,7 @@ function useTabs() {
173175
},
174176
icon: IcRoundMultipleStop,
175177
key: 'close-all',
176-
text: '关闭全部标签页',
178+
text: $t('preferences.tabbar.context-menu.close-all'),
177179
},
178180
// {
179181
// icon: 'icon-[material-symbols--back-to-tab-sharp]',

packages/locales/src/langs/en-US.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ preferences:
178178
title: Tabbar
179179
enable: Enable Tab Bar
180180
icon: Display Tabbar Icon
181+
context-menu:
182+
reload: Reload
183+
close: Close
184+
pin: Pin
185+
unpin: Unpin
186+
close-left: Close Left
187+
close-right: Close Right
188+
close-other: Close Other
189+
close-all: Close All
181190
navigation-menu:
182191
title: Navigation Menu
183192
style: Navigation menu style

packages/locales/src/langs/zh-CN.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ preferences:
178178
title: 标签栏
179179
enable: 启用标签栏
180180
icon: 显示标签栏图标
181+
context-menu:
182+
reload: 重新加载
183+
close: 关闭标签页
184+
pin: 固定标签页
185+
unpin: 取消固定标签页
186+
close-left: 关闭左侧标签页
187+
close-right: 关闭右侧标签页
188+
close-other: 关闭其它标签页
189+
close-all: 关闭全部标签页
181190
navigation-menu:
182191
title: 导航菜单
183192
style: 导航菜单风格

0 commit comments

Comments
 (0)