ux: use another label Submodule.CopyBranch instead of Submodule.Branch

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-07-30 10:57:25 +08:00
parent 42afd96da7
commit 072b7f8af5
4 changed files with 12 additions and 9 deletions

View File

@@ -759,6 +759,7 @@
<x:String x:Key="Text.Submodule" xml:space="preserve">SUBMODULES</x:String>
<x:String x:Key="Text.Submodule.Add" xml:space="preserve">Add Submodule</x:String>
<x:String x:Key="Text.Submodule.Branch" xml:space="preserve">BRANCH</x:String>
<x:String x:Key="Text.Submodule.CopyBranch" xml:space="preserve">Branch</x:String>
<x:String x:Key="Text.Submodule.CopyPath" xml:space="preserve">Relative Path</x:String>
<x:String x:Key="Text.Submodule.Deinit" xml:space="preserve">De-initialize</x:String>
<x:String x:Key="Text.Submodule.FetchNested" xml:space="preserve">Fetch nested submodules</x:String>

View File

@@ -763,6 +763,7 @@
<x:String x:Key="Text.Submodule" xml:space="preserve">子模块</x:String>
<x:String x:Key="Text.Submodule.Add" xml:space="preserve">添加子模块</x:String>
<x:String x:Key="Text.Submodule.Branch" xml:space="preserve">跟踪分支</x:String>
<x:String x:Key="Text.Submodule.CopyBranch" xml:space="preserve">跟踪分支</x:String>
<x:String x:Key="Text.Submodule.CopyPath" xml:space="preserve">相对路径</x:String>
<x:String x:Key="Text.Submodule.Deinit" xml:space="preserve">取消初始化</x:String>
<x:String x:Key="Text.Submodule.FetchNested" xml:space="preserve">拉取子孙模块</x:String>

View File

@@ -763,6 +763,7 @@
<x:String x:Key="Text.Submodule" xml:space="preserve">子模組</x:String>
<x:String x:Key="Text.Submodule.Add" xml:space="preserve">新增子模組</x:String>
<x:String x:Key="Text.Submodule.Branch" xml:space="preserve">追蹤分支</x:String>
<x:String x:Key="Text.Submodule.CopyBranch" xml:space="preserve">追蹤分支</x:String>
<x:String x:Key="Text.Submodule.CopyPath" xml:space="preserve">相對路徑</x:String>
<x:String x:Key="Text.Submodule.Deinit" xml:space="preserve">取消初始化</x:String>
<x:String x:Key="Text.Submodule.FetchNested" xml:space="preserve">提取子模組</x:String>

View File

@@ -261,6 +261,15 @@ namespace SourceGit.Views
ev.Handled = true;
};
var copyBranch = new MenuItem();
copyBranch.Header = App.Text("Submodule.CopyBranch");
copyBranch.Icon = App.CreateMenuIcon("Icons.Branch");
copyBranch.Click += async (_, ev) =>
{
await App.CopyTextAsync(submodule.Branch);
ev.Handled = true;
};
var copyRelativePath = new MenuItem();
copyRelativePath.Header = App.Text("Submodule.CopyPath");
copyRelativePath.Icon = App.CreateMenuIcon("Icons.Folder");
@@ -279,15 +288,6 @@ namespace SourceGit.Views
ev.Handled = true;
};
var copyBranch = new MenuItem();
copyBranch.Header = App.Text("Submodule.Branch");
copyBranch.Icon = App.CreateMenuIcon("Icons.Branch");
copyBranch.Click += async (_, ev) =>
{
await App.CopyTextAsync(submodule.Branch);
ev.Handled = true;
};
var copy = new MenuItem();
copy.Header = App.Text("Copy");
copy.Icon = App.CreateMenuIcon("Icons.Copy");