Skip to content

Commit ee3942f

Browse files
committed
code_review: PR #795
* update zh_CN and zh_TW translations * simplify calling `Welcome.Clone`
1 parent 3990cc9 commit ee3942f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/Resources/Locales/zh_CN.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@
360360
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快捷键参考</x:String>
361361
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全局快捷键</x:String>
362362
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消弹出面板</x:String>
363+
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">克隆远程仓库</x:String>
363364
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">关闭当前页面</x:String>
364365
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切换到上一个页面</x:String>
365366
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切换到下一个页面</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@
360360
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快速鍵參考</x:String>
361361
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全域快速鍵</x:String>
362362
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消彈出面板</x:String>
363+
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">複製 (clone) 遠端存放庫</x:String>
363364
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">關閉目前頁面</x:String>
364365
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切換到上一個頁面</x:String>
365366
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切換到下一個頁面</x:String>

src/Views/Launcher.axaml.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,9 @@ protected override void OnKeyDown(KeyEventArgs e)
139139
if (e.Key == Key.N)
140140
{
141141
if (vm.ActivePage.Data is not ViewModels.Welcome)
142-
{
143142
vm.AddNewTab();
144-
}
145-
146-
if (vm.ActivePage.Data is ViewModels.Welcome welcome)
147-
{
148-
welcome.Clone();
149-
}
150-
143+
144+
ViewModels.Welcome.Instance.Clone();
151145
e.Handled = true;
152146
return;
153147
}

0 commit comments

Comments
 (0)