mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 10:50:52 +08:00
code_review: PR #1521
- Remove `ConfigureAwait(false)` since we need go back to UIThread - Add Chinese translations for `Text.CommitCM.CopyCommitMessage` Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -119,8 +119,8 @@
|
||||
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">Compare with HEAD</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CompareWithWorktree" xml:space="preserve">Compare with Worktree</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyAuthor" xml:space="preserve">Author</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitter" xml:space="preserve">Committer</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitMessage" xml:space="preserve">Message</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitter" xml:space="preserve">Committer</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySubject" xml:space="preserve">Subject</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">Custom Action</x:String>
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">与当前HEAD比较</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CompareWithWorktree" xml:space="preserve">与本地工作树比较</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyAuthor" xml:space="preserve">作者</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitMessage" xml:space="preserve">提交信息</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitter" xml:space="preserve">提交者</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">提交指纹</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySubject" xml:space="preserve">主题</x:String>
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">與目前 HEAD 比較</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CompareWithWorktree" xml:space="preserve">與本機工作區比較</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyAuthor" xml:space="preserve">作者</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitMessage" xml:space="preserve">提交訊息</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyCommitter" xml:space="preserve">提交者</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">提交編號</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySubject" xml:space="preserve">標題</x:String>
|
||||
|
||||
@@ -845,13 +845,12 @@ namespace SourceGit.ViewModels
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
var copyFullInfo = new MenuItem();
|
||||
copyFullInfo.Header = App.Text("CommitCM.CopyCommitMessage");
|
||||
copyFullInfo.Icon = App.CreateMenuIcon("Icons.Info");
|
||||
copyFullInfo.Click += async (_, e) =>
|
||||
var copyMessage = new MenuItem();
|
||||
copyMessage.Header = App.Text("CommitCM.CopyCommitMessage");
|
||||
copyMessage.Icon = App.CreateMenuIcon("Icons.Info");
|
||||
copyMessage.Click += async (_, e) =>
|
||||
{
|
||||
var message = await new Commands.QueryCommitFullMessage(_repo.FullPath, commit.SHA).
|
||||
GetResultAsync().ConfigureAwait(false);
|
||||
var message = await new Commands.QueryCommitFullMessage(_repo.FullPath, commit.SHA).GetResultAsync();
|
||||
await App.CopyTextAsync(message);
|
||||
e.Handled = true;
|
||||
};
|
||||
@@ -880,7 +879,7 @@ namespace SourceGit.ViewModels
|
||||
copy.Items.Add(copySHA);
|
||||
copy.Items.Add(copySubject);
|
||||
copy.Items.Add(copyInfo);
|
||||
copy.Items.Add(copyFullInfo);
|
||||
copy.Items.Add(copyMessage);
|
||||
copy.Items.Add(copyAuthor);
|
||||
copy.Items.Add(copyCommitter);
|
||||
menu.Items.Add(copy);
|
||||
|
||||
Reference in New Issue
Block a user