code_review: PR #795

* update zh_CN and zh_TW translations
* simplify calling `Welcome.Clone`
This commit is contained in:
leo 2024-12-09 16:44:16 +08:00
parent 3990cc9452
commit ee3942fec6
No known key found for this signature in database
3 changed files with 4 additions and 8 deletions

View file

@ -360,6 +360,7 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快捷键参考</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全局快捷键</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消弹出面板</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">克隆远程仓库</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">关闭当前页面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切换到上一个页面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切换到下一个页面</x:String>

View file

@ -360,6 +360,7 @@
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快速鍵參考</x:String>
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全域快速鍵</x:String>
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消彈出面板</x:String>
<x:String x:Key="Text.Hotkeys.Global.Clone" xml:space="preserve">複製 (clone) 遠端存放庫</x:String>
<x:String x:Key="Text.Hotkeys.Global.CloseTab" xml:space="preserve">關閉目前頁面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">切換到上一個頁面</x:String>
<x:String x:Key="Text.Hotkeys.Global.GotoNextTab" xml:space="preserve">切換到下一個頁面</x:String>

View file

@ -139,15 +139,9 @@ namespace SourceGit.Views
if (e.Key == Key.N)
{
if (vm.ActivePage.Data is not ViewModels.Welcome)
{
vm.AddNewTab();
}
if (vm.ActivePage.Data is ViewModels.Welcome welcome)
{
welcome.Clone();
}
ViewModels.Welcome.Instance.Clone();
e.Handled = true;
return;
}