diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 76b18a11..08864bd1 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -77,7 +77,7 @@ CLOSE Cherry-Pick This Commit Copy SHA - Checkout commit${0} + Checkout Commit Rebase${0}$to Here Reset${0}$to Here Revert Commit diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 310a9aba..2f79f29e 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -76,7 +76,7 @@ 远程仓库 : 关闭 挑选(cherry-pick)此提交 - 检出提交${0} + 检出此提交 复制提交指纹 变基(rebase)${0}$到此处 重置(reset)${0}$到此处 diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index d1eb05d6..c28b4ade 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -236,11 +236,12 @@ namespace SourceGit.ViewModels menu.Items.Add(reset); var checkoutCommit = new MenuItem(); - checkoutCommit.Header = new Views.NameHighlightedTextBlock("CommitCM.Checkout", commit.SHA.Substring(0, 10)); + checkoutCommit.Header = App.Text("CommitCM.Checkout"); checkoutCommit.Icon = App.CreateMenuIcon("Icons.Check"); checkoutCommit.Click += (o, e) => { - _repo.CheckoutCommit(commit); + if (PopupHost.CanCreatePopup()) + PopupHost.ShowPopup(new CheckoutCommit(_repo, commit)); e.Handled = true; }; menu.Items.Add(checkoutCommit); diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index d2ea73fa..94a04172 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -721,14 +721,6 @@ namespace SourceGit.ViewModels else PopupHost.ShowAndStartPopup(new Checkout(this, branch)); } - - public void CheckoutCommit(Models.Commit commit) - { - if (!PopupHost.CanCreatePopup()) - return; - - PopupHost.ShowPopup(new CheckoutCommit(this, commit)); - } public void DeleteMultipleBranches(List branches, bool isLocal) {