From bfc11623cf12a6de60499b9381ec123ffa111757 Mon Sep 17 00:00:00 2001
From: Dominik S <158042817+domys55@users.noreply.github.com>
Date: Sun, 7 Sep 2025 16:35:11 +0200
Subject: [PATCH] =?UTF-8?q?Feature:=20In=20the=20commit=20details=20menu,?=
=?UTF-8?q?=20add=20a=20=E2=80=9CCopy=20File=20Name=E2=80=9D=20action.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Workflow - When reviewing a commit, a user can quickly copy the file’s name from the menu and paste it into their editor’s file search or navigation dialog, making it easier to locate and open the file.
---
TRANSLATION.md | 1 +
src/Resources/Locales/de_DE.axaml | 1 +
src/Resources/Locales/en_US.axaml | 1 +
src/Resources/Locales/es_ES.axaml | 1 +
src/Resources/Locales/fr_FR.axaml | 1 +
src/Resources/Locales/it_IT.axaml | 1 +
src/Resources/Locales/ja_JP.axaml | 1 +
src/Resources/Locales/pt_BR.axaml | 1 +
src/Resources/Locales/ru_RU.axaml | 1 +
src/Views/CommitDetail.axaml.cs | 11 +++++++++++
10 files changed, 20 insertions(+)
diff --git a/TRANSLATION.md b/TRANSLATION.md
index 90c879f69..1b249b756 100644
--- a/TRANSLATION.md
+++ b/TRANSLATION.md
@@ -562,6 +562,7 @@ This document shows the translation status of each locale file in the repository
- Text.ConfirmEmptyCommit.WithLocalChanges
- Text.ConfirmRestart.Title
- Text.ConfirmRestart.Message
+- Text.CopyFileName
- Text.CopyFullPath
- Text.CreateBranch.OverwriteExisting
- Text.DeinitSubmodule
diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml
index 87adcdda1..77dbea70e 100644
--- a/src/Resources/Locales/de_DE.axaml
+++ b/src/Resources/Locales/de_DE.axaml
@@ -265,6 +265,7 @@
Typ der Änderung:
Kopieren
Gesamten Text kopieren
+ Dateinamen kopieren
Ganzen Pfad kopieren
Pfad kopieren
Branch erstellen...
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 2fb39d495..15014a541 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -263,6 +263,7 @@
Type of Change:
Copy
Copy All Text
+ Copy File Name
Copy Full Path
Copy Path
Create Branch...
diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml
index 3c12fa849..ecbc8f3e0 100644
--- a/src/Resources/Locales/es_ES.axaml
+++ b/src/Resources/Locales/es_ES.axaml
@@ -264,6 +264,7 @@
Tipo de Cambio:
Copiar
Copiar Todo el Texto
+ Copiar nombre de archivo
Copiar Ruta Completa
Copiar Ruta
Crear Rama...
diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml
index 32ae0e9f9..65cad4045 100644
--- a/src/Resources/Locales/fr_FR.axaml
+++ b/src/Resources/Locales/fr_FR.axaml
@@ -180,6 +180,7 @@
Type de Changement :
Copier
Copier tout le texte
+ Copier le nom du fichier
Copier le chemin complet
Copier le chemin
Créer une branche...
diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml
index 7d05b8c9f..88026a26e 100644
--- a/src/Resources/Locales/it_IT.axaml
+++ b/src/Resources/Locales/it_IT.axaml
@@ -257,6 +257,7 @@
Tipo di Modifica:
Copia
Copia Tutto il Testo
+ Copia nome file
Copia Intero Percorso
Copia Percorso
Crea Branch...
diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml
index 4698a5508..273c86d6b 100644
--- a/src/Resources/Locales/ja_JP.axaml
+++ b/src/Resources/Locales/ja_JP.axaml
@@ -179,6 +179,7 @@
変更の種類:
コピー
すべてのテキストをコピー
+ ファイル名をコピーする
絶対パスをコピー
パスをコピー
ブランチを作成...
diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml
index bc1f92ebe..529be06ca 100644
--- a/src/Resources/Locales/pt_BR.axaml
+++ b/src/Resources/Locales/pt_BR.axaml
@@ -163,6 +163,7 @@
Tipo de mudança:
Copiar
Copiar todo o texto
+ Copiar nome do arquivo
Copiar Caminho
Criar Branch...
Baseado Em:
diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml
index 04f1d17a5..a0c640acb 100644
--- a/src/Resources/Locales/ru_RU.axaml
+++ b/src/Resources/Locales/ru_RU.axaml
@@ -264,6 +264,7 @@
Тип изменения:
Копировать
Копировать весь текст
+ Копировать имя файла
Копировать полный путь
Копировать путь
Создать ветку...
diff --git a/src/Views/CommitDetail.axaml.cs b/src/Views/CommitDetail.axaml.cs
index 1d028ca8b..c0c106195 100644
--- a/src/Views/CommitDetail.axaml.cs
+++ b/src/Views/CommitDetail.axaml.cs
@@ -298,8 +298,19 @@ public ContextMenu CreateChangeContextMenu(Models.Change change)
e.Handled = true;
};
+ var copyFileName = new MenuItem();
+ copyFileName.Header = App.Text("CopyFileName");
+ copyFileName.Icon = App.CreateMenuIcon("Icons.Copy");
+ copyFileName.Tag = OperatingSystem.IsMacOS() ? "⌘+⌥+C" : "Ctrl+Alt+C";
+ copyFileName.Click += async (_, e) =>
+ {
+ await App.CopyTextAsync(Path.GetFileName(fullPath));
+ e.Handled = true;
+ };
+
menu.Items.Add(copyPath);
menu.Items.Add(copyFullPath);
+ menu.Items.Add(copyFileName);
return menu;
}