From 0a877c6730ecc44ca16e32b670dd4bcf348c42d3 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 24 Mar 2025 10:03:27 +0800 Subject: [PATCH 001/524] project: upgrade `OpenAI` and `Azure.AI.OpenAI` to `2.2.0-beta.4` Signed-off-by: leo --- src/SourceGit.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SourceGit.csproj b/src/SourceGit.csproj index 3578d59f..2a4b3c91 100644 --- a/src/SourceGit.csproj +++ b/src/SourceGit.csproj @@ -48,10 +48,10 @@ - + - + From fc85dd3269bb3c122b36d8b43f7612dd8e242d03 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 24 Mar 2025 19:28:16 +0800 Subject: [PATCH 002/524] enhance: improve `Repository.Open()` performance (#1121) Signed-off-by: leo --- src/ViewModels/Launcher.cs | 47 +++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/src/ViewModels/Launcher.cs b/src/ViewModels/Launcher.cs index 06479394..9ae99b33 100644 --- a/src/ViewModels/Launcher.cs +++ b/src/ViewModels/Launcher.cs @@ -275,22 +275,16 @@ namespace SourceGit.ViewModels if (!Path.Exists(node.Id)) { - var ctx = page == null ? ActivePage.Node.Id : page.Node.Id; - App.RaiseException(ctx, "Repository does NOT exists any more. Please remove it."); + App.RaiseException(node.Id, "Repository does NOT exists any more. Please remove it."); return; } var isBare = new Commands.IsBareRepository(node.Id).Result(); - var gitDir = node.Id; - if (!isBare) + var gitDir = isBare ? node.Id : GetRepositoryGitDir(node.Id); + if (string.IsNullOrEmpty(gitDir)) { - gitDir = new Commands.QueryGitDir(node.Id).Result(); - if (string.IsNullOrEmpty(gitDir)) - { - var ctx = page == null ? ActivePage.Node.Id : page.Node.Id; - App.RaiseException(ctx, "Given path is not a valid git repository!"); - return; - } + App.RaiseException(node.Id, "Given path is not a valid git repository!"); + return; } var repo = new Repository(isBare, node.Id, gitDir); @@ -469,6 +463,37 @@ namespace SourceGit.ViewModels return menu; } + private string GetRepositoryGitDir(string repo) + { + var fullpath = Path.Combine(repo, ".git"); + if (Directory.Exists(fullpath)) + { + if (Directory.Exists(Path.Combine(fullpath, "refs")) && + Directory.Exists(Path.Combine(fullpath, "objects")) && + File.Exists(Path.Combine(fullpath, "HEAD"))) + return fullpath; + + return null; + } + + if (File.Exists(fullpath)) + { + var redirect = File.ReadAllText(fullpath).Trim(); + if (redirect.StartsWith("gitdir: ", StringComparison.Ordinal)) + redirect = redirect.Substring(8); + + if (!Path.IsPathRooted(redirect)) + redirect = Path.GetFullPath(Path.Combine(repo, redirect)); + + if (Directory.Exists(redirect)) + return redirect; + + return null; + } + + return new Commands.QueryGitDir(repo).Result(); + } + private void SwitchWorkspace(Workspace to) { foreach (var one in Pages) From 380e6713b5418ee9f27a7b9bb5dd7e6c4556de82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Mart=C3=ADnez=20M=2E?= <56406225+jjesus-dev@users.noreply.github.com> Date: Mon, 24 Mar 2025 19:51:22 -0600 Subject: [PATCH 003/524] localization: update spanish translations (#1124) --- src/Resources/Locales/es_ES.axaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index e7e953e5..2f4a7230 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -475,6 +475,7 @@ Commits en el historial Mostrar hora del autor en lugar de la hora del commit en el gráfico Mostrar hijos en los detalles de commit + Mostrar etiquetas en el gráfico de commit Longitud de la guía del asunto GIT Habilitar Auto CRLF @@ -604,7 +605,7 @@ Por Fecha de Creación Por Nombre (Ascendiente) Por Nombre (Descendiente) - Sort + Ordenar Abrir en Terminal Usar tiempo relativo en las historias WORKTREES From 467089aec55005918bd42ba1294234bb06ee8bd0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Mar 2025 01:51:33 +0000 Subject: [PATCH 004/524] doc: Update translation status and missing keys --- TRANSLATION.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index a96f0fc6..30a2a679 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -22,14 +22,7 @@ This document shows the translation status of each locale file in the repository -### ![es__ES](https://img.shields.io/badge/es__ES-99.87%25-yellow) - -
-Missing keys in es_ES.axaml - -- Text.Preferences.General.ShowTagsInGraph - -
+### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen) ### ![fr__FR](https://img.shields.io/badge/fr__FR-%E2%88%9A-brightgreen) From f37ac904b9b2babddbba5b970f45de583e30fc33 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 25 Mar 2025 10:33:39 +0800 Subject: [PATCH 005/524] =?UTF-8?q?enhance:=20do=20not=20create=20crash=20?= =?UTF-8?q?log=20for=20unobserved=20task=20exceptions=20(#1121=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: leo --- src/App.axaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index af5e6177..86c5200c 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -37,7 +37,6 @@ namespace SourceGit TaskScheduler.UnobservedTaskException += (_, e) => { - LogException(e.Exception); e.SetObserved(); }; From ca0fb7ae1090068de4a7a42de113d0c9c4e203ff Mon Sep 17 00:00:00 2001 From: Iacopo Sbalchiero Date: Wed, 26 Mar 2025 02:27:10 +0100 Subject: [PATCH 006/524] Adding template for Azure DevOps workitems (#1128) * feat: add Azure DevOps issue tracker integration * localization: add Azure DevOps sample rule to issue tracker in multiple languages --- 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/pt_BR.axaml | 1 + src/Resources/Locales/ru_RU.axaml | 1 + src/ViewModels/RepositoryConfigure.cs | 5 +++++ src/Views/RepositoryConfigure.axaml | 1 + 8 files changed, 12 insertions(+) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index f24d6c65..75d312ea 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -160,6 +160,7 @@ Add Sample GitLab Issue Rule Add Sample GitLab Merge Request Rule Add Sample Jira Rule + Add Sample Azure DevOps Rule New Rule Issue Regex Expression: Rule Name: diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 2f4a7230..e1eccaa7 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -161,6 +161,7 @@ Añadir Regla de Ejemplo para Pull Requests de Gitee Añadir Regla de Ejemplo para Github Añadir Regla de Ejemplo para Jira + Añadir Regla de Ejemplo para Azure DevOps Añadir Regla de Ejemplo para Incidencias de GitLab Añadir Regla de Ejemplo para Merge Requests de GitLab Nueva Regla diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 19c0859c..1c3d7d34 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -151,6 +151,7 @@ Ajouter une règle d'exemple pour Pull Request Gitee Ajouter une règle d'exemple Github Ajouter une règle d'exemple Jira + Ajouter une règle d'exemple Azure DevOps Ajouter une règle d'exemple pour Incidents GitLab Ajouter une règle d'exemple pour Merge Request GitLab Nouvelle règle diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index d002dfef..da7d18d1 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -161,6 +161,7 @@ Aggiungi una regola di esempio per un Pull Request Gitee Aggiungi una regola di esempio per GitHub Aggiungi una regola di esempio per Jira + Aggiungi una regola di esempio per Azure DevOps Aggiungi una regola di esempio per Issue GitLab Aggiungi una regola di esempio per una Merge Request GitLab Nuova Regola diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index e811cf3e..e799741c 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -168,6 +168,7 @@ RASTREADOR DE PROBLEMAS Adicionar Regra de Exemplo do Github Adicionar Regra de Exemplo do Jira + Adicionar Regra de Exemplo do Azure DevOps Adicionar Regra de Exemplo do GitLab Adicionar regra de exemplo de Merge Request do GitLab Nova Regra diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 707c9ed9..53f04a5b 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -161,6 +161,7 @@ Добавить пример правила запроса скачивания из Gitea Добавить пример правила для Git Добавить пример правила Jira + Добавить пример правила Azure DevOps Добавить пример правила выдачи GitLab Добавить пример правила запроса на слияние в GitLab Новое правило diff --git a/src/ViewModels/RepositoryConfigure.cs b/src/ViewModels/RepositoryConfigure.cs index cf23b6d8..3f590758 100644 --- a/src/ViewModels/RepositoryConfigure.cs +++ b/src/ViewModels/RepositoryConfigure.cs @@ -203,6 +203,11 @@ namespace SourceGit.ViewModels SelectedIssueTrackerRule = _repo.Settings.AddIssueTracker("Jira Tracker", "PROJ-(\\d+)", "https://jira.yourcompany.com/browse/PROJ-$1"); } + public void AddSampleAzureWorkItemTracker() + { + SelectedIssueTrackerRule = _repo.Settings.AddIssueTracker("Azure DevOps Tracker", "#(\\d+)", "https://dev.azure.com/yourcompany/workspace/_workitems/edit/$1"); + } + public void AddSampleGitLabIssueTracker() { var link = "https://gitlab.com/username/repository/-/issues/$1"; diff --git a/src/Views/RepositoryConfigure.axaml b/src/Views/RepositoryConfigure.axaml index de777800..e41375b9 100644 --- a/src/Views/RepositoryConfigure.axaml +++ b/src/Views/RepositoryConfigure.axaml @@ -283,6 +283,7 @@ + From dccf53e51823a8da0eceaa3059d408d6f35c15d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Mar 2025 01:27:21 +0000 Subject: [PATCH 007/524] doc: Update translation status and missing keys --- TRANSLATION.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 30a2a679..b6ba3ed3 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,13 +6,14 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-98.92%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-98.79%25-yellow)
Missing keys in de_DE.axaml - Text.BranchUpstreamInvalid - Text.Configure.CustomAction.WaitForExit +- Text.Configure.IssueTracker.AddSampleAzure - Text.Diff.First - Text.Diff.Last - Text.Preferences.AI.Streaming @@ -35,7 +36,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-91.12%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-91.13%25-yellow)
Missing keys in pt_BR.axaml @@ -111,6 +112,20 @@ This document shows the translation status of each locale file in the repository ### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) -### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) +### ![zh__CN](https://img.shields.io/badge/zh__CN-99.87%25-yellow) -### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file +
+Missing keys in zh_CN.axaml + +- Text.Configure.IssueTracker.AddSampleAzure + +
+ +### ![zh__TW](https://img.shields.io/badge/zh__TW-99.87%25-yellow) + +
+Missing keys in zh_TW.axaml + +- Text.Configure.IssueTracker.AddSampleAzure + +
\ No newline at end of file From 4fb853d1fd91d13e852f64556808705cd345be45 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 26 Mar 2025 09:30:41 +0800 Subject: [PATCH 008/524] localization: add translation `Text.Configure.IssueTracker.AddSampleAzure` for Chinese (#1128) Signed-off-by: leo --- src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 93d08bd0..ad9b4179 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -157,6 +157,7 @@ 分钟 默认远程 ISSUE追踪 + 新增匹配Azure DevOps规则 新增匹配Gitee议题规则 新增匹配Gitee合并请求规则 新增匹配Github Issue规则 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index d5a7a77c..173ad099 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -157,6 +157,7 @@ 分鐘 預設遠端存放庫 Issue 追蹤 + 新增符合 Azure DevOps 規則 新增符合 Gitee 議題規則 新增符合 Gitee 合併請求規則 新增符合 GitHub Issue 規則 From fc3767754621a0f50b833f7e2259e41b7cd8caad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Mar 2025 01:30:58 +0000 Subject: [PATCH 009/524] doc: Update translation status and missing keys --- TRANSLATION.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index b6ba3ed3..183e77e6 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -112,20 +112,6 @@ This document shows the translation status of each locale file in the repository ### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) -### ![zh__CN](https://img.shields.io/badge/zh__CN-99.87%25-yellow) +### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) -
-Missing keys in zh_CN.axaml - -- Text.Configure.IssueTracker.AddSampleAzure - -
- -### ![zh__TW](https://img.shields.io/badge/zh__TW-99.87%25-yellow) - -
-Missing keys in zh_TW.axaml - -- Text.Configure.IssueTracker.AddSampleAzure - -
\ No newline at end of file +### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file From 4153eec1a8594e67f7b70f81812042886af50dec Mon Sep 17 00:00:00 2001 From: Gadfly Date: Wed, 26 Mar 2025 12:15:15 +0800 Subject: [PATCH 010/524] chore: Update DEB package configuration with installed size (#1130) --- build/resources/deb/DEBIAN/control | 3 ++- build/scripts/package.linux.sh | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build/resources/deb/DEBIAN/control b/build/resources/deb/DEBIAN/control index f553db8b..71786b43 100755 --- a/build/resources/deb/DEBIAN/control +++ b/build/resources/deb/DEBIAN/control @@ -1,7 +1,8 @@ Package: sourcegit -Version: 8.23 +Version: 2025.10 Priority: optional Depends: libx11-6, libice6, libsm6, libicu | libicu76 | libicu74 | libicu72 | libicu71 | libicu70 | libicu69 | libicu68 | libicu67 | libicu66 | libicu65 | libicu63 | libicu60 | libicu57 | libicu55 | libicu52, xdg-utils Architecture: amd64 +Installed-Size: 60440 Maintainer: longshuang@msn.cn Description: Open-source & Free Git GUI Client diff --git a/build/scripts/package.linux.sh b/build/scripts/package.linux.sh index 5abb058b..1b4adbdc 100755 --- a/build/scripts/package.linux.sh +++ b/build/scripts/package.linux.sh @@ -56,8 +56,15 @@ cp -f SourceGit/* resources/deb/opt/sourcegit ln -rsf resources/deb/opt/sourcegit/sourcegit resources/deb/usr/bin cp -r resources/_common/applications resources/deb/usr/share cp -r resources/_common/icons resources/deb/usr/share -sed -i -e "s/^Version:.*/Version: $VERSION/" -e "s/^Architecture:.*/Architecture: $arch/" resources/deb/DEBIAN/control -dpkg-deb --root-owner-group --build resources/deb "sourcegit_$VERSION-1_$arch.deb" +# Calculate installed size in KB +installed_size=$(du -sk resources/deb | cut -f1) +# Update the control file +sed -i -e "s/^Version:.*/Version: $VERSION/" \ + -e "s/^Architecture:.*/Architecture: $arch/" \ + -e "s/^Installed-Size:.*/Installed-Size: $installed_size/" \ + resources/deb/DEBIAN/control +# Build deb package with gzip compression +dpkg-deb -Zgzip --root-owner-group --build resources/deb "sourcegit_$VERSION-1_$arch.deb" rpmbuild -bb --target="$target" resources/rpm/SPECS/build.spec --define "_topdir $(pwd)/resources/rpm" --define "_version $VERSION" mv "resources/rpm/RPMS/$target/sourcegit-$VERSION-1.$target.rpm" ./ From 1575ae977eb1ba1923e2d02e0521a90064aa7b95 Mon Sep 17 00:00:00 2001 From: Gadfly Date: Thu, 27 Mar 2025 20:22:46 +0800 Subject: [PATCH 011/524] fix: improve font family name handling by collapsing multiple spaces (#1131) --- src/App.axaml.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 86c5200c..0448a247 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -559,8 +559,22 @@ namespace SourceGit foreach (var part in parts) { var t = part.Trim(); - if (!string.IsNullOrEmpty(t)) - trimmed.Add(t); + if (string.IsNullOrEmpty(t)) + continue; + + // Collapse multiple spaces into single space + var prevChar = '\0'; + var sb = new StringBuilder(); + + foreach (var c in t) + { + if (c == ' ' && prevChar == ' ') + continue; + sb.Append(c); + prevChar = c; + } + + trimmed.Add(sb.ToString()); } return trimmed.Count > 0 ? string.Join(',', trimmed) : string.Empty; From 56ebc182f2fa244276c2c1014c978ef7cb72c32f Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 28 Mar 2025 12:20:36 +0800 Subject: [PATCH 012/524] enhance: try to reinstate not onl the working tree's change, but also the index's ones (#1135) Signed-off-by: leo --- src/Commands/Stash.cs | 2 +- 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/pt_BR.axaml | 1 - src/Resources/Locales/ru_RU.axaml | 1 - src/Resources/Locales/zh_CN.axaml | 1 - src/Resources/Locales/zh_TW.axaml | 1 - 10 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Commands/Stash.cs b/src/Commands/Stash.cs index 7acfdf38..7d1a269b 100644 --- a/src/Commands/Stash.cs +++ b/src/Commands/Stash.cs @@ -82,7 +82,7 @@ namespace SourceGit.Commands public bool Pop(string name) { - Args = $"stash pop -q \"{name}\""; + Args = $"stash pop -q --index \"{name}\""; return Exec(); } diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 7144ef43..ba6592e9 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -650,7 +650,6 @@ Lokale Änderungen stashen Anwenden Entfernen - Anwenden und entfernen Stash entfernen Entfernen: Stashes diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 75d312ea..5c400979 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -655,7 +655,6 @@ Stash Local Changes Apply Drop - Pop Save as Patch... Drop Stash Drop: diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index e1eccaa7..54cb588d 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -659,7 +659,6 @@ Stash Cambios Locales Aplicar Eliminar - Pop Guardar como Parche... Eliminar Stash Eliminar: diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 1c3d7d34..2dcd52ab 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -600,7 +600,6 @@ Stash les changements locaux Appliquer Effacer - Extraire Effacer le Stash Effacer : Stashes diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index da7d18d1..e973a99c 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -659,7 +659,6 @@ Stasha Modifiche Locali Applica Elimina - Estrai Salva come Patch... Elimina Stash Elimina: diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index e799741c..8ff00158 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -620,7 +620,6 @@ Guardar Alterações Locais Aplicar Descartar - Pop Descartar Stash Descartar: Stashes diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 53f04a5b..ede88a10 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -660,7 +660,6 @@ Отложить локальные изменения Принять Отбросить - Применить Сохранить как заплатку... Отбросить тайник Отбросить: diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index ad9b4179..783e5696 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -659,7 +659,6 @@ 贮藏本地变更 应用(apply) 删除(drop) - 应用并删除(pop) 另存为补丁... 丢弃贮藏确认 丢弃贮藏 : diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 173ad099..c10d195f 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -658,7 +658,6 @@ 擱置本機變更 套用 (apply) 刪除 (drop) - 套用並刪除 (pop) 另存為修補檔 (patch)... 捨棄擱置變更確認 捨棄擱置變更: From b26c8a64ad7ebf62e450ca6b121bd0ab3fc14860 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Mar 2025 04:20:55 +0000 Subject: [PATCH 013/524] doc: Update translation status and missing keys --- TRANSLATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 183e77e6..b51fa09b 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -36,7 +36,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-91.13%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-91.12%25-yellow)
Missing keys in pt_BR.axaml From 276d000bcf66c8e5f686cc3eba0f98d486ee0cf9 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 28 Mar 2025 18:01:15 +0800 Subject: [PATCH 014/524] refactor: change `Copy File Name` to `Copy Full Path` for selected file or change (#1132) Signed-off-by: leo --- src/Native/OS.cs | 9 +++++++++ src/Resources/Locales/de_DE.axaml | 1 - src/Resources/Locales/en_US.axaml | 2 +- src/Resources/Locales/es_ES.axaml | 1 - src/Resources/Locales/fr_FR.axaml | 1 - src/Resources/Locales/it_IT.axaml | 1 - src/Resources/Locales/pt_BR.axaml | 1 - src/Resources/Locales/ru_RU.axaml | 1 - src/Resources/Locales/zh_CN.axaml | 2 +- src/Resources/Locales/zh_TW.axaml | 2 +- src/ViewModels/BranchCompare.cs | 12 ++++++------ src/ViewModels/CommitDetail.cs | 24 ++++++++++++------------ src/ViewModels/RevisionCompare.cs | 12 ++++++------ src/ViewModels/StashesPage.cs | 12 ++++++------ src/ViewModels/WorkingCopy.cs | 24 ++++++++++++------------ 15 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/Native/OS.cs b/src/Native/OS.cs index f11d1e7f..320b5208 100644 --- a/src/Native/OS.cs +++ b/src/Native/OS.cs @@ -162,6 +162,15 @@ namespace SourceGit.Native _backend.OpenWithDefaultEditor(file); } + public static string GetAbsPath(string root, string sub) + { + var fullpath = Path.Combine(root, sub); + if (OperatingSystem.IsWindows()) + return fullpath.Replace('/', '\\'); + + return fullpath; + } + private static void UpdateGitVersion() { if (string.IsNullOrEmpty(_gitExecutable) || !File.Exists(_gitExecutable)) diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index ba6592e9..bbfe4545 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -186,7 +186,6 @@ Kopieren Kopiere gesamten Text Pfad kopieren - Dateinamen kopieren Branch erstellen... Basierend auf: Erstellten Branch auschecken diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 5c400979..5ff1e3a4 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -186,7 +186,7 @@ Copy Copy All Text Copy Path - Copy File Name + Copy Full Path Create Branch... Based On: Check out the created branch diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 54cb588d..d8018097 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -189,7 +189,6 @@ Copiar Copiar Todo el Texto Copiar Ruta - Copiar Nombre del Archivo Crear Rama... Basado En: Checkout de la rama creada diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 2dcd52ab..70d0af22 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -178,7 +178,6 @@ Type de Changement : Copier Copier tout le texte - Copier le nom de fichier Copier le chemin Créer une branche... Basé sur : diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index e973a99c..85038d9e 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -189,7 +189,6 @@ Copia Copia Tutto il Testo Copia Percorso - Copia Nome File Crea Branch... Basato Su: Checkout del Branch Creato diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 8ff00158..4ee6cdbc 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -196,7 +196,6 @@ Copiar Copiar todo o texto Copiar Caminho - Copiar Nome do Arquivo Criar Branch... Baseado Em: Checar o branch criado diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index ede88a10..2d48d127 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -190,7 +190,6 @@ Копировать Копировать весь текст Копировать путь - Копировать имя файла Создать ветку... Основан на: Проверить созданную ветку diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 783e5696..8d2b4f1e 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -189,7 +189,7 @@ 复制 复制全部文本 复制路径 - 复制文件名 + 复制完整路径 新建分支 ... 新分支基于 : 完成后切换到新分支 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index c10d195f..8e823f68 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -189,7 +189,7 @@ 複製 複製全部內容 複製路徑 - 複製檔案名稱 + 複製完整路徑 新增分支... 新分支基於: 完成後切換到新分支 diff --git a/src/ViewModels/BranchCompare.cs b/src/ViewModels/BranchCompare.cs index b3c0009c..4edb978c 100644 --- a/src/ViewModels/BranchCompare.cs +++ b/src/ViewModels/BranchCompare.cs @@ -163,15 +163,15 @@ namespace SourceGit.ViewModels }; menu.Items.Add(copyPath); - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo, change.Path)); e.Handled = true; }; - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); return menu; } diff --git a/src/ViewModels/CommitDetail.cs b/src/ViewModels/CommitDetail.cs index 34ac8308..d04e674b 100644 --- a/src/ViewModels/CommitDetail.cs +++ b/src/ViewModels/CommitDetail.cs @@ -425,17 +425,17 @@ namespace SourceGit.ViewModels ev.Handled = true; }; - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo.FullPath, change.Path)); e.Handled = true; }; menu.Items.Add(copyPath); - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); return menu; } @@ -562,17 +562,17 @@ namespace SourceGit.ViewModels ev.Handled = true; }; - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(file.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo.FullPath, file.Path)); e.Handled = true; }; menu.Items.Add(copyPath); - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); return menu; } diff --git a/src/ViewModels/RevisionCompare.cs b/src/ViewModels/RevisionCompare.cs index 77a408e0..3b5717a6 100644 --- a/src/ViewModels/RevisionCompare.cs +++ b/src/ViewModels/RevisionCompare.cs @@ -183,15 +183,15 @@ namespace SourceGit.ViewModels }; menu.Items.Add(copyPath); - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo, change.Path)); e.Handled = true; }; - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); return menu; } diff --git a/src/ViewModels/StashesPage.cs b/src/ViewModels/StashesPage.cs index 77ed5551..e69d9bb5 100644 --- a/src/ViewModels/StashesPage.cs +++ b/src/ViewModels/StashesPage.cs @@ -251,12 +251,12 @@ namespace SourceGit.ViewModels ev.Handled = true; }; - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo.FullPath, change.Path)); e.Handled = true; }; @@ -267,7 +267,7 @@ namespace SourceGit.ViewModels menu.Items.Add(resetToThisRevision); menu.Items.Add(new MenuItem { Header = "-" }); menu.Items.Add(copyPath); - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); return menu; } diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index f9ddb288..40b4c50c 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -903,15 +903,15 @@ namespace SourceGit.ViewModels }; menu.Items.Add(copy); - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo.FullPath, change.Path)); e.Handled = true; }; - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); } else { @@ -1270,17 +1270,17 @@ namespace SourceGit.ViewModels e.Handled = true; }; - var copyFileName = new MenuItem(); - copyFileName.Header = App.Text("CopyFileName"); - copyFileName.Icon = App.CreateMenuIcon("Icons.Copy"); - copyFileName.Click += (_, e) => + var copyFullPath = new MenuItem(); + copyFullPath.Header = App.Text("CopyFullPath"); + copyFullPath.Icon = App.CreateMenuIcon("Icons.Copy"); + copyFullPath.Click += (_, e) => { - App.CopyText(Path.GetFileName(change.Path)); + App.CopyText(Native.OS.GetAbsPath(_repo.FullPath, change.Path)); e.Handled = true; }; menu.Items.Add(copyPath); - menu.Items.Add(copyFileName); + menu.Items.Add(copyFullPath); } else { From ce7196490a5d7143f7502ea8b4aad89a3c719ab8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 28 Mar 2025 10:02:16 +0000 Subject: [PATCH 015/524] doc: Update translation status and missing keys --- TRANSLATION.md | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index b51fa09b..c79847be 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-98.79%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-98.65%25-yellow)
Missing keys in de_DE.axaml @@ -14,6 +14,7 @@ This document shows the translation status of each locale file in the repository - Text.BranchUpstreamInvalid - Text.Configure.CustomAction.WaitForExit - Text.Configure.IssueTracker.AddSampleAzure +- Text.CopyFullPath - Text.Diff.First - Text.Diff.Last - Text.Preferences.AI.Streaming @@ -23,20 +24,35 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen) +### ![es__ES](https://img.shields.io/badge/es__ES-99.87%25-yellow) -### ![fr__FR](https://img.shields.io/badge/fr__FR-%E2%88%9A-brightgreen) +
+Missing keys in es_ES.axaml -### ![it__IT](https://img.shields.io/badge/it__IT-99.87%25-yellow) +- Text.CopyFullPath + +
+ +### ![fr__FR](https://img.shields.io/badge/fr__FR-99.87%25-yellow) + +
+Missing keys in fr_FR.axaml + +- Text.CopyFullPath + +
+ +### ![it__IT](https://img.shields.io/badge/it__IT-99.73%25-yellow)
Missing keys in it_IT.axaml +- Text.CopyFullPath - Text.Preferences.General.ShowTagsInGraph
-### ![pt__BR](https://img.shields.io/badge/pt__BR-91.12%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-90.98%25-yellow)
Missing keys in pt_BR.axaml @@ -59,6 +75,7 @@ This document shows the translation status of each locale file in the repository - Text.Configure.CustomAction.WaitForExit - Text.Configure.IssueTracker.AddSampleGiteeIssue - Text.Configure.IssueTracker.AddSampleGiteePullRequest +- Text.CopyFullPath - Text.CreateBranch.Name.WarnSpace - Text.DeleteRepositoryNode.Path - Text.DeleteRepositoryNode.TipForGroup @@ -110,7 +127,14 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) + +
+Missing keys in ru_RU.axaml + +- Text.CopyFullPath + +
### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) From 1482a005bb616d5f16926ec77d469e324ce1095a Mon Sep 17 00:00:00 2001 From: AquariusStar <48148723+AquariusStar@users.noreply.github.com> Date: Mon, 31 Mar 2025 04:20:54 +0300 Subject: [PATCH 016/524] localization: update and fix translation russian (#1136) --- src/Resources/Locales/ru_RU.axaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 2d48d127..2ea274d1 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -190,6 +190,7 @@ Копировать Копировать весь текст Копировать путь + Копировать полный путь Создать ветку... Основан на: Проверить созданную ветку @@ -212,7 +213,7 @@ Вид: С примечаниями Простой - Удерживайте Ctrl, чтобы начать сразу + Удерживайте Ctrl, чтобы сразу начать Вырезать Удалить ветку Ветка: @@ -330,7 +331,7 @@ Добавить шаблон отслеживания в LFS Git Извлечь Извлечь объекты LFS - Запустить «git lfs fetch», чтобы загрузить объекты LFS Git. При этом рабочая копия не обновляется. + Запустить (git lfs fetch), чтобы загрузить объекты LFS Git. При этом рабочая копия не обновляется. Установить перехват LFS Git Показывать блокировки Нет заблокированных файлов @@ -340,10 +341,10 @@ Разблокировать Принудительно разблокировать Обрезать - Запустить «git lfs prune», чтобы удалить старые файлы LFS из локального хранилища + Запустить (git lfs prune), чтобы удалить старые файлы LFS из локального хранилища Забрать Забрать объекты LFS - Запустить «git lfs pull», чтобы загрузить все файлы LFS Git для текущей ссылки и проверить + Запустить (git lfs pull), чтобы загрузить все файлы LFS Git для текущей ссылки и проверить Выложить Выложить объекты LFS Отправляйте большие файлы, помещенные в очередь, в конечную точку LFS Git @@ -557,7 +558,7 @@ Отказ Автоматическое извлечение изменений с внешних репозиторий... Очистить (Сбор мусора и удаление) - Запустить команду «git gc» для данного репозитория. + Запустить команду (git gc) для данного репозитория. Очистить всё Настройка репозитория ПРОДОЛЖИТЬ From 9ee3a00fbae017de54c33f56ff0d0d3d1b53e29c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 31 Mar 2025 01:21:15 +0000 Subject: [PATCH 017/524] doc: Update translation status and missing keys --- TRANSLATION.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index c79847be..341fdce0 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -127,14 +127,7 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) - -
-Missing keys in ru_RU.axaml - -- Text.CopyFullPath - -
+### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) ### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) From 07d99f5fd28cae320cf20b229438ead47ca68e79 Mon Sep 17 00:00:00 2001 From: qiufengshe Date: Mon, 31 Mar 2025 09:21:38 +0800 Subject: [PATCH 018/524] enhance: get email hash code opimization (#1137) (cherry picked from commit 839b92a284d6b103894f6a8a39e5ce1f99bb12fa) --- src/Models/AvatarManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Models/AvatarManager.cs b/src/Models/AvatarManager.cs index 9f0bceaf..a506d886 100644 --- a/src/Models/AvatarManager.cs +++ b/src/Models/AvatarManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; @@ -196,8 +196,8 @@ namespace SourceGit.Models private string GetEmailHash(string email) { var lowered = email.ToLower(CultureInfo.CurrentCulture).Trim(); - var hash = MD5.Create().ComputeHash(Encoding.Default.GetBytes(lowered)); - var builder = new StringBuilder(); + var hash = MD5.HashData(Encoding.Default.GetBytes(lowered).AsSpan()); + var builder = new StringBuilder(hash.Length * 2); foreach (var c in hash) builder.Append(c.ToString("x2")); return builder.ToString(); From 0045e06d7888ea1463e6f2291bfe8b76d927b563 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 31 Mar 2025 09:29:07 +0800 Subject: [PATCH 019/524] project: upgrade `AvaloniaUI` to `11.2.6` Signed-off-by: leo --- src/SourceGit.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SourceGit.csproj b/src/SourceGit.csproj index 2a4b3c91..852c9e34 100644 --- a/src/SourceGit.csproj +++ b/src/SourceGit.csproj @@ -41,11 +41,11 @@ - - - - - + + + + + From ae5fa6a793801fa6171257ef3aa9f94a6f7ba3be Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 31 Mar 2025 09:29:56 +0800 Subject: [PATCH 020/524] version: Release 2025.11 Signed-off-by: leo --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index e78345d1..75c26f38 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2025.10 \ No newline at end of file +2025.11 \ No newline at end of file From 8e55ba1b47168f9fa193d33c1af4dacd04316da4 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 31 Mar 2025 19:06:10 +0800 Subject: [PATCH 021/524] enhance: avoid unhandled exceptions in timer Signed-off-by: leo --- src/ViewModels/Repository.cs | 51 ++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 6ea41e04..6b1e439e 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -2513,30 +2513,37 @@ namespace SourceGit.ViewModels private void AutoFetchImpl(object sender) { - if (!_settings.EnableAutoFetch || _isAutoFetching) - return; - - var lockFile = Path.Combine(_gitDir, "index.lock"); - if (File.Exists(lockFile)) - return; - - var now = DateTime.Now; - var desire = _lastFetchTime.AddMinutes(_settings.AutoFetchInterval); - if (desire > now) - return; - - var remotes = new List(); - lock (_lockRemotes) + try { - foreach (var remote in _remotes) - remotes.Add(remote.Name); - } + if (!_settings.EnableAutoFetch || _isAutoFetching) + return; - Dispatcher.UIThread.Invoke(() => IsAutoFetching = true); - foreach (var remote in remotes) - new Commands.Fetch(_fullpath, remote, false, false, null) { RaiseError = false }.Exec(); - _lastFetchTime = DateTime.Now; - Dispatcher.UIThread.Invoke(() => IsAutoFetching = false); + var lockFile = Path.Combine(_gitDir, "index.lock"); + if (File.Exists(lockFile)) + return; + + var now = DateTime.Now; + var desire = _lastFetchTime.AddMinutes(_settings.AutoFetchInterval); + if (desire > now) + return; + + var remotes = new List(); + lock (_lockRemotes) + { + foreach (var remote in _remotes) + remotes.Add(remote.Name); + } + + Dispatcher.UIThread.Invoke(() => IsAutoFetching = true); + foreach (var remote in remotes) + new Commands.Fetch(_fullpath, remote, false, false, null) { RaiseError = false }.Exec(); + _lastFetchTime = DateTime.Now; + Dispatcher.UIThread.Invoke(() => IsAutoFetching = false); + } + catch + { + // DO nothing, but prevent `System.AggregateException` + } } private string _fullpath = string.Empty; From 2deb79f8cea6580ba89fb24cc7fea537f723ec17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Mart=C3=ADnez=20M=2E?= <56406225+jjesus-dev@users.noreply.github.com> Date: Wed, 2 Apr 2025 03:20:33 -0600 Subject: [PATCH 022/524] localization: update spanish translations (#1142) add literal translation for 'CopyFullPath' string --- src/Resources/Locales/es_ES.axaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index d8018097..8b4c350f 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -189,6 +189,7 @@ Copiar Copiar Todo el Texto Copiar Ruta + Copiar Ruta Completa Crear Rama... Basado En: Checkout de la rama creada From 7ef4cca1f548e408984a553bfbbe2e09ed4731ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Apr 2025 09:20:43 +0000 Subject: [PATCH 023/524] doc: Update translation status and missing keys --- TRANSLATION.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 341fdce0..011671ea 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -24,14 +24,7 @@ This document shows the translation status of each locale file in the repository -### ![es__ES](https://img.shields.io/badge/es__ES-99.87%25-yellow) - -
-Missing keys in es_ES.axaml - -- Text.CopyFullPath - -
+### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen) ### ![fr__FR](https://img.shields.io/badge/fr__FR-99.87%25-yellow) From 904432a8f1d63472f913071ad1e52f5a8e5fa582 Mon Sep 17 00:00:00 2001 From: UchiTesting <56003633+UchiTesting@users.noreply.github.com> Date: Mon, 7 Apr 2025 03:45:02 +0200 Subject: [PATCH 024/524] style(locale): Add a few translations to the French locale (#1158) --- src/Resources/Locales/fr_FR.axaml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 70d0af22..bf238aa2 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -16,13 +16,19 @@ Suivre la branche : Suivi de la branche distante Assistant IA + RE-GÉNERER Utiliser l'IA pour générer un message de commit + APPLIQUER COMME MESSAGE DE COMMIT Appliquer Fichier de patch : Selectionner le fichier .patch à appliquer Ignorer les changements d'espaces blancs Appliquer le patch Espaces blancs : + Appliquer le Stash + Supprimer après application + Rétablir les changements de l'index + Stash: Archiver... Enregistrer l'archive sous : Sélectionnez le chemin du fichier d'archive @@ -39,6 +45,7 @@ Comparer avec HEAD Comparer avec le worktree Copier le nom de la branche + Action personnalisée Supprimer ${0}$... Supprimer {0} branches sélectionnées Rejeter tous les changements @@ -54,6 +61,7 @@ Renommer ${0}$... Définir la branche de suivi... Comparer les branches + Branche amont invalide ! Octets ANNULER Réinitialiser à la révision parente @@ -92,6 +100,7 @@ Récupérer ce commit Cherry-Pick ce commit Cherry-Pick ... + Checkout Commit Comparer avec HEAD Comparer avec le worktree Copier les informations @@ -150,10 +159,10 @@ Ajouter une règle d'exemple Gitee Ajouter une règle d'exemple pour Pull Request Gitee Ajouter une règle d'exemple Github - Ajouter une règle d'exemple Jira - Ajouter une règle d'exemple Azure DevOps Ajouter une règle d'exemple pour Incidents GitLab Ajouter une règle d'exemple pour Merge Request GitLab + Ajouter une règle d'exemple Jira + Ajouter une règle d'exemple Azure DevOps Nouvelle règle Issue Regex Expression: Nom de règle : @@ -179,6 +188,7 @@ Copier Copier tout le texte Copier le chemin + Copier le chemin complet Créer une branche... Basé sur : Récupérer la branche créée @@ -187,6 +197,7 @@ Stash & Réappliquer Nom de la nouvelle branche : Entrez le nom de la branche. + Les espaces seront remplacés par des tirets. Créer une branche locale Créer un tag... Nouveau tag à : @@ -583,13 +594,20 @@ Passer cette version Mise à jour du logiciel Il n'y a pas de mise à jour pour le moment. + Définir la branche de suivi + Branche : + Escamoter la branche amont + Branche amont: Copier le SHA - Squash Commits + Aller à + Squash les commits Dans : Clé privée SSH : Chemin du magasin de clés privées SSH START Stash + Auto-restauration après le stash + Vos fichiers de travail sont inchangés, mais un stash a été sauvegardé. Inclure les fichiers non-suivis Garder les fichiers indexés Message : @@ -599,6 +617,7 @@ Stash les changements locaux Appliquer Effacer + Sauver comme Patch... Effacer le Stash Effacer : Stashes From cbc7079e59f1078e219bd4942ab59fd879a8f484 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 01:45:21 +0000 Subject: [PATCH 025/524] doc: Update translation status and missing keys --- TRANSLATION.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 011671ea..711564ef 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -26,14 +26,7 @@ This document shows the translation status of each locale file in the repository ### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen) -### ![fr__FR](https://img.shields.io/badge/fr__FR-99.87%25-yellow) - -
-Missing keys in fr_FR.axaml - -- Text.CopyFullPath - -
+### ![fr__FR](https://img.shields.io/badge/fr__FR-%E2%88%9A-brightgreen) ### ![it__IT](https://img.shields.io/badge/it__IT-99.73%25-yellow) From ef106e6909e73355ee22cd06ce0d0fef73a3ce02 Mon Sep 17 00:00:00 2001 From: Sousi Omine <110832262+SousiOmine@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:53:20 +0900 Subject: [PATCH 026/524] Add Japanese localization (#1157) * Initial Japanese translation Only a small part was translated * Unspecified words will be in English When new words are added, they will be displayed in English even if Japanese support is delayed. * Expanded translation scope * Expanded translation scope * Proceed with translation with a focus on overall settings * Re-translated the outdated settings screen * Add items that only exist in the latest en_US and remove items that do not exist in en_US * A lot of translation work done * A lot more translation work has been done * ja_JP.axaml has been translated into Japanese * Fixed three incomplete parts of the Japanese translation --- src/App.axaml | 1 + src/Models/Locales.cs | 1 + src/Resources/Locales/ja_JP.axaml | 747 ++++++++++++++++++++++++++++++ 3 files changed, 749 insertions(+) create mode 100644 src/Resources/Locales/ja_JP.axaml diff --git a/src/App.axaml b/src/App.axaml index 76d4baa8..fdfa8e07 100644 --- a/src/App.axaml +++ b/src/App.axaml @@ -20,6 +20,7 @@ + diff --git a/src/Models/Locales.cs b/src/Models/Locales.cs index d5e1534c..802e88ef 100644 --- a/src/Models/Locales.cs +++ b/src/Models/Locales.cs @@ -17,6 +17,7 @@ namespace SourceGit.Models new Locale("Русский", "ru_RU"), new Locale("简体中文", "zh_CN"), new Locale("繁體中文", "zh_TW"), + new Locale("日本語", "ja_JP"), }; public Locale(string name, string key) diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml new file mode 100644 index 00000000..21255221 --- /dev/null +++ b/src/Resources/Locales/ja_JP.axaml @@ -0,0 +1,747 @@ + + + + + 概要 + SourceGitについて + オープンソース & フリーなGit GUIクライアント + ワークツリーを追加 + チェックアウトする内容: + 既存のブランチ + 新しいブランチを作成 + 場所: + ワークツリーのパスを入力してください。相対パスも使用することができます。 + ブランチの名前: + 任意。デフォルトでは宛先フォルダ名が使用されます。 + 追跡するブランチ: + 追跡中のリモートブランチ + OpenAI アシスタント + 再生成 + OpenAIを使用してコミットメッセージを生成 + コミットメッセージとして適用 + 適用 + パッチファイル: + 適用する .patchファイルを選択 + 空白文字の変更を無視 + パッチを適用 + 空白文字: + スタッシュを適用 + 適用後に削除 + インデックスの変更を復元 + スタッシュ: + アーカイブ... + アーカイブの保存先: + アーカイブファイルのパスを選択 + リビジョン: + アーカイブ + SourceGit Askpass + 変更されていないとみなされるファイル + 変更されていないとみなされるファイルはありません + 削除 + バイナリファイルはサポートされていません!!! + Blame + BLAMEではこのファイルはサポートされていません!!! + ${0}$ をチェックアウトする... + HEADと比較 + ワークツリーと比較 + ブランチ名をコピー + カスタムアクション + ${0}$を削除... + 選択中の{0}個のブランチを削除 + すべての変更を破棄 + ${0}$ へ早送りする + ${0}$ から ${1}$ へフェッチする + Git Flow - Finish ${0}$ + ${0}$ を ${1}$ にマージする... + 選択中の{0}個のブランチを現在のブランチにマージする + ${0}$ をプルする + ${0}$ を ${1}$ にプルする... + ${0}$ をプッシュする + ${0}$ を ${1}$ でリベースする... + ${0}$ をリネームする... + トラッキングブランチを設定... + ブランチの比較 + 無効な上流ブランチ! + バイト + キャンセル + このリビジョンにリセット + 親リビジョンにリセット + コミットメッセージを生成 + 変更表示の切り替え + ファイルとディレクトリのリストを表示 + パスのリストを表示 + ファイルシステムのツリーを表示 + ブランチをチェックアウト + コミットをチェックアウト + 警告: コミットをチェックアウトするとHEADが切断されます + コミット: + ブランチ: + ローカルの変更: + 破棄 + スタッシュして再適用 + チェリーピック + ソースをコミットメッセージに追加 + コミット(複数可): + すべての変更をコミット + メインライン: + 通常、マージをチェリーピックすることはできません。どちらのマージ元をメインラインとして扱うべきかが分からないためです。このオプションを使用すると、指定した親に対して変更を再適用する形でチェリーピックを実行できます。 + スタッシュをクリア + すべてのスタッシュをクリアします。続行しますか? + リモートリポジトリをクローン + 追加の引数: + リポジトリをクローンする際の追加パラメータ(任意)。 + ローカル名: + リポジトリの名前(任意)。 + 親フォルダ: + サブモジュールを初期化して更新 + リポジトリのURL: + 閉じる + エディタ + このコミットをチェリーピック + チェリーピック... + コミットをチェックアウト + HEADと比較 + ワークツリーと比較 + 情報をコピー + SHAをコピー + カスタムアクション + ${0}$ ブランチをここにインタラクティブリベース + ${0}$ にマージ + マージ... + ${0}$ をここにリベース + ${0}$ ブランチをここにリセット + コミットを戻す + 書き直す + パッチとして保存... + 親にスカッシュ + 子コミットをここにスカッシュ + 変更 + 変更を検索... + ファイル + LFSファイル + ファイルを検索... + サブモジュール + コミットの情報 + 著者 + 変更 + + コミッター + このコミットを含む参照を確認 + コミットが含まれるか確認 + 最初の100件の変更のみが表示されています。すべての変更は'変更'タブで確認できます。 + メッセージ + + 参照 + SHA + ブラウザで開く + コミットのタイトルを入力 + 説明 + リポジトリの設定 + コミットテンプレート + テンプレート名: + テンプレート内容: + カスタムアクション + 引数: + ${REPO} - リポジトリのパス; ${BRANCH} - 選択中のブランチ; ${SHA} - 選択中のコミットのSHA + 実行ファイル: + 名前: + スコープ: + ブランチ + コミット + リポジトリ + アクションの終了を待機 + Eメールアドレス + Eメールアドレス + GIT + 自動的にリモートからフェッチ 間隔: + 分(s) + リモートの初期値 + ISSUEトラッカー + サンプルのGitee Issueルールを追加 + サンプルのGiteeプルリクエストルールを追加 + サンプルのGithubルールを追加 + サンプルのGitLab Issueルールを追加 + サンプルのGitLabマージリクエストルールを追加 + サンプルのJiraルールを追加 + サンプルのAzure DevOpsルールを追加 + 新しいルール + Issueの正規表現: + ルール名: + リザルトURL: + 正規表現のグループ値に$1, $2を使用してください。 + AI + 優先するサービス: + 優先するサービスが設定されている場合、SourceGitはこのリポジトリでのみそれを使用します。そうでない場合で複数サービスが利用できる場合は、そのうちの1つを選択するためのコンテキストメニューが表示されます。 + HTTP プロキシ + このリポジトリで使用するHTTPプロキシ + ユーザー名 + このリポジトリにおけるユーザー名 + ワークスペース + + 起動時にタブを復元 + Conventional Commitヘルパー + 破壊的変更: + 閉じたIssue: + 詳細な変更: + スコープ: + 短い説明: + 変更の種類: + コピー + すべてのテキストをコピー + パスをコピー + 絶対パスをコピー + ブランチを作成... + 派生元: + 作成したブランチにチェックアウト + ローカルの変更: + 破棄 + スタッシュして再適用 + 新しいブランチの名前: + ブランチの名前を入力 + スペースはダッシュに置き換えられます。 + ローカルブランチを作成 + タグを作成... + 付与されるコミット: + GPG署名を使用 + タグメッセージ: + 任意。 + タグの名前: + 推奨フォーマット: v1.0.0-alpha + 作成後にすべてのリモートにプッシュ + 新しいタグを作成 + 種類: + 注釈付き + 軽量 + Ctrlキーを押しながらクリックで実行 + 切り取り + ブランチを削除 + ブランチ: + リモートブランチを削除しようとしています!!! + もしリモートブランチを削除する場合、${0}$も削除します。 + 複数のブランチを削除 + 一度に複数のブランチを削除しようとしています! 操作を行う前に再度確認してください! + リモートを削除 + リモート: + パス: + 対象: + すべての子ノードがリストから削除されます。 + グループを削除 + これはリストからのみ削除され、ディスクには保存されません! + リポジトリを削除 + サブモジュールを削除 + サブモジュールのパス: + タグを削除 + タグ: + リモートリポジトリから削除 + バイナリの差分 + NEW + OLD + コピー + ファイルモードが変更されました + 先頭の差分 + 空白の変更を無視 + 最後の差分 + LFSオブジェクトの変更 + 次の差分 + 変更がない、もしくはEOLの変更のみ + 前の差分 + パッチとして保存 + 隠されたシンボルを表示 + 差分の分割表示 + サブモジュール + 新規 + スワップ + シンタックスハイライト + 行の折り返し + ブロックナビゲーションを有効化 + マージツールで開く + すべての行を表示 + 表示する行数を減らす + 表示する行数を増やす + ファイルを選択すると、変更内容が表示されます + マージツールで開く + 変更を破棄 + ワーキングディレクトリのすべての変更を破棄 + 変更: + 無視したファイルを含める + {0}個の変更を破棄します。 + この操作を元に戻すことはできません!!! + ブックマーク: + 新しい名前: + 対象: + 選択中のグループを編集 + 選択中のリポジトリを編集 + カスタムアクションを実行 + アクション名: + (チェックアウトせずに)ブランチを早送りする + フェッチ + すべてのリモートをフェッチ + ローカル参照を強制的に上書き + タグなしでフェッチ + リモート: + リモートの変更をフェッチ + 変更されていないとみなされる + 破棄... + {0}個のファイルを破棄... + 選択された行の変更を破棄 + 外部マージツールで開く + ${0}$ を使用して解決 + パッチとして保存... + ステージ + {0}個のファイルをステージ... + 選択された行の変更をステージ + スタッシュ... + {0}個のファイルをスタッシュ... + アンステージ + {0}個のファイルをアンステージ... + 選択された行の変更をアンステージ + 相手の変更を使用 (checkout --theirs) + 自分の変更を使用 (checkout --ours) + ファイルの履歴 + コンテンツ + 変更 + Git-Flow + 開発ブランチ: + Feature: + Feature プレフィックス: + FLOW - Finish Feature + FLOW - Finish Hotfix + FLOW - Finish Release + 対象: + Hotfix: + Hotfix プレフィックス: + Git-Flowを初期化 + ブランチを保持 + プロダクション ブランチ: + Release: + Release プレフィックス: + Start Feature... + FLOW - Start Feature + Start Hotfix... + FLOW - Start Hotfix + 名前を入力 + Start Release... + FLOW - Start Release + Versionタグ プレフィックス: + Git LFS + トラックパターンを追加... + パターンをファイル名として扱う + カスタム パターン: + Git LFSにトラックパターンを追加 + フェッチ + LFSオブジェクトをフェッチ + `git lfs fetch`を実行して、Git LFSオブジェクトをダウンロードします。ワーキングコピーは更新されません。 + Git LFSフックをインストール + ロックを表示 + ロックされているファイルはありません + ロック + 私のロックのみ表示 + LFSロック + ロック解除 + 強制的にロック解除 + 削除 + `git lfs prune`を実行して、ローカルの保存領域から古いLFSファイルを削除します。 + プル + LFSオブジェクトをプル + `git lfs pull`を実行して、現在の参照とチェックアウトのすべてのGit LFSファイルをダウンロードします。 + プッシュ + LFSオブジェクトをプッシュ + キュー内の大容量ファイルをGit LFSエンドポイントにプッシュします。 + リモート: + {0}という名前のファイルをトラック + すべての*{0}ファイルをトラック + 履歴 + 著者 + 著者時間 + グラフ & コミットのタイトル + SHA + 日時 + {0} コミットを選択しました + 'Ctrl'キーまたは'Shift'キーを押すと、複数のコミットを選択できます。 + ⌘ または ⇧ キーを押して複数のコミットを選択します。 + TIPS: + キーボードショートカットを確認 + 総合 + 現在のポップアップをキャンセル + 新しくリポジトリをクローン + 現在のページを閉じる + 前のページに移動 + 次のページに移動 + 新しいページを作成 + 設定ダイアログを開く + リポジトリ + ステージ済みの変更をコミット + ステージ済みの変更をコミットしてプッシュ + 全ての変更をステージしてコミット + 選択中のコミットから新たなブランチを作成 + 選択した変更を破棄 + 直接フェッチを実行 + ダッシュボードモード (初期値) + 直接プルを実行 + 直接プッシュを実行 + 現在のリポジトリを強制的に再読み込み + 選択中の変更をステージ/アンステージ + コミット検索モード + '変更'に切り替える + '履歴'に切り替える + 'スタッシュ'に切り替える + テキストエディタ + 検索パネルを閉じる + 次のマッチを検索 + 前のマッチを検索 + 検索パネルを開く + ステージ + アンステージ + 破棄 + リポジトリの初期化 + パス: + チェリーピックが進行中です。'中止'を押すと元のHEADが復元されます。 + コミットを処理中 + マージリクエストが進行中です。'中止'を押すと元のHEADが復元されます。 + マージ中 + リベースが進行中です。'中止'を押すと元のHEADが復元されます。 + 停止しました + 元に戻す処理が進行中です。'中止'を押すと元のHEADが復元されます。 + コミットを元に戻しています + インタラクティブ リベース + 対象のブランチ: + On: + ブラウザで開く + リンクをコピー + エラー + 通知 + ブランチのマージ + 宛先: + マージオプション: + ソースブランチ: + マージ (複数) + すべての変更をコミット + マージ戦略: + 対象: + リポジトリノードの移動 + 親ノードを選択: + 名前: + Gitが設定されていません。まず[設定]に移動して設定を行ってください。 + アプリケーションデータのディレクトリを開く + 外部ツールで開く... + 任意。 + 新しいページを開く + ブックマーク + タブを閉じる + 他のタブを閉じる + 右のタブを閉じる + リポジトリパスをコピー + リポジトリ + 貼り付け + たった今 + {0} 分前 + 1 時間前 + {0} 時間前 + 昨日 + {0} 日前 + 先月 + {0} ヶ月前 + 昨年 + {0} 年前 + 設定 + AI + 差分分析プロンプト + APIキー + タイトル生成プロンプト + モデル + 名前 + サーバー + ストリーミングを有効化 + 外観 + デフォルトのフォント + エディタのタブ幅 + フォントサイズ + デフォルト + エディタ + 等幅フォント + テキストエディタでは等幅フォントのみを使用する + テーマ + テーマの上書き + タイトルバーの固定タブ幅を使用 + ネイティブウィンドウフレームを使用 + 差分/マージ ツール + インストール パス + 差分/マージ ツールのパスを入力 + ツール + 総合 + 起動時にアップデートを確認 + 日時のフォーマット + 言語 + コミット履歴 + グラフにコミット時間の代わりに著者の時間を表示する + コミット詳細に子コミットを表示 + コミットグラフにタグを表示 + コミットタイトル枠の大きさ + GIT + 自動CRLFを有効化 + デフォルトのクローンディレクトリ + ユーザー Eメールアドレス + グローバルgitのEメールアドレス + フェッチ時に--pruneを有効化 + インストール パス + HTTP SSL 検証を有効にする + ユーザー名 + グローバルのgitユーザー名 + Gitバージョン + Git (>= 2.23.0) はこのアプリで必要です + GPG 署名 + コミットにGPG署名を行う + タグにGPG署名を行う + GPGフォーマット + プログラムのインストールパス + インストールされたgpgプログラムのパスを入力 + ユーザー署名キー + ユーザーのGPG署名キー + 統合 + シェル/ターミナル + シェル/ターミナル + パス + リモートを削除 + 対象: + 作業ツリーを削除 + `$GIT_DIR/worktrees` の作業ツリー情報を削除 + プル + ブランチ: + すべてのブランチをフェッチ + 宛先: + ローカルの変更: + 破棄 + スタッシュして再適用 + タグなしでフェッチ + リモート: + プル (フェッチ & マージ) + マージの代わりにリベースを使用 + プッシュ + サブモジュールがプッシュされていることを確認 + 強制的にプッシュ + ローカル ブランチ: + リモート: + 変更をリモートにプッシュ + リモート ブランチ: + 追跡ブランチとして設定 + すべてのタグをプッシュ + リモートにタグをプッシュ + すべてのリモートにプッシュ + リモート: + タグ: + 終了 + 現在のブランチをリベース + ローカルの変更をスタッシュして再適用 + On: + リベース: + 更新 + リモートを追加 + リモートを編集 + 名前: + リモートの名前 + リポジトリのURL: + リモートのgitリポジトリのURL + URLをコピー + 削除... + 編集... + フェッチ + ブラウザで開く + 削除 + ワークツリーの削除を確認 + `--force` オプションを有効化 + 対象: + ブランチの名前を編集 + 新しい名前: + このブランチにつける一意な名前 + ブランチ: + 中止 + リモートから変更を自動取得中... + クリーンアップ(GC & Prune) + このリポジトリに対して`git gc`コマンドを実行します。 + すべてのフィルターをクリア + リポジトリの設定 + 続ける + カスタムアクション + カスタムアクションがありません + `--reflog` オプションを有効化 + ファイルブラウザーで開く + ブランチ/タグ/サブモジュールを検索 + 解除 + コミットグラフで非表示 + コミットグラフでフィルター + `--first-parent` オプションを有効化 + レイアウト + 水平 + 垂直 + コミットの並び順 + 日時 + トポロジカルソート + ローカル ブランチ + HEADに移動 + ブランチを作成 + 通知をクリア + グラフで現在のブランチを強調表示 + {0} で開く + 外部ツールで開く + 更新 + リモート + リモートを追加 + コミットを検索 + 著者 + コミッター + ファイル + メッセージ + SHA + 現在のブランチ + タグをツリーとして表示 + スキップ + 統計 + サブモジュール + サブモジュールを追加 + サブモジュールを更新 + タグ + 新しいタグを作成 + 作成者日時 + 名前 (昇順) + 名前 (降順) + ソート + ターミナルで開く + 履歴に相対時間を使用 + ワークツリー + ワークツリーを追加 + 削除 + GitリポジトリのURL + 現在のブランチをリビジョンにリセット + リセットモード: + 移動先: + 現在のブランチ: + ファイルエクスプローラーで表示 + コミットを戻す + コミット: + コミットの変更を戻す + コミットメッセージを書き直す + 改行には'Shift+Enter'キーを使用します。 'Enter"はOKボタンのホットキーとして機能します。 + 実行中です。しばらくお待ちください... + 保存 + 名前を付けて保存... + パッチが正常に保存されました! + リポジトリをスキャン + ルートディレクトリ: + 更新を確認 + 新しいバージョンのソフトウェアが利用可能です: + 更新の確認に失敗しました! + ダウンロード + このバージョンをスキップ + ソフトウェアの更新 + 利用可能なアップデートはありません + トラッキングブランチを設定 + ブランチ: + 上流ブランチを解除 + 上流ブランチ: + SHAをコピー + Go to + スカッシュコミット + 宛先: + SSH プライベートキー: + プライベートSSHキーストアのパス + スタート + スタッシュ + スタッシュ後に自動で復元 + 作業ファイルは変更されず、スタッシュが保存されます。 + 追跡されていないファイルを含める + ステージされたファイルを保持 + メッセージ: + オプション. このスタッシュの名前を入力 + ステージされた変更のみ + 選択したファイルの、ステージされた変更とステージされていない変更の両方がスタッシュされます!!! + ローカルの変更をスタッシュ + 適用 + 破棄 + パッチとして保存 + スタッシュを破棄 + 破棄: + スタッシュ + 変更 + スタッシュ + 統計 + コミット + コミッター + 月間 + 週間 + コミット: + 著者: + 概要 + サブモジュール + サブモジュールを追加 + 相対パスをコピー + ネストされたサブモジュールを取得する + サブモジュールのリポジトリを開く + 相対パス: + このモジュールを保存するフォルダの相対パス + サブモジュールを削除 + OK + タグ名をコピー + タグメッセージをコピー + ${0}$ を削除... + ${0}$ を ${1}$ にマージ... + ${0}$ をプッシュ... + URL: + サブモジュールを更新 + すべてのサブモジュール + 必要に応じて初期化 + 再帰的に更新 + サブモジュール: + --remoteオプションを使用 + 警告 + ようこそ + グループを作成 + サブグループを作成 + リポジトリをクローンする + 削除 + ドラッグ & ドロップでフォルダを追加できます. グループを作成したり、変更したりできます。 + 編集 + 別のグループに移動 + すべてのリポジトリを開く + リポジトリを開く + ターミナルを開く + デフォルトのクローンディレクトリ内のリポジトリを再スキャン + リポジトリを検索... + ソート + 変更 + Git Ignore + すべての*{0}ファイルを無視 + 同じフォルダ内の*{0}ファイルを無視 + 同じフォルダ内のファイルを無視 + このファイルのみを無視 + Amend + このファイルを今すぐステージできます。 + コミット + コミットしてプッシュ + メッセージのテンプレート/履歴 + クリックイベントをトリガー + コミット (Edit) + すべての変更をステージしてコミット + 空のコミットが検出されました。続行しますか? (--allow-empty) + 競合が検出されました + ファイルの競合は解決されました + 追跡されていないファイルを含める + 最近の入力メッセージはありません + コミットテンプレートはありません + サインオフ + ステージしたファイル + ステージを取り消し + すべてステージを取り消し + 未ステージのファイル + ステージへ移動 + すべてステージへ移動 + 変更されていないとみなしたものを表示 + テンプレート: ${0}$ + 選択したファイルを右クリックし、競合を解決する操作を選択してください。 + ワークスペース: + ワークスペースを設定... + ワークツリー + パスをコピー + ロック + 削除 + ロック解除 + From 17d285d9bf410a76b2ea32dcaccabd235b82367b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 01:53:35 +0000 Subject: [PATCH 027/524] doc: Update translation status and missing keys --- TRANSLATION.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/TRANSLATION.md b/TRANSLATION.md index 711564ef..b344e6a3 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -38,6 +38,16 @@ This document shows the translation status of each locale file in the repository +### ![ja__JP](https://img.shields.io/badge/ja__JP-99.73%25-yellow) + +
+Missing keys in ja_JP.axaml + +- Text.Repository.FilterCommits +- Text.Repository.Tags.OrderByNameDes + +
+ ### ![pt__BR](https://img.shields.io/badge/pt__BR-90.98%25-yellow)
From c615d04038cdbc1fda6f3a085070feb750803e15 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 09:54:35 +0800 Subject: [PATCH 028/524] doc: update README.md for Japanese support Signed-off-by: leo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d63886ed..aacf222e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * Supports Windows/macOS/Linux * Opensource/Free * Fast -* Deutsch/English/Español/Français/Italiano/Português/Русский/简体中文/繁體中文 +* Deutsch/English/Español/Français/Italiano/Português/Русский/简体中文/繁體中文/日本語 * Built-in light/dark themes * Customize theme * Visual commit graph From 8c9cf05c1d393bcfe1381b1358d3e4f33404cae9 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 10:14:02 +0800 Subject: [PATCH 029/524] fix: renamed files are missing in commit changes and stash changes (#1151) Signed-off-by: leo --- src/Commands/CompareRevisions.cs | 18 +++++++++++++----- src/Commands/QueryStashChanges.cs | 18 +++++++++++++----- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/Commands/CompareRevisions.cs b/src/Commands/CompareRevisions.cs index e311a88e..c3206767 100644 --- a/src/Commands/CompareRevisions.cs +++ b/src/Commands/CompareRevisions.cs @@ -6,8 +6,10 @@ namespace SourceGit.Commands { public partial class CompareRevisions : Command { - [GeneratedRegex(@"^([MADRC])\s+(.+)$")] + [GeneratedRegex(@"^([MADC])\s+(.+)$")] private static partial Regex REG_FORMAT(); + [GeneratedRegex(@"^R[0-9]{0,4}\s+(.+)$")] + private static partial Regex REG_RENAME_FORMAT(); public CompareRevisions(string repo, string start, string end) { @@ -38,7 +40,17 @@ namespace SourceGit.Commands { var match = REG_FORMAT().Match(line); if (!match.Success) + { + match = REG_RENAME_FORMAT().Match(line); + if (match.Success) + { + var renamed = new Models.Change() { Path = match.Groups[1].Value }; + renamed.Set(Models.ChangeState.Renamed); + _changes.Add(renamed); + } + return; + } var change = new Models.Change() { Path = match.Groups[2].Value }; var status = match.Groups[1].Value; @@ -57,10 +69,6 @@ namespace SourceGit.Commands change.Set(Models.ChangeState.Deleted); _changes.Add(change); break; - case 'R': - change.Set(Models.ChangeState.Renamed); - _changes.Add(change); - break; case 'C': change.Set(Models.ChangeState.Copied); _changes.Add(change); diff --git a/src/Commands/QueryStashChanges.cs b/src/Commands/QueryStashChanges.cs index 7fc27ea3..92240569 100644 --- a/src/Commands/QueryStashChanges.cs +++ b/src/Commands/QueryStashChanges.cs @@ -9,8 +9,10 @@ namespace SourceGit.Commands /// public partial class QueryStashChanges : Command { - [GeneratedRegex(@"^([MADRC])\s+(.+)$")] + [GeneratedRegex(@"^([MADC])\s+(.+)$")] private static partial Regex REG_FORMAT(); + [GeneratedRegex(@"^R[0-9]{0,4}\s+(.+)$")] + private static partial Regex REG_RENAME_FORMAT(); public QueryStashChanges(string repo, string stash) { @@ -31,7 +33,17 @@ namespace SourceGit.Commands { var match = REG_FORMAT().Match(line); if (!match.Success) + { + match = REG_RENAME_FORMAT().Match(line); + if (match.Success) + { + var renamed = new Models.Change() { Path = match.Groups[1].Value }; + renamed.Set(Models.ChangeState.Renamed); + outs.Add(renamed); + } + continue; + } var change = new Models.Change() { Path = match.Groups[2].Value }; var status = match.Groups[1].Value; @@ -50,10 +62,6 @@ namespace SourceGit.Commands change.Set(Models.ChangeState.Deleted); outs.Add(change); break; - case 'R': - change.Set(Models.ChangeState.Renamed); - outs.Add(change); - break; case 'C': change.Set(Models.ChangeState.Copied); outs.Add(change); From ac7b02590ba846905b5492900e02a82b5852d01b Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 10:23:37 +0800 Subject: [PATCH 030/524] enhance: add comma between date and time (#1150) Signed-off-by: leo --- src/Models/DateTimeFormat.cs | 22 +++++++++++----------- src/Views/Histories.axaml | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Models/DateTimeFormat.cs b/src/Models/DateTimeFormat.cs index 4e71a74f..4e8aa550 100644 --- a/src/Models/DateTimeFormat.cs +++ b/src/Models/DateTimeFormat.cs @@ -32,17 +32,17 @@ namespace SourceGit.Models public static readonly List Supported = new List { - new DateTimeFormat("yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss"), - new DateTimeFormat("yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss"), - new DateTimeFormat("yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss"), - new DateTimeFormat("MM/dd/yyyy", "MM/dd/yyyy HH:mm:ss"), - new DateTimeFormat("MM.dd.yyyy", "MM.dd.yyyy HH:mm:ss"), - new DateTimeFormat("MM-dd-yyyy", "MM-dd-yyyy HH:mm:ss"), - new DateTimeFormat("dd/MM/yyyy", "dd/MM/yyyy HH:mm:ss"), - new DateTimeFormat("dd.MM.yyyy", "dd.MM.yyyy HH:mm:ss"), - new DateTimeFormat("dd-MM-yyyy", "dd-MM-yyyy HH:mm:ss"), - new DateTimeFormat("MMM d yyyy", "MMM d yyyy HH:mm:ss"), - new DateTimeFormat("d MMM yyyy", "d MMM yyyy HH:mm:ss"), + new DateTimeFormat("yyyy/MM/dd", "yyyy/MM/dd, HH:mm:ss"), + new DateTimeFormat("yyyy.MM.dd", "yyyy.MM.dd, HH:mm:ss"), + new DateTimeFormat("yyyy-MM-dd", "yyyy-MM-dd, HH:mm:ss"), + new DateTimeFormat("MM/dd/yyyy", "MM/dd/yyyy, HH:mm:ss"), + new DateTimeFormat("MM.dd.yyyy", "MM.dd.yyyy, HH:mm:ss"), + new DateTimeFormat("MM-dd-yyyy", "MM-dd-yyyy, HH:mm:ss"), + new DateTimeFormat("dd/MM/yyyy", "dd/MM/yyyy, HH:mm:ss"), + new DateTimeFormat("dd.MM.yyyy", "dd.MM.yyyy, HH:mm:ss"), + new DateTimeFormat("dd-MM-yyyy", "dd-MM-yyyy, HH:mm:ss"), + new DateTimeFormat("MMM d yyyy", "MMM d yyyy, HH:mm:ss"), + new DateTimeFormat("d MMM yyyy", "d MMM yyyy, HH:mm:ss"), }; private static readonly DateTime _example = new DateTime(2025, 1, 31, 8, 0, 0, DateTimeKind.Local); diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index 4fd8909d..96340d1e 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -195,7 +195,7 @@ - + Date: Mon, 7 Apr 2025 04:37:58 +0200 Subject: [PATCH 031/524] In Local Changes, added filter-box in Staged area, to match Unstaged area (#1153) Also added minimal handling (RaiseException) if trying to commit with active filter (might commit more changes than visible, so disallow). Minor unification in unstageChanges() to make it more similar to StageChanges(). --- src/ViewModels/WorkingCopy.cs | 70 ++++++++++++++++++++++++++++------- src/Views/WorkingCopy.axaml | 39 +++++++++++++++++-- 2 files changed, 92 insertions(+), 17 deletions(-) diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 40b4c50c..3e6f6fbd 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -109,12 +109,28 @@ namespace SourceGit.ViewModels if (_isLoadingData) return; - VisibleUnstaged = GetVisibleUnstagedChanges(_unstaged); + VisibleUnstaged = GetVisibleChanges(_unstaged, _unstagedFilter); SelectedUnstaged = []; } } } + public string StagedFilter + { + get => _stagedFilter; + set + { + if (SetProperty(ref _stagedFilter, value)) + { + if (_isLoadingData) + return; + + VisibleStaged = GetVisibleChanges(_staged, _stagedFilter); + SelectedStaged = []; + } + } + } + public List Unstaged { get => _unstaged; @@ -133,6 +149,12 @@ namespace SourceGit.ViewModels private set => SetProperty(ref _staged, value); } + public List VisibleStaged + { + get => _visibleStaged; + private set => SetProperty(ref _visibleStaged, value); + } + public List SelectedUnstaged { get => _selectedUnstaged; @@ -216,6 +238,9 @@ namespace SourceGit.ViewModels _visibleUnstaged.Clear(); OnPropertyChanged(nameof(VisibleUnstaged)); + _visibleStaged.Clear(); + OnPropertyChanged(nameof(VisibleStaged)); + _unstaged.Clear(); OnPropertyChanged(nameof(Unstaged)); @@ -269,7 +294,7 @@ namespace SourceGit.ViewModels } } - var visibleUnstaged = GetVisibleUnstagedChanges(unstaged); + var visibleUnstaged = GetVisibleChanges(unstaged, _unstagedFilter); var selectedUnstaged = new List(); foreach (var c in visibleUnstaged) { @@ -278,8 +303,10 @@ namespace SourceGit.ViewModels } var staged = GetStagedChanges(); + + var visibleStaged = GetVisibleChanges(staged, _stagedFilter); var selectedStaged = new List(); - foreach (var c in staged) + foreach (var c in visibleStaged) { if (lastSelectedStaged.Contains(c.Path)) selectedStaged.Add(c); @@ -290,6 +317,7 @@ namespace SourceGit.ViewModels _isLoadingData = true; HasUnsolvedConflicts = hasConflict; VisibleUnstaged = visibleUnstaged; + VisibleStaged = visibleStaged; Unstaged = unstaged; Staged = staged; SelectedUnstaged = selectedUnstaged; @@ -337,7 +365,7 @@ namespace SourceGit.ViewModels public void UnstageAll() { - UnstageChanges(_staged, null); + UnstageChanges(_visibleStaged, null); } public void Discard(List changes) @@ -350,6 +378,11 @@ namespace SourceGit.ViewModels { UnstagedFilter = string.Empty; } + + public void ClearStagedFilter() + { + StagedFilter = string.Empty; + } public async void UseTheirs(List changes) { @@ -1472,16 +1505,16 @@ namespace SourceGit.ViewModels return menu; } - private List GetVisibleUnstagedChanges(List unstaged) + private List GetVisibleChanges(List changes, string filter) { - if (string.IsNullOrEmpty(_unstagedFilter)) - return unstaged; + if (string.IsNullOrEmpty(filter)) + return changes; var visible = new List(); - foreach (var c in unstaged) + foreach (var c in changes) { - if (c.Path.Contains(_unstagedFilter, StringComparison.OrdinalIgnoreCase)) + if (c.Path.Contains(filter, StringComparison.OrdinalIgnoreCase)) visible.Add(c); } @@ -1599,7 +1632,8 @@ namespace SourceGit.ViewModels private async void UnstageChanges(List changes, Models.Change next) { - if (changes.Count == 0) + var count = changes.Count; + if (count == 0) return; // Use `_selectedStaged` instead of `SelectedStaged` to avoid UI refresh. @@ -1611,16 +1645,15 @@ namespace SourceGit.ViewModels { await Task.Run(() => new Commands.UnstageChangesForAmend(_repo.FullPath, changes).Exec()); } - else if (changes.Count == _staged.Count) + else if (count == _staged.Count) { await Task.Run(() => new Commands.Reset(_repo.FullPath).Exec()); } else { - for (int i = 0; i < changes.Count; i += 10) + for (int i = 0; i < count; i += 10) { - var count = Math.Min(10, changes.Count - i); - var step = changes.GetRange(i, count); + var step = changes.GetRange(i, Math.Min(10, count - i)); await Task.Run(() => new Commands.Reset(_repo.FullPath, step).Exec()); } } @@ -1650,6 +1683,13 @@ namespace SourceGit.ViewModels return; } + if (!string.IsNullOrEmpty(_stagedFilter)) + { + // FIXME - make this a proper warning message-box "Staged-area filter will not be applied to commit. Continue?" Yes/No + App.RaiseException(_repo.FullPath, "Committing with staged-area filter applied is NOT allowed!"); + return; + } + if (string.IsNullOrWhiteSpace(_commitMessage)) { App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!"); @@ -1729,11 +1769,13 @@ namespace SourceGit.ViewModels private List _unstaged = []; private List _visibleUnstaged = []; private List _staged = []; + private List _visibleStaged = []; private List _selectedUnstaged = []; private List _selectedStaged = []; private int _count = 0; private object _detailContext = null; private string _unstagedFilter = string.Empty; + private string _stagedFilter = string.Empty; private string _commitMessage = string.Empty; private bool _hasUnsolvedConflicts = false; diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 4d79135d..6af2b448 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -129,7 +129,7 @@ Background="{DynamicResource Brush.Border0}"/> - + @@ -156,14 +156,47 @@ + + + + + + + + + + + + + - Date: Mon, 7 Apr 2025 11:45:14 +0800 Subject: [PATCH 032/524] code_review: PR #1153 - use a single filter for both unstage and staged files - show confirm dialog if staged files are displayed partially Signed-off-by: leo --- src/Resources/Locales/en_US.axaml | 1 + src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + src/ViewModels/ConfirmCommit.cs | 26 +++++ src/ViewModels/ConfirmCommitWithoutFiles.cs | 19 ---- src/ViewModels/WorkingCopy.cs | 75 +++++------- ...WithoutFiles.axaml => ConfirmCommit.axaml} | 6 +- ...tFiles.axaml.cs => ConfirmCommit.axaml.cs} | 10 +- src/Views/WorkingCopy.axaml | 107 +++++++----------- 9 files changed, 103 insertions(+), 143 deletions(-) create mode 100644 src/ViewModels/ConfirmCommit.cs delete mode 100644 src/ViewModels/ConfirmCommitWithoutFiles.cs rename src/Views/{ConfirmCommitWithoutFiles.axaml => ConfirmCommit.axaml} (92%) rename src/Views/{ConfirmCommitWithoutFiles.axaml.cs => ConfirmCommit.axaml.cs} (57%) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 5ff1e3a4..61140173 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -719,6 +719,7 @@ Trigger click event Commit (Edit) Stage all changes and commit + You have staged {0} file(s) but only {1} file(s) displayed ({2} files are filtered out). Do you want to continue? Empty commit detected! Do you want to continue (--allow-empty)? CONFLICTS DETECTED FILE CONFLICTS ARE RESOLVED diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 8d2b4f1e..fec5c780 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -723,6 +723,7 @@ 触发点击事件 提交(修改原始提交) 自动暂存所有变更并提交 + 当前有 {0} 个文件在暂存区中,但仅显示了 {1} 个文件({2} 个文件被过滤掉了),是否继续提交? 提交未包含变更文件!是否继续(--allow-empty)? 检测到冲突 文件冲突已解决 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 8e823f68..66bcc33a 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -722,6 +722,7 @@ 觸發點擊事件 提交 (修改原始提交) 自動暫存全部變更並提交 + 您已暫存 {0} 檔案,但只顯示 {1} 檔案 ({2} 檔案被篩選器隱藏)。您要繼續嗎? 未包含任何檔案變更! 您是否仍要提交 (--allow-empty)? 檢測到衝突 檔案衝突已解決 diff --git a/src/ViewModels/ConfirmCommit.cs b/src/ViewModels/ConfirmCommit.cs new file mode 100644 index 00000000..cea56948 --- /dev/null +++ b/src/ViewModels/ConfirmCommit.cs @@ -0,0 +1,26 @@ +using System; + +namespace SourceGit.ViewModels +{ + public class ConfirmCommit + { + public string Message + { + get; + private set; + } + + public ConfirmCommit(string message, Action onSure) + { + Message = message; + _onSure = onSure; + } + + public void Continue() + { + _onSure?.Invoke(); + } + + private Action _onSure; + } +} diff --git a/src/ViewModels/ConfirmCommitWithoutFiles.cs b/src/ViewModels/ConfirmCommitWithoutFiles.cs deleted file mode 100644 index 3249fba8..00000000 --- a/src/ViewModels/ConfirmCommitWithoutFiles.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace SourceGit.ViewModels -{ - public class ConfirmCommitWithoutFiles - { - public ConfirmCommitWithoutFiles(WorkingCopy wc, bool autoPush) - { - _wc = wc; - _autoPush = autoPush; - } - - public void Continue() - { - _wc.CommitWithoutFiles(_autoPush); - } - - private readonly WorkingCopy _wc; - private bool _autoPush; - } -} diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 3e6f6fbd..a0933ea3 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -99,38 +99,23 @@ namespace SourceGit.ViewModels } } - public string UnstagedFilter + public string Filter { - get => _unstagedFilter; + get => _filter; set { - if (SetProperty(ref _unstagedFilter, value)) + if (SetProperty(ref _filter, value)) { if (_isLoadingData) return; - VisibleUnstaged = GetVisibleChanges(_unstaged, _unstagedFilter); + VisibleUnstaged = GetVisibleChanges(_unstaged); + VisibleStaged = GetVisibleChanges(_staged); SelectedUnstaged = []; } } } - public string StagedFilter - { - get => _stagedFilter; - set - { - if (SetProperty(ref _stagedFilter, value)) - { - if (_isLoadingData) - return; - - VisibleStaged = GetVisibleChanges(_staged, _stagedFilter); - SelectedStaged = []; - } - } - } - public List Unstaged { get => _unstaged; @@ -294,7 +279,7 @@ namespace SourceGit.ViewModels } } - var visibleUnstaged = GetVisibleChanges(unstaged, _unstagedFilter); + var visibleUnstaged = GetVisibleChanges(unstaged); var selectedUnstaged = new List(); foreach (var c in visibleUnstaged) { @@ -304,7 +289,7 @@ namespace SourceGit.ViewModels var staged = GetStagedChanges(); - var visibleStaged = GetVisibleChanges(staged, _stagedFilter); + var visibleStaged = GetVisibleChanges(staged); var selectedStaged = new List(); foreach (var c in visibleStaged) { @@ -374,14 +359,9 @@ namespace SourceGit.ViewModels _repo.ShowPopup(new Discard(_repo, changes)); } - public void ClearUnstagedFilter() + public void ClearFilter() { - UnstagedFilter = string.Empty; - } - - public void ClearStagedFilter() - { - StagedFilter = string.Empty; + Filter = string.Empty; } public async void UseTheirs(List changes) @@ -571,11 +551,6 @@ namespace SourceGit.ViewModels DoCommit(false, true, false); } - public void CommitWithoutFiles(bool autoPush) - { - DoCommit(false, autoPush, true); - } - public ContextMenu CreateContextMenuForUnstagedChanges() { if (_selectedUnstaged == null || _selectedUnstaged.Count == 0) @@ -1505,16 +1480,16 @@ namespace SourceGit.ViewModels return menu; } - private List GetVisibleChanges(List changes, string filter) + private List GetVisibleChanges(List changes) { - if (string.IsNullOrEmpty(filter)) + if (string.IsNullOrEmpty(_filter)) return changes; var visible = new List(); foreach (var c in changes) { - if (c.Path.Contains(filter, StringComparison.OrdinalIgnoreCase)) + if (c.Path.Contains(_filter, StringComparison.OrdinalIgnoreCase)) visible.Add(c); } @@ -1675,7 +1650,7 @@ namespace SourceGit.ViewModels DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged), _detailContext as DiffContext); } - private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty) + private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty = false, bool confirmWithFilter = false) { if (!_repo.CanCreatePopup()) { @@ -1683,10 +1658,17 @@ namespace SourceGit.ViewModels return; } - if (!string.IsNullOrEmpty(_stagedFilter)) + if (!string.IsNullOrEmpty(_filter) && _staged.Count > _visibleStaged.Count && !confirmWithFilter) { - // FIXME - make this a proper warning message-box "Staged-area filter will not be applied to commit. Continue?" Yes/No - App.RaiseException(_repo.FullPath, "Committing with staged-area filter applied is NOT allowed!"); + var confirmMessage = App.Text("WorkingCopy.ConfirmCommitWithFilter", _staged.Count, _visibleStaged.Count, _staged.Count - _visibleStaged.Count); + App.OpenDialog(new Views.ConfirmCommit() + { + DataContext = new ConfirmCommit(confirmMessage, () => + { + DoCommit(autoStage, autoPush, allowEmpty, true); + }) + }); + return; } @@ -1700,9 +1682,13 @@ namespace SourceGit.ViewModels { if ((autoStage && _count == 0) || (!autoStage && _staged.Count == 0)) { - App.OpenDialog(new Views.ConfirmCommitWithoutFiles() + var confirmMessage = App.Text("WorkingCopy.ConfirmCommitWithoutFiles"); + App.OpenDialog(new Views.ConfirmCommit() { - DataContext = new ConfirmCommitWithoutFiles(this, autoPush) + DataContext = new ConfirmCommit(confirmMessage, () => + { + DoCommit(autoStage, autoPush, true, confirmWithFilter); + }) }); return; @@ -1774,8 +1760,7 @@ namespace SourceGit.ViewModels private List _selectedStaged = []; private int _count = 0; private object _detailContext = null; - private string _unstagedFilter = string.Empty; - private string _stagedFilter = string.Empty; + private string _filter = string.Empty; private string _commitMessage = string.Empty; private bool _hasUnsolvedConflicts = false; diff --git a/src/Views/ConfirmCommitWithoutFiles.axaml b/src/Views/ConfirmCommit.axaml similarity index 92% rename from src/Views/ConfirmCommitWithoutFiles.axaml rename to src/Views/ConfirmCommit.axaml index 4c9fd1c8..77bbdb30 100644 --- a/src/Views/ConfirmCommitWithoutFiles.axaml +++ b/src/Views/ConfirmCommit.axaml @@ -5,8 +5,8 @@ xmlns:v="using:SourceGit.Views" xmlns:vm="using:SourceGit.ViewModels" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" - x:Class="SourceGit.Views.ConfirmCommitWithoutFiles" - x:DataType="vm:ConfirmCommitWithoutFiles" + x:Class="SourceGit.Views.ConfirmCommit" + x:DataType="vm:ConfirmCommit" x:Name="ThisControl" Icon="/App.ico" Title="{DynamicResource Text.Warn}" @@ -38,7 +38,7 @@ - + diff --git a/src/Views/ConfirmCommitWithoutFiles.axaml.cs b/src/Views/ConfirmCommit.axaml.cs similarity index 57% rename from src/Views/ConfirmCommitWithoutFiles.axaml.cs rename to src/Views/ConfirmCommit.axaml.cs index 342600fc..1cf770cb 100644 --- a/src/Views/ConfirmCommitWithoutFiles.axaml.cs +++ b/src/Views/ConfirmCommit.axaml.cs @@ -2,20 +2,16 @@ using Avalonia.Interactivity; namespace SourceGit.Views { - public partial class ConfirmCommitWithoutFiles : ChromelessWindow + public partial class ConfirmCommit : ChromelessWindow { - public ConfirmCommitWithoutFiles() + public ConfirmCommit() { InitializeComponent(); } private void Sure(object _1, RoutedEventArgs _2) { - if (DataContext is ViewModels.ConfirmCommitWithoutFiles vm) - { - vm.Continue(); - } - + (DataContext as ViewModels.ConfirmCommit)?.Continue(); Close(); } diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 6af2b448..94dd0c30 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -19,13 +19,46 @@ + + + + + + + + + + + + + + - + @@ -75,40 +108,8 @@ - - - - - - - - - - - - - - - - + @@ -155,41 +156,9 @@ ViewMode="{Binding Source={x:Static vm:Preferences.Instance}, Path=StagedChangeViewMode, Mode=TwoWay}"/> - - - - - - - - - - - - - - Date: Mon, 7 Apr 2025 03:48:59 +0000 Subject: [PATCH 033/524] doc: Update translation status and missing keys --- TRANSLATION.md | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index b344e6a3..6ebb72c1 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-98.65%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-98.52%25-yellow)
Missing keys in de_DE.axaml @@ -21,34 +21,51 @@ This document shows the translation status of each locale file in the repository - Text.Preferences.Appearance.EditorTabWidth - Text.Preferences.General.ShowTagsInGraph - Text.StashCM.SaveAsPatch +- Text.WorkingCopy.ConfirmCommitWithFilter
-### ![es__ES](https://img.shields.io/badge/es__ES-%E2%88%9A-brightgreen) +### ![es__ES](https://img.shields.io/badge/es__ES-99.87%25-yellow) -### ![fr__FR](https://img.shields.io/badge/fr__FR-%E2%88%9A-brightgreen) +
+Missing keys in es_ES.axaml -### ![it__IT](https://img.shields.io/badge/it__IT-99.73%25-yellow) +- Text.WorkingCopy.ConfirmCommitWithFilter + +
+ +### ![fr__FR](https://img.shields.io/badge/fr__FR-99.87%25-yellow) + +
+Missing keys in fr_FR.axaml + +- Text.WorkingCopy.ConfirmCommitWithFilter + +
+ +### ![it__IT](https://img.shields.io/badge/it__IT-99.60%25-yellow)
Missing keys in it_IT.axaml - Text.CopyFullPath - Text.Preferences.General.ShowTagsInGraph +- Text.WorkingCopy.ConfirmCommitWithFilter
-### ![ja__JP](https://img.shields.io/badge/ja__JP-99.73%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-99.60%25-yellow)
Missing keys in ja_JP.axaml - Text.Repository.FilterCommits - Text.Repository.Tags.OrderByNameDes +- Text.WorkingCopy.ConfirmCommitWithFilter
-### ![pt__BR](https://img.shields.io/badge/pt__BR-90.98%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-90.86%25-yellow)
Missing keys in pt_BR.axaml @@ -119,11 +136,19 @@ This document shows the translation status of each locale file in the repository - Text.Stash.AutoRestore.Tip - Text.StashCM.SaveAsPatch - Text.WorkingCopy.CommitToEdit +- Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.SignOff
-### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) + +
+Missing keys in ru_RU.axaml + +- Text.WorkingCopy.ConfirmCommitWithFilter + +
### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) From b65c697e5b6e9af4c3f82a252fbf97a6f4582c68 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 12:00:45 +0800 Subject: [PATCH 034/524] version: Release 2025.12 Signed-off-by: leo --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 75c26f38..8283ecf3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2025.11 \ No newline at end of file +2025.12 \ No newline at end of file From 39f7f119dd7784f10c9b462d1cc284c22b981423 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 12:06:06 +0800 Subject: [PATCH 035/524] doc: always show current translation status in `develop` branch Signed-off-by: leo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aacf222e..75af9d2c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ ## Translation Status -You can find the current translation status in [TRANSLATION.md](TRANSLATION.md) +You can find the current translation status in [TRANSLATION.md](https://github.com/sourcegit-scm/sourcegit/blob/develop/TRANSLATION.md) ## How to Use From ad9021e8920815198d655faa76abbcfdc1ca5f6c Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 14:07:58 +0800 Subject: [PATCH 036/524] enhance: allow using `+` character in branch name (#1152) Signed-off-by: leo --- src/ViewModels/CreateBranch.cs | 2 +- src/ViewModels/RenameBranch.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ViewModels/CreateBranch.cs b/src/ViewModels/CreateBranch.cs index 37db0065..6d7fe27a 100644 --- a/src/ViewModels/CreateBranch.cs +++ b/src/ViewModels/CreateBranch.cs @@ -6,7 +6,7 @@ namespace SourceGit.ViewModels public class CreateBranch : Popup { [Required(ErrorMessage = "Branch name is required!")] - [RegularExpression(@"^[\w \-/\.#]+$", ErrorMessage = "Bad branch name format!")] + [RegularExpression(@"^[\w \-/\.#\+]+$", ErrorMessage = "Bad branch name format!")] [CustomValidation(typeof(CreateBranch), nameof(ValidateBranchName))] public string Name { diff --git a/src/ViewModels/RenameBranch.cs b/src/ViewModels/RenameBranch.cs index 0679a5b5..f78eb46b 100644 --- a/src/ViewModels/RenameBranch.cs +++ b/src/ViewModels/RenameBranch.cs @@ -12,7 +12,7 @@ namespace SourceGit.ViewModels } [Required(ErrorMessage = "Branch name is required!!!")] - [RegularExpression(@"^[\w \-/\.#]+$", ErrorMessage = "Bad branch name format!")] + [RegularExpression(@"^[\w \-/\.#\+]+$", ErrorMessage = "Bad branch name format!")] [CustomValidation(typeof(RenameBranch), nameof(ValidateBranchName))] public string Name { From 3049730dd5c0acee68af771a9d3fa44a874a1ee9 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 14:42:46 +0800 Subject: [PATCH 037/524] feature: add `Preferred Merge Mode` in repository configure (#1156) Signed-off-by: leo --- src/Models/RepositorySettings.cs | 6 ++++ src/Resources/Locales/en_US.axaml | 1 + src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + src/ViewModels/Merge.cs | 9 +++-- src/ViewModels/RepositoryConfigure.cs | 13 +++++++ src/Views/RepositoryConfigure.axaml | 52 ++++++++++++++++++++++----- 7 files changed, 73 insertions(+), 10 deletions(-) diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index 76a7f160..1d326a5e 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -224,6 +224,12 @@ namespace SourceGit.Models set; } = []; + public int PreferredMergeMode + { + get; + set; + } = 0; + public Dictionary CollectHistoriesFilters() { var map = new Dictionary(); diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 61140173..d1e32e84 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -153,6 +153,7 @@ Fetch remotes automatically Minute(s) Default Remote + Preferred Merge Mode ISSUE TRACKER Add Sample Gitee Issue Rule Add Sample Gitee Pull Request Rule diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index fec5c780..932f1237 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -156,6 +156,7 @@ 启用定时自动拉取远程更新 分钟 默认远程 + 默认合并方式 ISSUE追踪 新增匹配Azure DevOps规则 新增匹配Gitee议题规则 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 66bcc33a..88b0ab64 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -156,6 +156,7 @@ 啟用定時自動提取 (fetch) 遠端更新 分鐘 預設遠端存放庫 + 首選合併模式 Issue 追蹤 新增符合 Azure DevOps 規則 新增符合 Gitee 議題規則 diff --git a/src/ViewModels/Merge.cs b/src/ViewModels/Merge.cs index be938867..faadaf57 100644 --- a/src/ViewModels/Merge.cs +++ b/src/ViewModels/Merge.cs @@ -69,9 +69,14 @@ namespace SourceGit.ViewModels private Models.MergeMode AutoSelectMergeMode() { + var preferredMergeModeIdx = _repo.Settings.PreferredMergeMode; + if (preferredMergeModeIdx < 0 || preferredMergeModeIdx > Models.MergeMode.Supported.Length) + preferredMergeModeIdx = 0; + + var defaultMergeMode = Models.MergeMode.Supported[preferredMergeModeIdx]; var config = new Commands.Config(_repo.FullPath).Get($"branch.{Into}.mergeoptions"); if (string.IsNullOrEmpty(config)) - return Models.MergeMode.Supported[0]; + return defaultMergeMode; if (config.Equals("--ff-only", StringComparison.Ordinal)) return Models.MergeMode.Supported[1]; if (config.Equals("--no-ff", StringComparison.Ordinal)) @@ -81,7 +86,7 @@ namespace SourceGit.ViewModels if (config.Equals("--no-commit", StringComparison.Ordinal) || config.Equals("--no-ff --no-commit", StringComparison.Ordinal)) return Models.MergeMode.Supported[4]; - return Models.MergeMode.Supported[0]; + return defaultMergeMode; } private readonly Repository _repo = null; diff --git a/src/ViewModels/RepositoryConfigure.cs b/src/ViewModels/RepositoryConfigure.cs index 3f590758..9a3bc9c4 100644 --- a/src/ViewModels/RepositoryConfigure.cs +++ b/src/ViewModels/RepositoryConfigure.cs @@ -36,6 +36,19 @@ namespace SourceGit.ViewModels } } + public int PreferredMergeMode + { + get => _repo.Settings.PreferredMergeMode; + set + { + if (_repo.Settings.PreferredMergeMode != value) + { + _repo.Settings.PreferredMergeMode = value; + OnPropertyChanged(); + } + } + } + public bool GPGCommitSigningEnabled { get; diff --git a/src/Views/RepositoryConfigure.axaml b/src/Views/RepositoryConfigure.axaml index e41375b9..ee1d6fa8 100644 --- a/src/Views/RepositoryConfigure.axaml +++ b/src/Views/RepositoryConfigure.axaml @@ -44,7 +44,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + From 67fb0b300f90e6582a5343888fb0a719ab7fd197 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 06:43:08 +0000 Subject: [PATCH 038/524] doc: Update translation status and missing keys --- TRANSLATION.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 6ebb72c1..0f44cbcf 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,13 +6,14 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-98.52%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-98.39%25-yellow)
Missing keys in de_DE.axaml - Text.BranchUpstreamInvalid - Text.Configure.CustomAction.WaitForExit +- Text.Configure.Git.PreferredMergeMode - Text.Configure.IssueTracker.AddSampleAzure - Text.CopyFullPath - Text.Diff.First @@ -25,47 +26,51 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-99.87%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-99.73%25-yellow)
Missing keys in es_ES.axaml +- Text.Configure.Git.PreferredMergeMode - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![fr__FR](https://img.shields.io/badge/fr__FR-99.87%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-99.73%25-yellow)
Missing keys in fr_FR.axaml +- Text.Configure.Git.PreferredMergeMode - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![it__IT](https://img.shields.io/badge/it__IT-99.60%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-99.46%25-yellow)
Missing keys in it_IT.axaml +- Text.Configure.Git.PreferredMergeMode - Text.CopyFullPath - Text.Preferences.General.ShowTagsInGraph - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![ja__JP](https://img.shields.io/badge/ja__JP-99.60%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-99.46%25-yellow)
Missing keys in ja_JP.axaml +- Text.Configure.Git.PreferredMergeMode - Text.Repository.FilterCommits - Text.Repository.Tags.OrderByNameDes - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![pt__BR](https://img.shields.io/badge/pt__BR-90.86%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-90.74%25-yellow)
Missing keys in pt_BR.axaml @@ -86,6 +91,7 @@ This document shows the translation status of each locale file in the repository - Text.CommitDetail.Info.Children - Text.Configure.CustomAction.Scope.Branch - Text.Configure.CustomAction.WaitForExit +- Text.Configure.Git.PreferredMergeMode - Text.Configure.IssueTracker.AddSampleGiteeIssue - Text.Configure.IssueTracker.AddSampleGiteePullRequest - Text.CopyFullPath @@ -141,11 +147,12 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.73%25-yellow)
Missing keys in ru_RU.axaml +- Text.Configure.Git.PreferredMergeMode - Text.WorkingCopy.ConfirmCommitWithFilter
From 3275dd07d226c6c6dc4c6a75b1f83d53108fdcbb Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 16:03:49 +0800 Subject: [PATCH 039/524] enhance: auto stash and re-apply local changes before squashing (#1141) Signed-off-by: leo --- src/ViewModels/Histories.cs | 12 ------------ src/ViewModels/Squash.cs | 21 ++++++++++++++++++++- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 01114dd3..b0bbff3c 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -419,12 +419,6 @@ namespace SourceGit.ViewModels squash.Icon = App.CreateMenuIcon("Icons.SquashIntoParent"); squash.Click += (_, e) => { - if (_repo.LocalChangesCount > 0) - { - App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first."); - return; - } - if (_repo.CanCreatePopup()) _repo.ShowPopup(new Squash(_repo, commit, commit.SHA)); @@ -458,12 +452,6 @@ namespace SourceGit.ViewModels squash.IsEnabled = commit.Parents.Count == 1; squash.Click += (_, e) => { - if (_repo.LocalChangesCount > 0) - { - App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first."); - return; - } - if (commit.Parents.Count == 1) { var parent = _commits.Find(x => x.SHA == commit.Parents[0]); diff --git a/src/ViewModels/Squash.cs b/src/ViewModels/Squash.cs index 198dbe9a..eceb8339 100644 --- a/src/ViewModels/Squash.cs +++ b/src/ViewModels/Squash.cs @@ -33,9 +33,28 @@ namespace SourceGit.ViewModels return Task.Run(() => { - var succ = new Commands.Reset(_repo.FullPath, Target.SHA, "--soft").Exec(); + var autoStashed = false; + var succ = false; + + if (_repo.LocalChangesCount > 0) + { + succ = new Commands.Stash(_repo.FullPath).Push("SQUASH_AUTO_STASH"); + if (!succ) + { + CallUIThread(() => _repo.SetWatcherEnabled(true)); + return false; + } + + autoStashed = true; + } + + succ = new Commands.Reset(_repo.FullPath, Target.SHA, "--soft").Exec(); if (succ) succ = new Commands.Commit(_repo.FullPath, _message, true, _repo.Settings.EnableSignOffForCommit).Run(); + + if (succ && autoStashed) + new Commands.Stash(_repo.FullPath).Pop("stash@{0}"); + CallUIThread(() => _repo.SetWatcherEnabled(true)); return succ; }); From f5c213060eb842a302713ba27178c0f0a0c6e37b Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 20:05:24 +0800 Subject: [PATCH 040/524] localization: keep all keys in order and remove duplicated keys in fr_FR (#1161) Signed-off-by: leo --- src/Resources/Locales/de_DE.axaml | 69 +++++------ src/Resources/Locales/en_US.axaml | 2 +- src/Resources/Locales/es_ES.axaml | 71 +++++------ src/Resources/Locales/fr_FR.axaml | 188 ++++++++++++++---------------- src/Resources/Locales/it_IT.axaml | 73 ++++++------ src/Resources/Locales/ja_JP.axaml | 69 +++++------ src/Resources/Locales/pt_BR.axaml | 90 ++++++-------- src/Resources/Locales/ru_RU.axaml | 92 +++++++-------- src/Resources/Locales/zh_CN.axaml | 70 +++++------ src/Resources/Locales/zh_TW.axaml | 70 +++++------ 10 files changed, 377 insertions(+), 417 deletions(-) diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index bbfe4545..276f44e8 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -2,19 +2,20 @@ + Info Über SourceGit Open Source & freier Git GUI Client Worktree hinzufügen - Was auschecken: - Existierender Branch - Neuen Branch erstellen Ordner: Pfad für diesen Worktree. Relativer Pfad wird unterstützt. Branch Name: Optional. Standard ist der Zielordnername. Branch verfolgen: Remote-Branch verfolgen + Was auschecken: + Neuen Branch erstellen + Existierender Branch OpenAI Assistent Neu generieren Verwende OpenAI, um Commit-Nachrichten zu generieren @@ -63,8 +64,8 @@ Branch Vergleich Bytes ABBRECHEN - Auf diese Revision zurücksetzen Auf Vorgänger-Revision zurücksetzen + Auf diese Revision zurücksetzen Generiere Commit-Nachricht ANZEIGE MODUS ÄNDERN Zeige als Datei- und Ordnerliste @@ -72,12 +73,12 @@ Zeige als Dateisystembaum Branch auschecken Commit auschecken - Warnung: Beim Auschecken eines Commits wird dein HEAD losgelöst (detached) sein! Commit: - Branch: + Warnung: Beim Auschecken eines Commits wird dein HEAD losgelöst (detached) sein! Lokale Änderungen: Verwerfen Stashen & wieder anwenden + Branch: Cherry Pick Quelle an Commit-Nachricht anhängen Commit(s): @@ -96,9 +97,9 @@ Repository URL: SCHLIESSEN Editor + Commit auschecken Diesen Commit cherry-picken Mehrere cherry-picken - Commit auschecken Mit HEAD vergleichen Mit Worktree vergleichen Info kopieren @@ -133,12 +134,12 @@ REFS SHA Im Browser öffnen - Commit-Nachricht Details + Commit-Nachricht Repository Einstellungen COMMIT TEMPLATE - Template Name: Template Inhalt: + Template Name: BENUTZERDEFINIERTE AKTION Argumente: ${REPO} - Repository Pfad; ${SHA} - SHA-Wert des selektierten Commits @@ -158,9 +159,9 @@ Beispiel für Gitee Issue Regel einfügen Beispiel für Gitee Pull Request Regel einfügen Beispiel für Github-Regel hinzufügen - Beispiel für Jira-Regel hinzufügen Beispiel für Gitlab Issue Regel einfügen Beispiel für Gitlab Merge Request einfügen + Beispiel für Jira-Regel hinzufügen Neue Regel Ticketnummer Regex-Ausdruck: Name: @@ -220,9 +221,9 @@ Remote: Pfad: Ziel: - Bestätige löschen von Gruppe Alle Nachfolger werden aus der Liste entfernt. Dadurch wird es nur aus der Liste entfernt, nicht von der Festplatte! + Bestätige löschen von Gruppe Bestätige löschen von Repository Lösche Submodul Submodul Pfad: @@ -289,11 +290,11 @@ Unstage {0} Dateien unstagen Änderungen in ausgewählten Zeilen unstagen - "Ihre" verwenden (checkout --theirs) "Meine" verwenden (checkout --ours) + "Ihre" verwenden (checkout --theirs) Datei Historie - INHALT ÄNDERUNGEN + INHALT Git-Flow Development-Branch: Feature: @@ -323,8 +324,8 @@ Eigenes Muster: Verfolgungsmuster zu Git LFS hinzufügen Fetch - LFS Objekte fetchen Führt `git lfs fetch` aus um Git LFS Objekte herunterzuladen. Das aktualisiert nicht die Arbeitskopie. + LFS Objekte fetchen Installiere Git LFS Hooks Sperren anzeigen Keine gesperrten Dateien @@ -336,11 +337,11 @@ Prune Führt `git lfs prune` aus um alte LFS Dateien von lokalem Speicher zu löschen Pull - LFS Objekte pullen Führt `git lfs pull` aus um alle Git LFS Dasteien für aktuellen Ref & Checkout herunterzuladen + LFS Objekte pullen Push - LFS Objekte pushen Pushe große Dateien in der Warteschlange zum Git LFS Endpunkt + LFS Objekte pushen Remote: Verfolge alle '{0}' Dateien Verfolge alle *{0} Dateien @@ -359,8 +360,8 @@ Aktuelles Popup schließen Klone neues Repository Aktuellen Tab schließen - Zum vorherigen Tab wechseln Zum nächsten Tab wechseln + Zum vorherigen Tab wechseln Neuen Tab erstellen Einstellungen öffnen REPOSITORY @@ -371,11 +372,11 @@ Ausgewählte Änderungen verwerfen Fetch, wird direkt ausgeführt Dashboard Modus (Standard) + Commit-Suchmodus Pull, wird direkt ausgeführt Push, wird direkt ausgeführt Erzwinge Neuladen des Repositorys Ausgewählte Änderungen stagen/unstagen - Commit-Suchmodus Wechsle zu 'Änderungen' Wechsle zu 'Verlauf' Wechsle zu 'Stashes' @@ -384,9 +385,9 @@ Suche nächste Übereinstimmung Suche vorherige Übereinstimmung Öffne Suchpanel + Verwerfen Stagen Unstagen - Verwerfen Initialisiere Repository Pfad: Cherry-Pick wird durchgeführt. @@ -398,10 +399,10 @@ Revert wird durchgeführt. Reverte commit Interaktiver Rebase - Ziel Branch: Auf: - In Browser öffnen + Ziel Branch: Link kopieren + In Browser öffnen FEHLER INFO Branch mergen @@ -427,24 +428,24 @@ Kopiere Repository-Pfad Repositories Einfügen - Gerade eben - Vor {0} Minuten + Vor {0} Tagen Vor 1 Stunde Vor {0} Stunden - Gestern - Vor {0} Tagen + Gerade eben Letzter Monat - Vor {0} Monaten Leztes Jahr + Vor {0} Minuten + Vor {0} Monaten Vor {0} Jahren + Gestern Einstellungen OPEN AI Analysierung des Diff Befehl API Schlüssel Generiere Nachricht Befehl + Modell Name Server - Modell DARSTELLUNG Standardschriftart Schriftgröße @@ -474,24 +475,24 @@ Benutzer Email Globale Git Benutzer Email Aktivere --prune beim fetchen + Diese App setzt Git (>= 2.23.0) voraus Installationspfad Aktiviere HTTP SSL Verifizierung Benutzername Globaler Git Benutzername Git Version - Diese App setzt Git (>= 2.23.0) voraus GPG SIGNIERUNG Commit-Signierung - Tag-Signierung GPG Format GPG Installationspfad Installationspfad zum GPG Programm + Tag-Signierung Benutzer Signierungsschlüssel GPG Benutzer Signierungsschlüssel EINBINDUNGEN SHELL/TERMINAL - Shell/Terminal Pfad + Shell/Terminal Remote löschen Ziel: Worktrees löschen @@ -657,11 +658,11 @@ Statistiken COMMITS COMMITTER + ÜBERSICHT MONAT WOCHE - COMMITS: AUTOREN: - ÜBERSICHT + COMMITS: SUBMODULE Submodul hinzufügen Relativen Pfad kopieren @@ -676,13 +677,13 @@ Lösche ${0}$... Merge ${0}$ in ${1}$ hinein... Pushe ${0}$... - URL: Submodule aktualisieren Alle Submodule Initialisiere wenn nötig Rekursiv Submodul: Verwende `--remote` Option + URL: Warnung Willkommensseite Erstelle Gruppe @@ -718,6 +719,7 @@ NICHT-VERFOLGTE DATEIEN INKLUDIEREN KEINE BISHERIGEN COMMIT-NACHRICHTEN KEINE COMMIT TEMPLATES + Rechtsklick auf selektierte Dateien und wähle die Konfliktlösungen aus. SignOff GESTAGED UNSTAGEN @@ -727,7 +729,6 @@ ALLES STAGEN ALS UNVERÄNDERT ANGENOMMENE ANZEIGEN Template: ${0}$ - Rechtsklick auf selektierte Dateien und wähle die Konfliktlösungen aus. ARBEITSPLATZ: Arbeitsplätze konfigurieren... WORKTREE diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index d1e32e84..97b2a832 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -486,7 +486,7 @@ User Name Global git user name Git version - Git (>= 2.23.0) is required by this app + Git (>= 2.23.0) is required by this app GPG SIGNING Commit GPG signing Tag GPG signing diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 8b4c350f..e6968560 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -2,19 +2,20 @@ + Acerca de Acerca de SourceGit Cliente Git GUI de código abierto y gratuito Agregar Worktree - Qué Checkout: - Rama Existente - Crear Nueva Rama Ubicación: Ruta para este worktree. Se admite ruta relativa. Nombre de la Rama: Opcional. Por defecto es el nombre de la carpeta de destino. Rama de Seguimiento: Seguimiento de rama remota + Qué Checkout: + Crear Nueva Rama + Rama Existente Asistente OpenAI RE-GENERAR Usar OpenAI para generar mensaje de commit @@ -64,8 +65,8 @@ ¡Upstream inválido! Bytes CANCELAR - Resetear a Esta Revisión Resetear a Revisión Padre + Resetear a Esta Revisión Generar mensaje de commit CAMBIAR MODO DE VISUALIZACIÓN Mostrar como Lista de Archivos y Directorios @@ -73,12 +74,12 @@ Mostrar como Árbol de Sistema de Archivos Checkout Rama Checkout Commit - Advertencia: Al hacer un checkout de commit, tu Head se separará Commit: - Rama: + Advertencia: Al hacer un checkout de commit, tu Head se separará Cambios Locales: Descartar Stash & Reaplicar + Rama: Cherry Pick Añadir fuente al mensaje de commit Commit(s): @@ -97,9 +98,9 @@ URL del Repositorio: CERRAR Editor + Checkout Commit Cherry-Pick Este Commit Cherry-Pick ... - Checkout Commit Comparar con HEAD Comparar con Worktree Copiar Información @@ -134,12 +135,12 @@ REFS SHA Abrir en Navegador - Introducir asunto del commit Descripción + Introducir asunto del commit Configurar Repositorio PLANTILLA DE COMMIT - Nombre de la Plantilla: Contenido de la Plantilla: + Nombre de la Plantilla: ACCIÓN PERSONALIZADA Argumentos: ${REPO} - Ruta del repositorio; ${SHA} - SHA del commit seleccionado @@ -157,13 +158,13 @@ Minuto(s) Remoto por Defecto SEGUIMIENTO DE INCIDENCIAS + Añadir Regla de Ejemplo para Azure DevOps Añadir Regla de Ejemplo para Incidencias de Gitee Añadir Regla de Ejemplo para Pull Requests de Gitee Añadir Regla de Ejemplo para Github - Añadir Regla de Ejemplo para Jira - Añadir Regla de Ejemplo para Azure DevOps Añadir Regla de Ejemplo para Incidencias de GitLab Añadir Regla de Ejemplo para Merge Requests de GitLab + Añadir Regla de Ejemplo para Jira Nueva Regla Expresión Regex para Incidencias: Nombre de la Regla: @@ -188,8 +189,8 @@ Tipo de Cambio: Copiar Copiar Todo el Texto - Copiar Ruta Copiar Ruta Completa + Copiar Ruta Crear Rama... Basado En: Checkout de la rama creada @@ -225,8 +226,8 @@ Ruta: Destino: Todos los hijos serán removidos de la lista. - Confirmar Eliminación de Grupo ¡Esto solo lo removera de la lista, no del disco! + Confirmar Eliminación de Grupo Confirmar Eliminación de Repositorio Eliminar Submódulo Ruta del Submódulo: @@ -295,11 +296,11 @@ Unstage Unstage {0} archivos Unstage Cambios en Línea(s) Seleccionada(s) - Usar Suyos (checkout --theirs) Usar Míos (checkout --ours) + Usar Suyos (checkout --theirs) Historial de Archivos - CONTENIDO CAMBIO + CONTENIDO Git-Flow Rama de Desarrollo: Feature: @@ -329,8 +330,8 @@ Patrón Personalizado: Añadir Patrón de Seguimiento a Git LFS Fetch - Fetch Objetos LFS Ejecuta `git lfs fetch` para descargar objetos Git LFS. Esto no actualiza la copia de trabajo. + Fetch Objetos LFS Instalar hooks de Git LFS Mostrar Bloqueos No hay archivos bloqueados @@ -342,11 +343,11 @@ Prune Ejecuta `git lfs prune` para eliminar archivos LFS antiguos del almacenamiento local Pull - Pull Objetos LFS Ejecuta `git lfs pull` para descargar todos los archivos Git LFS para la referencia actual y hacer checkout + Pull Objetos LFS Push - Push Objetos LFS Push archivos grandes en cola al endpoint de Git LFS + Push Objetos LFS Remoto: Seguir archivos llamados '{0}' Seguir todos los archivos *{0} @@ -365,8 +366,8 @@ Cancelar popup actual Clonar repositorio nuevo Cerrar página actual - Ir a la página anterior Ir a la siguiente página + Ir a la página anterior Crear nueva página Abrir diálogo de preferencias REPOSITORIO @@ -377,11 +378,11 @@ Descartar cambios seleccionados Fetch, empieza directamente Modo Dashboard (Por Defecto) + Modo de búsqueda de commits Pull, empieza directamente Push, empieza directamente Forzar a recargar este repositorio Stage/Unstage cambios seleccionados - Modo de búsqueda de commits Cambiar a 'Cambios' Cambiar a 'Historias' Cambiar a 'Stashes' @@ -390,9 +391,9 @@ Buscar siguiente coincidencia Buscar coincidencia anterior Abrir panel de búsqueda + Descartar Stage Unstage - Descartar Inicializar Repositorio Ruta: Cherry-Pick en progreso. @@ -404,10 +405,10 @@ Revert en progreso. Haciendo revert del commit Rebase Interactivo - Rama Objetivo: En: - Abrir en el Navegador + Rama Objetivo: Copiar Enlace + Abrir en el Navegador ERROR AVISO Merge Rama @@ -433,16 +434,16 @@ Copiar Ruta del Repositorio Repositorios Pegar - Justo ahora - Hace {0} minutos + Hace {0} días Hace 1 hora Hace {0} horas - Ayer - Hace {0} días + Justo ahora Último mes - Hace {0} meses Último año + Hace {0} minutos + Hace {0} meses Hace {0} años + Ayer Preferencias Opciones Avanzadas OPEN AI @@ -484,24 +485,24 @@ Email de usuario Email global del usuario git Habilitar --prune para fetch + Se requiere Git (>= 2.23.0) para esta aplicación Ruta de instalación Habilitar verificación HTTP SSL Nombre de usuario Nombre global del usuario git Versión de Git - Se requiere Git (>= 2.23.0) para esta aplicación FIRMA GPG Firma GPG en commit - Firma GPG en etiqueta Formato GPG Ruta de instalación del programa Introducir ruta para el programa gpg instalado + Firma GPG en etiqueta Clave de firma del usuario Clave de firma gpg del usuario INTEGRACIÓN SHELL/TERMINAL - Shell/Terminal Ruta + Shell/Terminal Podar Remoto Destino: Podar Worktrees @@ -668,11 +669,11 @@ Estadísticas COMMITS COMMITTER + GENERAL MES SEMANA - COMMITS: AUTORES: - GENERAL + COMMITS: SUBMÓDULOS Añadir Submódulo Copiar Ruta Relativa @@ -687,13 +688,13 @@ Eliminar ${0}$... Merge ${0}$ en ${1}$... Push ${0}$... - URL: Actualizar Submódulos Todos los submódulos Inicializar según sea necesario Recursivamente Submódulo: Usar opción --remote + URL: Advertencia Página de Bienvenida Crear Grupo @@ -729,6 +730,7 @@ INCLUIR ARCHIVOS NO RASTREADOS NO HAY MENSAJES DE ENTRADA RECIENTES NO HAY PLANTILLAS DE COMMIT + Haz clic derecho en el(los) archivo(s) seleccionado(s) y elige tu opción para resolver conflictos. Firmar STAGED UNSTAGE @@ -738,7 +740,6 @@ STAGE TODO VER ASSUME UNCHANGED Plantilla: ${0}$ - Haz clic derecho en el(los) archivo(s) seleccionado(s) y elige tu opción para resolver conflictos. ESPACIO DE TRABAJO: Configura Espacios de Trabajo... WORKTREE diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index bf238aa2..f3cf80eb 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -2,21 +2,22 @@ + À propos À propos de SourceGit Client Git Open Source et Gratuit Ajouter un Worktree - Que récupérer : - Créer une nouvelle branche - Branche existante Emplacement : Chemin vers ce worktree. Relatif supporté. Nom de branche: Optionnel. Nom du dossier de destination par défaut. Suivre la branche : Suivi de la branche distante + Que récupérer : + Créer une nouvelle branche + Branche existante Assistant IA - RE-GÉNERER + RE-GÉNÉRER Utiliser l'IA pour générer un message de commit APPLIQUER COMME MESSAGE DE COMMIT Appliquer @@ -61,7 +62,7 @@ Renommer ${0}$... Définir la branche de suivi... Comparer les branches - Branche amont invalide ! + Branche en amont invalide! Octets ANNULER Réinitialiser à la révision parente @@ -75,10 +76,10 @@ Récupérer ce commit Commit : Avertissement: une récupération vers un commit aboutiera vers un HEAD détaché - Branche : Changements locaux : Annuler Mettre en stash et réappliquer + Branche : Cherry-Pick de ce commit Ajouter la source au message de commit Commit : @@ -94,13 +95,13 @@ Nom local : Nom de dépôt. Optionnel. Dossier parent : + Initialiser et mettre à jour les sous-modules URL du dépôt : FERMER Éditeur Récupérer ce commit Cherry-Pick ce commit Cherry-Pick ... - Checkout Commit Comparer avec HEAD Comparer avec le worktree Copier les informations @@ -135,20 +136,22 @@ REFS SHA Ouvrir dans le navigateur - Entrez le message du commit Description + Entrez le message du commit Configurer le dépôt MODÈLE DE COMMIT - Nom de modèle: Contenu de modèle: + Nom de modèle: ACTION PERSONNALISÉE Arguments : ${REPO} - Chemin du repository; ${SHA} - SHA du commit sélectionné Fichier exécutable : Nom : Portée : + Branche Commit Repository + Attendre la fin de l'action Adresse e-mail Adresse e-mail GIT @@ -156,13 +159,13 @@ minute(s) Dépôt par défaut SUIVI DES PROBLÈMES + Ajouter une règle d'exemple Azure DevOps Ajouter une règle d'exemple Gitee Ajouter une règle d'exemple pour Pull Request Gitee Ajouter une règle d'exemple Github Ajouter une règle d'exemple pour Incidents GitLab Ajouter une règle d'exemple pour Merge Request GitLab Ajouter une règle d'exemple Jira - Ajouter une règle d'exemple Azure DevOps Nouvelle règle Issue Regex Expression: Nom de règle : @@ -187,8 +190,8 @@ Type de Changement : Copier Copier tout le texte - Copier le chemin Copier le chemin complet + Copier le chemin Créer une branche... Basé sur : Récupérer la branche créée @@ -221,7 +224,10 @@ Vous essayez de supprimer plusieurs branches à la fois. Assurez-vous de revérifier avant de procéder ! Supprimer Remote Remote : + Chemin: Cible : + Tous les enfants seront retirés de la liste. + Cela le supprimera uniquement de la liste, pas du disque ! Confirmer la suppression du groupe Confirmer la suppression du dépôt Supprimer le sous-module @@ -234,7 +240,9 @@ ANCIEN Copier Mode de fichier changé + Première différence Ignorer les changements d'espaces + Dernière différence CHANGEMENT D'OBJET LFS Différence suivante PAS DE CHANGEMENT OU SEULEMENT EN FIN DE LIGNE @@ -247,8 +255,8 @@ Permuter Coloration syntaxique Retour à la ligne - Ouvrir dans l'outil de fusion Activer la navigation par blocs + Ouvrir dans l'outil de fusion Voir toutes les lignes Réduit le nombre de ligne visibles Augmente le nombre de ligne visibles @@ -292,8 +300,8 @@ Utiliser les miennes (checkout --ours) Utiliser les leurs (checkout --theirs) Historique du fichier - CONTENU MODIFICATION + CONTENU Git-Flow Branche de développement : Feature: @@ -323,8 +331,8 @@ Pattern personnalisé : Ajouter un pattern de suivi à Git LFS Fetch - Fetch les objets LFS Lancer `git lfs fetch` pour télécharger les objets Git LFS. Cela ne met pas à jour la copie de travail. + Fetch les objets LFS Installer les hooks Git LFS Afficher les verrous Pas de fichiers verrouillés @@ -336,11 +344,11 @@ Elaguer Lancer `git lfs prune` pour supprimer les anciens fichier LFS du stockage local Pull - Pull les objets LFS Lancer `git lfs pull` pour télécharger tous les fichier Git LFS de la référence actuelle & récupérer + Pull les objets LFS Pousser - Pousser les objets LFS Transférer les fichiers volumineux en file d'attente vers le point de terminaison Git LFS + Pousser les objets LFS Dépôt : Suivre les fichiers appelés '{0}' Suivre tous les fichiers *{0} @@ -359,8 +367,8 @@ Annuler le popup en cours Cloner un nouveau dépôt Fermer la page en cours - Aller à la page précédente Aller à la page suivante + Aller à la page précédente Créer une nouvelle page Ouvrir le dialogue des préférences DÉPÔT @@ -371,11 +379,11 @@ Rejeter les changements sélectionnés Fetch, démarre directement Mode tableau de bord (Défaut) + Recherche de commit Pull, démarre directement Push, démarre directement Forcer le rechargement du dépôt Ajouter/Retirer les changements sélectionnés de l'index - Recherche de commit Basculer vers 'Changements' Basculer vers 'Historique' Basculer vers 'Stashes' @@ -384,25 +392,34 @@ Trouver la prochaine correspondance Trouver la correspondance précédente Ouvrir le panneau de recherche + Rejeter Indexer Retirer de l'index - Rejeter Initialiser le repository Chemin : Cherry-Pick en cours. + Traitement du commit Merge request en cours. + Fusionnement Rebase en cours. + Arrêté à Annulation en cours. + Annulation du commit Rebase interactif - Branche cible : Sur : - Ouvrir dans le navigateur + Branche cible : Copier le lien + Ouvrir dans le navigateur ERREUR NOTICE Merger la branche Dans : Option de merge: + Source: + Fusionner (Plusieurs) + Commit tous les changement + Stratégie: + Cibles: Déplacer le noeud du repository Sélectionnier le noeud parent pour : Nom : @@ -418,16 +435,16 @@ Copier le chemin vers le dépôt Dépôts Coller - A l'instant - il y a {0} minutes + il y a {0} jours il y a 1 heure il y a {0} heures - Hier - il y a {0} jours + A l'instant Le mois dernier - il y a {0} mois L'an dernier + il y a {0} minutes + il y a {0} mois il y a {0} ans + Hier Préférences IA Analyser Diff Prompt @@ -436,10 +453,15 @@ Modèle Nom Serveur + Activer le streaming APPARENCE Police par défaut Taille de police par défaut Taille de police de l'éditeur + Largeur de tab dans l'éditeur + Taille de police + Défaut + Éditeur Police monospace N'utiliser que des polices monospace pour l'éditeur de texte Thème @@ -452,9 +474,12 @@ Outil GÉNÉRAL Vérifier les mises à jour au démarrage + Format de date Language Historique de commits Afficher l'heure de l'auteur au lieu de l'heure de validation dans le graphique + Afficher les enfants dans les détails du commit + Afficher les tags dans le graphique des commits Guide de longueur du sujet GIT Activer auto CRLF @@ -462,24 +487,24 @@ E-mail utilsateur E-mail utilsateur global Activer --prune pour fetch + Cette application requière Git (>= 2.23.0) Chemin d'installation + Activer la vérification HTTP SSL Nom d'utilisateur Nom d'utilisateur global Version de Git - Cette application requière Git (>= 2.23.0) SIGNATURE GPG Signature GPG de commit - Signature GPG de tag Format GPG Chemin d'installation du programme Saisir le chemin d'installation vers le programme GPG + Signature GPG de tag Clé de signature de l'utilisateur Clé de signature GPG de l'utilisateur INTEGRATION SHELL/TERMINAL - Shell/Terminal Chemin - Élaguer une branche distant + Shell/Terminal Cible : Élaguer les Worktrees Élaguer les information de worktree dans `$GIT_COMMON_DIR/worktrees` @@ -539,14 +564,26 @@ Tout effacer Configurer ce repository CONTINUER + Actions personnalisées Pas d'actions personnalisées Activer l'option '--reflog' Ouvrir dans l'explorateur de fichiers Rechercher Branches/Tags/Submodules + Visibilité dans le graphique + Réinitialiser + Cacher dans le graphique des commits + Filtrer dans le graphique des commits Activer l'option '--first-parent' + DISPOSITION + Horizontal + Vertical + ORDRE DES COMMITS + Date du commit + Topologiquement BRANCHES LOCALES Naviguer vers le HEAD Créer une branche + EFFACER LES NOTIFICATIONS Mettre la branche courante en surbrillance dans le graph Ouvrir dans {0} Ouvrir dans un outil externe @@ -561,13 +598,19 @@ SHA Branche actuelle Voir les Tags en tant qu'arbre + PASSER Statistiques SUBMODULES AJOUTER SUBMODULE METTRE A JOUR SUBMODULE TAGS NOUVEAU TAG + Par date de créateur + Par nom (Croissant) + Par nom (Décroissant) + Trier Ouvrir dans un terminal + Utiliser le temps relatif dans les historiques WORKTREES AJOUTER WORKTREE ELAGUER @@ -586,6 +629,7 @@ SAUVEGARDER Sauvegarder en tant que... Le patch a été sauvegardé ! + Analyser les repositories Dossier racine : Rechercher des mises à jour... Une nouvelle version du logiciel est disponible : @@ -594,10 +638,10 @@ Passer cette version Mise à jour du logiciel Il n'y a pas de mise à jour pour le moment. - Définir la branche de suivi - Branche : - Escamoter la branche amont - Branche amont: + Définir la branche suivie + Branche: + Retirer la branche amont + En amont: Copier le SHA Aller à Squash les commits @@ -607,7 +651,7 @@ START Stash Auto-restauration après le stash - Vos fichiers de travail sont inchangés, mais un stash a été sauvegardé. + Vos fichiers de travail restent inchangés, mais une sauvegarde est enregistrée. Inclure les fichiers non-suivis Garder les fichiers indexés Message : @@ -626,11 +670,11 @@ Statistiques COMMITS COMMITTER + APERCU MOIS SEMAINE - COMMITS: AUTEURS : - APERCU + COMMITS: SOUS-MODULES Ajouter un sous-module Copier le chemin relatif @@ -645,13 +689,13 @@ Supprimer ${0}$... Fusionner ${0}$ dans ${1}$... Pousser ${0}$... - URL : Actualiser les sous-modules Tous les sous-modules Initialiser au besoin Récursivement Sous-module : Utiliser l'option --remote + URL : Avertissement Page d'accueil Créer un groupe @@ -679,6 +723,7 @@ COMMIT & POUSSER Modèles/Historiques Trigger click event + Commit (Modifier) Indexer tous les changements et commit Un commit vide a été détecté ! Voulez-vous continuer (--allow-empty) ? CONFLITS DÉTECTÉS @@ -686,6 +731,8 @@ INCLURE LES FICHIERS NON-SUIVIS PAS DE MESSAGE D'ENTRÉE RÉCENT PAS DE MODÈLES DE COMMIT + Faites un clique droit sur les fichiers sélectionnés et faites vos choix pour la résoluion des conflits. + SignOff INDEXÉ RETIRER DE L'INDEX RETIRER TOUT DE L'INDEX @@ -694,7 +741,6 @@ INDEXER TOUT VOIR LES FICHIERS PRÉSUMÉS INCHANGÉS Modèle: ${0}$ - Faites un clique droit sur les fichiers sélectionnés et faites vos choix pour la résoluion des conflits. ESPACE DE TRAVAIL : Configurer les espaces de travail... WORKTREE @@ -702,68 +748,4 @@ Verrouiller Supprimer Déverrouiller - RE-GÉNÉRER - APPLIQUER COMME MESSAGE DE COMMIT - Appliquer le Stash - Supprimer après l'application - Rétablir les modifications de l'index - Stash: - Action personnalisée - Branche en amont invalide! - Initialiser et mettre à jour les sous-modules - Branche - Attendre la fin de l'action - Les espaces seront remplacés par des tirets. - Chemin: - Tous les enfants seront retirés de la liste. - Cela le supprimera uniquement de la liste, pas du disque ! - Première différence - Dernière différence - Traitement du commit - Fusionnement - Arrêté à - Annulation du commit - Source: - Fusionner (Plusieurs) - Commit tous les changement - Stratégie: - Cibles: - Activer le streaming - Largeur de tab dans l'éditeur - Taille de police - Défaut - Éditeur - Format de date - Afficher les enfants dans les détails du commit - Afficher les tags dans le graphique des commits - Activer la vérification HTTP SSL - Actions personnalisées - Visibilité dans le graphique - Réinitialiser - Cacher dans le graphique des commits - Filtrer dans le graphique des commits - DISPOSITION - Horizontal - Vertical - ORDRE DES COMMITS - Date du commit - Topologiquement - EFFACER LES NOTIFICATIONS - PASSER - Par date de créateur - Par nom (Croissant) - Par nom (Décroissant) - Trier - Utiliser le temps relatif dans les historiques - Analyser les repositories - Définir la branche suivie - Branche: - Retirer la branche amont - En amont: - Aller sur - Restauration automatique après le stashing - Vos fichiers de travail restent inchangés, mais une sauvegarde est enregistrée. - Sauvegarder en tant que patch... - Commit (Modifier) - SignOff diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 85038d9e..95647101 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -2,19 +2,20 @@ + Informazioni Informazioni su SourceGit Client GUI Git open source e gratuito Aggiungi Worktree - Di cosa fare il checkout: - Branch esistente - Crea nuovo branch Posizione: Percorso per questo worktree. Supportato il percorso relativo. Nome Branch: Facoltativo. Predefinito è il nome della cartella di destinazione. Traccia Branch: Traccia branch remoto + Di cosa fare il checkout: + Crea nuovo branch + Branch esistente Assistente AI RIGENERA Usa AI per generare il messaggio di commit @@ -64,8 +65,8 @@ Upstream non valido Byte ANNULLA - Ripristina Questa Revisione Ripristina la Revisione Padre + Ripristina Questa Revisione Genera messaggio di commit CAMBIA MODALITÀ DI VISUALIZZAZIONE Mostra come elenco di file e cartelle @@ -73,12 +74,12 @@ Mostra come albero del filesystem Checkout Branch Checkout Commit - Avviso: Effettuando un checkout del commit, la tua HEAD sarà separata Commit: - Branch: + Avviso: Effettuando un checkout del commit, la tua HEAD sarà separata Modifiche Locali: Scarta Stasha e Ripristina + Branch: Cherry Pick Aggiungi sorgente al messaggio di commit Commit(s): @@ -97,9 +98,9 @@ URL del Repository: CHIUDI Editor + Checkout Commit Cherry-Pick Questo Commit Cherry-Pick... - Checkout Commit Confronta con HEAD Confronta con Worktree Copia Info @@ -134,12 +135,12 @@ RIFERIMENTI SHA Apri nel Browser - Inserisci l'oggetto del commit Descrizione + Inserisci l'oggetto del commit Configura Repository TEMPLATE DI COMMIT - Nome Template: Contenuto Template: + Nome Template: AZIONE PERSONALIZZATA Argomenti: ${REPO} - Percorso del repository; ${SHA} - SHA del commit selezionato @@ -157,13 +158,13 @@ Minuto/i Remoto Predefinito TRACCIAMENTO ISSUE + Aggiungi una regola di esempio per Azure DevOps Aggiungi una regola di esempio per un Issue Gitee Aggiungi una regola di esempio per un Pull Request Gitee Aggiungi una regola di esempio per GitHub - Aggiungi una regola di esempio per Jira - Aggiungi una regola di esempio per Azure DevOps Aggiungi una regola di esempio per Issue GitLab Aggiungi una regola di esempio per una Merge Request GitLab + Aggiungi una regola di esempio per Jira Nuova Regola Espressione Regex Issue: Nome Regola: @@ -244,7 +245,6 @@ Differenza Successiva NESSUNA MODIFICA O SOLO CAMBIAMENTI DI FINE LINEA Differenza Precedente - Abilita la navigazione a blocchi Salva come Patch Mostra Simboli Nascosti Diff Affiancato @@ -253,6 +253,7 @@ Scambia Evidenziazione Sintassi Avvolgimento delle Parole + Abilita la navigazione a blocchi Apri nello Strumento di Merge Mostra Tutte le Righe Diminuisci Numero di Righe Visibili @@ -294,11 +295,11 @@ Rimuovi da Stage Rimuovi da Stage {0} file Rimuovi le Righe Selezionate da Stage - Usa Il Loro (checkout --theirs) Usa Il Mio (checkout --ours) + Usa Il Loro (checkout --theirs) Cronologia File - CONTENUTO MODIFICA + CONTENUTO FILTRO Git-Flow Branch di Sviluppo: @@ -329,8 +330,8 @@ Modello Personalizzato: Aggiungi Modello di Tracciamento a Git LFS Recupera - Recupera Oggetti LFS Esegui `git lfs fetch` per scaricare gli oggetti Git LFS. Questo non aggiorna la copia di lavoro. + Recupera Oggetti LFS Installa hook di Git LFS Mostra Blocchi Nessun File Bloccato @@ -342,11 +343,11 @@ Elimina Esegui `git lfs prune` per eliminare vecchi file LFS dallo storage locale Scarica - Scarica Oggetti LFS Esegui `git lfs pull` per scaricare tutti i file LFS per il ref corrente e fare il checkout + Scarica Oggetti LFS Invia - Invia Oggetti LFS Invia grandi file in coda al punto finale di Git LFS + Invia Oggetti LFS Remoto: Traccia file con nome '{0}' Traccia tutti i file *{0} @@ -365,8 +366,8 @@ Annulla il popup corrente Clona una nuova repository Chiudi la pagina corrente - Vai alla pagina precedente Vai alla pagina successiva + Vai alla pagina precedente Crea una nuova pagina Apri la finestra delle preferenze REPOSITORY @@ -377,11 +378,11 @@ Scarta le modifiche selezionate Recupera, avvia direttamente Modalità Dashboard (Predefinita) + Modalità ricerca commit Scarica, avvia direttamente Invia, avvia direttamente Forza l'aggiornamento di questo repository Aggiungi/Rimuovi da stage le modifiche selezionate - Modalità ricerca commit Passa a 'Modifiche' Passa a 'Storico' Passa a 'Stashes' @@ -390,9 +391,9 @@ Trova il prossimo risultato Trova il risultato precedente Apri il pannello di ricerca + Scarta Aggiungi in stage Rimuovi - Scarta Inizializza Repository Percorso: Cherry-Pick in corso. @@ -404,10 +405,10 @@ Ripristino in corso. Ripristinando il commit Riallinea Interattivamente - Branch di destinazione: Su: - Apri nel Browser + Branch di destinazione: Copia il Link + Apri nel Browser ERRORE AVVISO Unisci Branch @@ -433,16 +434,16 @@ Copia Percorso Repository Repository Incolla - Proprio ora - {0} minuti fa + {0} giorni fa 1 ora fa {0} ore fa - Ieri - {0} giorni fa + Proprio ora Il mese scorso - {0} mesi fa L'anno scorso + {0} minuti fa + {0} mesi fa {0} anni fa + Ieri Preferenze AI Analizza il Prompt Differenza @@ -482,24 +483,24 @@ Email Utente Email utente Git globale Abilita --prune durante il fetch + Questa applicazione richiede Git (>= 2.23.0) Percorso Installazione + Abilita la verifica HTTP SSL Nome Utente Nome utente Git globale Versione di Git - Questa applicazione richiede Git (>= 2.23.0) - Abilita la verifica HTTP SSL FIRMA GPG Firma GPG per commit - Firma GPG per tag Formato GPG Percorso Programma Installato Inserisci il percorso per il programma GPG installato + Firma GPG per tag Chiave Firma Utente Chiave GPG dell'utente per la firma INTEGRAZIONE SHELL/TERMINALE - Shell/Terminale Percorso + Shell/Terminale Potatura Remota Destinazione: Potatura Worktrees @@ -667,11 +668,11 @@ Statistiche COMMIT COMMITTER + PANORAMICA MESE SETTIMANA - COMMIT: AUTORI: - PANORAMICA + COMMIT: SOTTOMODULI Aggiungi Sottomodulo Copia Percorso Relativo @@ -686,13 +687,13 @@ Elimina ${0}$... Unisci ${0}$ in ${1}$... Invia ${0}$... - URL: Aggiorna Sottomoduli Tutti i sottomoduli Inizializza se necessario Ricorsivamente Sottomodulo: Usa opzione --remote + URL: Avviso Pagina di Benvenuto Crea Gruppo @@ -728,6 +729,8 @@ INCLUDI FILE NON TRACCIATI NESSUN MESSAGGIO RECENTE INSERITO NESSUN TEMPLATE DI COMMIT + Clicca con il tasto destro sul(i) file selezionato, quindi scegli come risolvere i conflitti. + SignOff IN STAGE RIMUOVI DA STAGE RIMUOVI TUTTO DA STAGE @@ -736,8 +739,6 @@ FAI LO STAGE DI TUTTO VISUALIZZA COME NON MODIFICATO Template: ${0}$ - Clicca con il tasto destro sul(i) file selezionato, quindi scegli come risolvere i conflitti. - SignOff WORKSPACE: Configura Workspaces... WORKTREE diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml index 21255221..91cefbac 100644 --- a/src/Resources/Locales/ja_JP.axaml +++ b/src/Resources/Locales/ja_JP.axaml @@ -2,19 +2,20 @@ + 概要 SourceGitについて オープンソース & フリーなGit GUIクライアント ワークツリーを追加 - チェックアウトする内容: - 既存のブランチ - 新しいブランチを作成 場所: ワークツリーのパスを入力してください。相対パスも使用することができます。 ブランチの名前: 任意。デフォルトでは宛先フォルダ名が使用されます。 追跡するブランチ: 追跡中のリモートブランチ + チェックアウトする内容: + 新しいブランチを作成 + 既存のブランチ OpenAI アシスタント 再生成 OpenAIを使用してコミットメッセージを生成 @@ -64,8 +65,8 @@ 無効な上流ブランチ! バイト キャンセル - このリビジョンにリセット 親リビジョンにリセット + このリビジョンにリセット コミットメッセージを生成 変更表示の切り替え ファイルとディレクトリのリストを表示 @@ -73,12 +74,12 @@ ファイルシステムのツリーを表示 ブランチをチェックアウト コミットをチェックアウト - 警告: コミットをチェックアウトするとHEADが切断されます コミット: - ブランチ: + 警告: コミットをチェックアウトするとHEADが切断されます ローカルの変更: 破棄 スタッシュして再適用 + ブランチ: チェリーピック ソースをコミットメッセージに追加 コミット(複数可): @@ -97,9 +98,9 @@ リポジトリのURL: 閉じる エディタ + コミットをチェックアウト このコミットをチェリーピック チェリーピック... - コミットをチェックアウト HEADと比較 ワークツリーと比較 情報をコピー @@ -134,12 +135,12 @@ 参照 SHA ブラウザで開く - コミットのタイトルを入力 説明 + コミットのタイトルを入力 リポジトリの設定 コミットテンプレート - テンプレート名: テンプレート内容: + テンプレート名: カスタムアクション 引数: ${REPO} - リポジトリのパス; ${BRANCH} - 選択中のブランチ; ${SHA} - 選択中のコミットのSHA @@ -157,13 +158,13 @@ 分(s) リモートの初期値 ISSUEトラッカー + サンプルのAzure DevOpsルールを追加 サンプルのGitee Issueルールを追加 サンプルのGiteeプルリクエストルールを追加 サンプルのGithubルールを追加 サンプルのGitLab Issueルールを追加 サンプルのGitLabマージリクエストルールを追加 サンプルのJiraルールを追加 - サンプルのAzure DevOpsルールを追加 新しいルール Issueの正規表現: ルール名: @@ -188,8 +189,8 @@ 変更の種類: コピー すべてのテキストをコピー - パスをコピー 絶対パスをコピー + パスをコピー ブランチを作成... 派生元: 作成したブランチにチェックアウト @@ -225,8 +226,8 @@ パス: 対象: すべての子ノードがリストから削除されます。 - グループを削除 これはリストからのみ削除され、ディスクには保存されません! + グループを削除 リポジトリを削除 サブモジュールを削除 サブモジュールのパス: @@ -295,11 +296,11 @@ アンステージ {0}個のファイルをアンステージ... 選択された行の変更をアンステージ - 相手の変更を使用 (checkout --theirs) 自分の変更を使用 (checkout --ours) + 相手の変更を使用 (checkout --theirs) ファイルの履歴 - コンテンツ 変更 + コンテンツ Git-Flow 開発ブランチ: Feature: @@ -329,8 +330,8 @@ カスタム パターン: Git LFSにトラックパターンを追加 フェッチ - LFSオブジェクトをフェッチ `git lfs fetch`を実行して、Git LFSオブジェクトをダウンロードします。ワーキングコピーは更新されません。 + LFSオブジェクトをフェッチ Git LFSフックをインストール ロックを表示 ロックされているファイルはありません @@ -342,11 +343,11 @@ 削除 `git lfs prune`を実行して、ローカルの保存領域から古いLFSファイルを削除します。 プル - LFSオブジェクトをプル `git lfs pull`を実行して、現在の参照とチェックアウトのすべてのGit LFSファイルをダウンロードします。 + LFSオブジェクトをプル プッシュ - LFSオブジェクトをプッシュ キュー内の大容量ファイルをGit LFSエンドポイントにプッシュします。 + LFSオブジェクトをプッシュ リモート: {0}という名前のファイルをトラック すべての*{0}ファイルをトラック @@ -365,8 +366,8 @@ 現在のポップアップをキャンセル 新しくリポジトリをクローン 現在のページを閉じる - 前のページに移動 次のページに移動 + 前のページに移動 新しいページを作成 設定ダイアログを開く リポジトリ @@ -377,11 +378,11 @@ 選択した変更を破棄 直接フェッチを実行 ダッシュボードモード (初期値) + コミット検索モード 直接プルを実行 直接プッシュを実行 現在のリポジトリを強制的に再読み込み 選択中の変更をステージ/アンステージ - コミット検索モード '変更'に切り替える '履歴'に切り替える 'スタッシュ'に切り替える @@ -390,9 +391,9 @@ 次のマッチを検索 前のマッチを検索 検索パネルを開く + 破棄 ステージ アンステージ - 破棄 リポジトリの初期化 パス: チェリーピックが進行中です。'中止'を押すと元のHEADが復元されます。 @@ -404,10 +405,10 @@ 元に戻す処理が進行中です。'中止'を押すと元のHEADが復元されます。 コミットを元に戻しています インタラクティブ リベース - 対象のブランチ: On: - ブラウザで開く + 対象のブランチ: リンクをコピー + ブラウザで開く エラー 通知 ブランチのマージ @@ -433,16 +434,16 @@ リポジトリパスをコピー リポジトリ 貼り付け - たった今 - {0} 分前 + {0} 日前 1 時間前 {0} 時間前 - 昨日 - {0} 日前 + たった今 先月 - {0} ヶ月前 昨年 + {0} 分前 + {0} ヶ月前 {0} 年前 + 昨日 設定 AI 差分分析プロンプト @@ -483,24 +484,24 @@ ユーザー Eメールアドレス グローバルgitのEメールアドレス フェッチ時に--pruneを有効化 + Git (>= 2.23.0) はこのアプリで必要です インストール パス HTTP SSL 検証を有効にする ユーザー名 グローバルのgitユーザー名 Gitバージョン - Git (>= 2.23.0) はこのアプリで必要です GPG 署名 コミットにGPG署名を行う - タグにGPG署名を行う GPGフォーマット プログラムのインストールパス インストールされたgpgプログラムのパスを入力 + タグにGPG署名を行う ユーザー署名キー ユーザーのGPG署名キー 統合 シェル/ターミナル - シェル/ターミナル パス + シェル/ターミナル リモートを削除 対象: 作業ツリーを削除 @@ -666,11 +667,11 @@ 統計 コミット コミッター + 概要 月間 週間 - コミット: 著者: - 概要 + コミット: サブモジュール サブモジュールを追加 相対パスをコピー @@ -685,13 +686,13 @@ ${0}$ を削除... ${0}$ を ${1}$ にマージ... ${0}$ をプッシュ... - URL: サブモジュールを更新 すべてのサブモジュール 必要に応じて初期化 再帰的に更新 サブモジュール: --remoteオプションを使用 + URL: 警告 ようこそ グループを作成 @@ -727,6 +728,7 @@ 追跡されていないファイルを含める 最近の入力メッセージはありません コミットテンプレートはありません + 選択したファイルを右クリックし、競合を解決する操作を選択してください。 サインオフ ステージしたファイル ステージを取り消し @@ -736,7 +738,6 @@ すべてステージへ移動 変更されていないとみなしたものを表示 テンプレート: ${0}$ - 選択したファイルを右クリックし、競合を解決する操作を選択してください。 ワークスペース: ワークスペースを設定... ワークツリー diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 4ee6cdbc..09b78c31 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -3,43 +3,19 @@ - - Sobre Sobre o SourceGit Cliente Git GUI Livre e de Código Aberto Adicionar Worktree - O que Checar: - Branch Existente - Criar Novo Branch Localização: Caminho para este worktree. Caminho relativo é suportado. Nome do Branch: Opcional. O padrão é o nome da pasta de destino. Rastrear Branch: Rastreando branch remoto + O que Checar: + Criar Novo Branch + Branch Existente Assietente IA Utilizar IA para gerar mensagem de commit Patch @@ -80,8 +56,8 @@ Comparação de Branches Bytes CANCELAR - Resetar para Esta Revisão Resetar para Revisão Pai + Resetar para Esta Revisão Gerar mensagem de commit ALTERAR MODO DE EXIBIÇÃO Exibir como Lista de Arquivos e Diretórios @@ -89,12 +65,12 @@ Exibir como Árvore de Sistema de Arquivos Checkout Branch Checkout Commit - Aviso: Ao fazer o checkout de um commit, seu Head ficará desanexado Commit: - Branch: + Aviso: Ao fazer o checkout de um commit, seu Head ficará desanexado Alterações Locais: Descartar Stash & Reaplicar + Branch: Cherry-Pick Adicionar origem à mensagem de commit Commit(s): @@ -112,9 +88,9 @@ URL do Repositório: FECHAR Editor + Checar Commit Cherry-Pick este commit Cherry-Pick ... - Checar Commit Comparar com HEAD Comparar com Worktree Copiar Informações @@ -145,12 +121,12 @@ REFERÊNCIAS SHA Abrir no navegador - Insira o assunto do commit Descrição + Insira o assunto do commit Configurar Repositório TEMPLATE DE COMMIT - Nome do Template: Conteúdo do Template: + Nome do Template: AÇÃO CUSTOMIZADA Argumentos: ${REPO} - Caminho do repositório; ${SHA} - SHA do commit selecionado @@ -166,11 +142,11 @@ Minuto(s) Remoto padrão RASTREADOR DE PROBLEMAS - Adicionar Regra de Exemplo do Github - Adicionar Regra de Exemplo do Jira Adicionar Regra de Exemplo do Azure DevOps + Adicionar Regra de Exemplo do Github Adicionar Regra de Exemplo do GitLab Adicionar regra de exemplo de Merge Request do GitLab + Adicionar Regra de Exemplo do Jira Nova Regra Expressão Regex de Issue: Nome da Regra: @@ -292,11 +268,11 @@ Desfazer Preparação Desfazer Preparação de {0} arquivos Desfazer Preparação nas Linhas Selecionadas - Usar Deles (checkout --theirs) Usar Meu (checkout --ours) + Usar Deles (checkout --theirs) Histórico de Arquivos - CONTEUDO MUDANÇA + CONTEUDO Git-Flow Branch de Desenvolvimento: Feature: @@ -326,8 +302,8 @@ Padrão Personalizado: Adicionar Padrão de Rastreamento ao Git LFS Buscar - Buscar Objetos LFS Execute `git lfs fetch` para baixar objetos Git LFS. Isso não atualiza a cópia de trabalho. + Buscar Objetos LFS Instalar hooks do Git LFS Exibir bloqueios Sem Arquivos Bloqueados @@ -339,11 +315,11 @@ Prune Execute `git lfs prune` para excluir arquivos LFS antigos do armazenamento local Puxar - Puxar Objetos LFS Execute `git lfs pull` para baixar todos os arquivos Git LFS para a referência atual e checkout + Puxar Objetos LFS Enviar - Enviar Objetos LFS Envie arquivos grandes enfileirados para o endpoint Git LFS + Enviar Objetos LFS Remoto: Rastrear arquivos nomeados '{0}' Rastrear todos os arquivos *{0} @@ -361,8 +337,8 @@ GLOBAL Cancelar popup atual Fechar página atual - Ir para a página anterior Ir para a próxima página + Ir para a página anterior Criar nova página Abrir diálogo de preferências REPOSITÓRIO @@ -373,11 +349,11 @@ Descartar mudanças selecionadas Buscar, imediatamente Modo de Dashboard (Padrão) + Modo de busca de commits Puxar, imediatamente Enviar, imediatamente Forçar recarregamento deste repositório Preparar/Despreparar mudanças selecionadas - Modo de busca de commits Alternar para 'Mudanças' Alternar para 'Históricos' Alternar para 'Stashes' @@ -386,9 +362,9 @@ Encontrar próxima correspondência Encontrar correspondência anterior Abrir painel de busca + Descartar Preparar Despreparar - Descartar Inicializar Repositório Caminho: Cherry-Pick em andamento. @@ -396,10 +372,10 @@ Rebase em andamento. Revert em andamento. Rebase Interativo - Ramo Alvo: Em: - Abrir no navegador + Ramo Alvo: Copiar link + Abrir no navegador ERRO AVISO Mesclar Ramo @@ -420,16 +396,16 @@ Copiar Caminho do Repositório Repositórios Colar - Agora mesmo - {0} minutos atrás + {0} dias atrás 1 hora atrás {0} horas atrás - Ontem - {0} dias atrás + Agora mesmo Mês passado - {0} meses atrás Ano passado + {0} minutos atrás + {0} meses atrás {0} anos atrás + Ontem Preferências INTELIGÊNCIA ARTIFICIAL Prompt para Analisar Diff @@ -465,23 +441,23 @@ Email do Usuário Email global do usuário git Habilita --prune ao buscar + Git (>= 2.23.0) é necessário para este aplicativo Caminho de Instalação Nome do Usuário Nome global do usuário git Versão do Git - Git (>= 2.23.0) é necessário para este aplicativo ASSINATURA GPG Assinatura GPG de commit - Assinatura GPG de tag Formato GPG Caminho de Instalação do Programa Insira o caminho para o programa gpg instalado + Assinatura GPG de tag Chave de Assinatura do Usuário Chave de assinatura gpg do usuário INTEGRAÇÃO SHELL/TERMINAL - Shell/Terminal Caminho + Shell/Terminal Prunar Remoto Alvo: Podar Worktrees @@ -627,11 +603,11 @@ Estatísticas COMMITS COMMITTER + VISÃO GERAL MÊS SEMANA - COMMITS: AUTORES: - VISÃO GERAL + COMMITS: SUBMÓDULOS Adicionar Submódulo Copiar Caminho Relativo @@ -646,13 +622,13 @@ Excluir ${0}$... Mesclar ${0}$ em ${1}$... Enviar ${0}$... - URL: Atualizar Submódulos Todos os submódulos Inicializar conforme necessário Recursivamente Submódulo: Usar opção --remote + URL: Aviso Página de Boas-vindas Criar Grupo Raíz @@ -687,6 +663,7 @@ INCLUIR ARQUIVOS NÃO RASTREADOS SEM MENSAGENS DE ENTRADA RECENTES SEM MODELOS DE COMMIT + Clique com o botão direito nos arquivos selecionados e escolha como resolver conflitos. STAGED UNSTAGE UNSTAGE TODOS @@ -695,7 +672,6 @@ STAGE TODOS VER SUPOR NÃO ALTERADO Template: ${0}$ - Clique com o botão direito nos arquivos selecionados e escolha como resolver conflitos. Workspaces: Configurar workspaces... WORKTREE diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 2ea274d1..7da65b5e 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -2,19 +2,20 @@ + О программе О SourceGit Бесплатный графический клиент Git с исходным кодом Добавить рабочий каталог - Переключиться на: - ветку из списка - создать новую ветку Расположение: Путь к рабочему каталогу (поддерживается относительный путь) Имя ветки: Имя целевого каталога по умолчанию. (необязательно) Отслеживание ветки: Отслеживание внешней ветки + Переключиться на: + создать новую ветку + ветку из списка Помощник OpenAI ПЕРЕСОЗДАТЬ Использовать OpenAI для создания сообщения о ревизии @@ -42,7 +43,6 @@ Расследование РАССЛЕДОВАНИЕ В ЭТОМ ФАЙЛЕ НЕ ПОДДЕРЖИВАЕТСЯ!!! Проверить ${0}$... - Сравнить с ГОЛОВОЙ (HEAD) Сравнить с рабочим каталогом Копировать имя ветки Изменить действие @@ -64,8 +64,8 @@ Недопустимая основная ветка! Байты ОТМЕНА - Сбросить эту ревизию Сбросить родительскую ревизию + Сбросить эту ревизию Произвести сообщение о ревизии ИЗМЕНИТЬ РЕЖИМ ОТОБРАЖЕНИЯ Показывать в виде списка файлов и каталогов @@ -73,12 +73,12 @@ Показывать в виде дерева файловой системы Переключить ветку Переключение ревизии - Предупреждение: После переключения ревизии ваша Голова (HEAD) будет отсоединена Ревизия: - Ветка: + Предупреждение: После переключения ревизии ваша Голова (HEAD) будет отсоединена Локальные изменения: Отклонить Отложить и примненить повторно + Ветка: Частичный выбор Добавить источник для ревизии сообщения Ревизия(и): @@ -97,9 +97,9 @@ Адрес репозитория: ЗАКРЫТЬ Редактор + Переключиться на эту ревизию Применить эту ревизию (cherry-pick) Применить несколько ревизий ... - Переключиться на эту ревизию Сравнить c ГОЛОВОЙ (HEAD) Сравнить с рабочим каталогом Копировать информацию @@ -134,12 +134,12 @@ ССЫЛКИ SHA Открыть в браузере - Введите тему ревизии Описание + Введите тему ревизии Настройка репозитория ШАБЛОН РЕВИЗИИ - Название: Cодержание: + Название: ПОЛЬЗОВАТЕЛЬСКОЕ ДЕЙСТВИЕ Аргументы: ${REPO} - Путь к репозиторию; ${SHA} - SHA ревизий @@ -157,13 +157,13 @@ Минут(а/ы) Внешний репозиторий по умолчанию ОТСЛЕЖИВАНИЕ ПРОБЛЕМ + Добавить пример правила Azure DevOps Добавить пример правила для тем в Gitea Добавить пример правила запроса скачивания из Gitea Добавить пример правила для Git - Добавить пример правила Jira - Добавить пример правила Azure DevOps Добавить пример правила выдачи GitLab Добавить пример правила запроса на слияние в GitLab + Добавить пример правила Jira Новое правило Проблема с регулярным выражением: Имя правила: @@ -177,8 +177,8 @@ Имя пользователя Имя пользователя репозитория Рабочие пространства - Имя Цвет + Имя Восстанавливать вкладки при запуске Общепринятый помощник по ревизии Кардинальные изменения: @@ -189,8 +189,8 @@ Тип изменения: Копировать Копировать весь текст - Копировать путь Копировать полный путь + Копировать путь Создать ветку... Основан на: Проверить созданную ветку @@ -226,8 +226,8 @@ Путь: Цель: Все дочерние элементы будут удалены из списка. - Подтвердите удаление группы Будет удалён из списка. На диске останется. + Подтвердите удаление группы Подтвердите удаление репозитория Удалить подмодуль Путь подмодуля: @@ -242,12 +242,12 @@ Первое различие Игнорировать изменение пробелов Последнее различие - Показывать скрытые символы ИЗМЕНЕНИЕ ОБЪЕКТА LFS Следующее различие НИКАКИХ ИЗМЕНЕНИЙ ИЛИ МЕНЯЕТСЯ ТОЛЬКО EOL Предыдущее различие Сохранить как заплатку + Показывать скрытые символы Различие рядом ПОДМОДУЛЬ НОВЫЙ @@ -296,11 +296,11 @@ Снять подготовленный Неподготовленные {0} файлы Неподготовленные изменения в выбранной(ых) строке(ах) - Использовать их (checkout --theirs) Использовать мой (checkout --ours) + Использовать их (checkout --theirs) История файлов - СОДЕРЖИМОЕ ИЗМЕНИТЬ + СОДЕРЖИМОЕ Git-поток Ветка разработчика: Свойство: @@ -330,8 +330,8 @@ Изменить шаблон: Добавить шаблон отслеживания в LFS Git Извлечь - Извлечь объекты LFS Запустить (git lfs fetch), чтобы загрузить объекты LFS Git. При этом рабочая копия не обновляется. + Извлечь объекты LFS Установить перехват LFS Git Показывать блокировки Нет заблокированных файлов @@ -343,11 +343,11 @@ Обрезать Запустить (git lfs prune), чтобы удалить старые файлы LFS из локального хранилища Забрать - Забрать объекты LFS Запустить (git lfs pull), чтобы загрузить все файлы LFS Git для текущей ссылки и проверить + Забрать объекты LFS Выложить - Выложить объекты LFS Отправляйте большие файлы, помещенные в очередь, в конечную точку LFS Git + Выложить объекты LFS Внешнее хранилище: Отслеживать файлы с именем «{0}» Отслеживать все *{0} файлов @@ -366,8 +366,8 @@ Закрыть окно Клонировать репозиторий Закрыть вкладку - Перейти на предыдущую вкладку Перейти на следующую вкладку + Перейти на предыдущую вкладку Создать новую вкладку Открыть диалоговое окно настроек РЕПОЗИТОРИЙ @@ -378,11 +378,11 @@ Отклонить выбранные изменения Извлечение, запускается сразу Режим доски (по умолчанию) - Принудительно перезагрузить репозиторий + Режим поиска ревизий Забрать, запускается сразу Выложить, запускается сразу + Принудительно перезагрузить репозиторий Подготовленные/Неподготовленные выбранные изменения - Режим поиска ревизий Переключить на «Изменения» Переключить на «Истории» Переключить на «Отложенные» @@ -391,9 +391,9 @@ Найти следующее совпадение Найти предыдущее совпадение Открыть панель поиска + Отклонить Подготовить Снять из подготовленных - Отклонить Создать репозиторий Путь: Выполняется частичный перенос ревизий (cherry-pick). @@ -405,11 +405,10 @@ Выполняется отмена ревизии. Выполняется отмена Интерактивное перемещение - Целевая ветка: На: - Открыть в браузере + Целевая ветка: Копировать ссылку - ОШИБКА + Открыть в браузере УВЕДОМЛЕНИЕ Влить ветку В: @@ -434,20 +433,20 @@ Копировать путь репозитория Репозитории Вставить - Сейчас - {0} минут назад + {0} дней назад 1 час назад {0} часов назад - Вчера - {0} дней назад + Сейчас Последний месяц - {0} месяцев назад В прошлом году + {0} минут назад + {0} месяцев назад {0} лет назад + Вчера Параметры ОТКРЫТЬ ИИ - Ключ API Запрос на анализ различий + Ключ API Произвести запрос на тему Модель Имя: @@ -455,9 +454,9 @@ Разрешить потоковую передачу ВИД Шрифт по умолчанию + Редактировать ширину вкладки Размер шрифта По умолчанию - Редактировать ширину вкладки Редактор Моноширный шрифт В текстовом редакторе используется только моноширный шрифт @@ -484,24 +483,24 @@ Электроная почта пользователя Общая электроная почта пользователя git Разрешить (--prune) при скачивании + Для работы программы требуется версия Git (>= 2.23.0) Путь установки Разрешить верификацию HTTP SSL Имя пользователя Общее имя пользователя git Версия Git - Для работы программы требуется версия Git (>= 2.23.0) GPG ПОДПИСЬ GPG подпись ревизии - GPG подпись метки Формат GPG Путь установки программы Введите путь для установленной программы GPG + GPG подпись метки Ключ подписи пользователя Ключ GPG подписи пользователя ВНЕДРЕНИЕ ОБОЛОЧКА/ТЕРМИНАЛ - Оболочка/Терминал Путь + Оболочка/Терминал Удалить внешний репозиторий Цель: Удалить рабочий каталог @@ -630,8 +629,6 @@ Заплатка успешно сохранена! Сканирование репозиторий Корневой каталог: - Копировать SHA - Перейти Проверка для обновления... Доступна новая версия программного обеспечения: Не удалось проверить наличие обновлений! @@ -643,12 +640,12 @@ Ветка: Снять основную ветку Основная ветка: + Копировать SHA + Перейти Втиснуть ревизии В: Приватный ключ SSH: Путь хранения приватного ключа SSH - Только подготовленные изменения - Подготовленные так и неподготовленные изменения выбранных файлов будут сохранены!!! ЗАПУСК Отложить Автоматически восстанавливать после откладывания @@ -657,6 +654,8 @@ Хранить отложенные файлы Сообщение: Имя тайника (необязательно) + Только подготовленные изменения + Подготовленные так и неподготовленные изменения выбранных файлов будут сохранены!!! Отложить локальные изменения Принять Отбросить @@ -669,11 +668,11 @@ Статистика РЕВИЗИИ РЕВИЗОРЫ (ИСПОЛНИТЕЛИ) + ОБЗОР МЕСЯЦ НЕДЕЛЯ - РЕВИЗИИ: АВТОРЫ: - ОБЗОР + РЕВИЗИИ: ПОДМОДУЛИ Добавить подмодули Копировать относительный путь @@ -688,13 +687,13 @@ Удалить ${0}$... Влить ${0}$ в ${1}$... Выложить ${0}$... - Сетевой адрес: Обновление подмодулей Все подмодули Создавать по необходимости Рекурсивно Подмодуль: Использовать опцию (--remote) + Сетевой адрес: Предупреждение Приветствие Создать группу @@ -707,7 +706,6 @@ Открыть все репозитории Открыть репозиторий Открыть терминал - Повторное сканирование репозиториев в каталоге клонирования по умолчанию Поиск репозиториев... Сортировка Изменения @@ -730,6 +728,7 @@ ВКЛЮЧИТЬ НЕОТСЛЕЖИВАЕМЫЕ ФАЙЛЫ НЕТ ПОСЛЕДНИХ ВХОДНЫХ СООБЩЕНИЙ НЕТ ШАБЛОНОВ РЕВИЗИИ + Щёлкните правой кнопкой мыши выбранный файл(ы) и разрешите конфликты. Завершение работы ПОДГОТОВЛЕННЫЕ СНЯТЬ ПОДГОТОВЛЕННЫЙ @@ -739,7 +738,6 @@ ВСЕ ПОДГОТОВИТЬ ОТКРЫТЬ СПИСОК НЕОТСЛЕЖИВАЕМЫХ ФАЙЛОВ Шаблон: ${0}$ - Щёлкните правой кнопкой мыши выбранный файл(ы) и разрешите конфликты. РАБОЧЕЕ ПРОСТРАНСТВО: Настройка рабочего пространства... РАБОЧИЙ КАТАЛОГ diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 932f1237..281d6a4d 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -2,19 +2,20 @@ + 关于软件 关于本软件 开源免费的Git客户端 新增工作树 - 检出分支方式 : - 已有分支 - 创建新分支 工作树路径 : 填写该工作树的路径。支持相对路径。 分支名 : 选填。默认使用目标文件夹名称。 跟踪分支 设置上游跟踪分支 + 检出分支方式 : + 创建新分支 + 已有分支 AI助手 重新生成 使用AI助手生成提交信息 @@ -64,8 +65,8 @@ 跟踪的上游分支不存在或已删除! 字节 取 消 - 重置文件到该版本 重置文件到上一版本 + 重置文件到该版本 生成提交信息 切换变更显示模式 文件名+路径列表模式 @@ -73,12 +74,12 @@ 文件目录树形结构模式 检出(checkout)分支 检出(checkout)提交 - 注意:执行该操作后,当前HEAD会变为游离(detached)状态! 提交 : - 目标分支 : + 注意:执行该操作后,当前HEAD会变为游离(detached)状态! 未提交更改 : 丢弃更改 贮藏并自动恢复 + 目标分支 : 挑选提交 提交信息中追加来源信息 提交列表 : @@ -97,9 +98,9 @@ 远程仓库 : 关闭 提交信息编辑器 + 检出此提交 挑选(cherry-pick)此提交 挑选(cherry-pick)... - 检出此提交 与当前HEAD比较 与本地工作树比较 复制简要信息 @@ -134,12 +135,12 @@ 相关引用 提交指纹 浏览器中查看 - 填写提交信息主题 详细描述 + 填写提交信息主题 仓库配置 提交信息模板 - 模板名 : 模板内容 : + 模板名 : 自定义操作 命令行参数 : 请使用${REPO}代替仓库路径,${BRANCH}代替选中的分支,${SHA}代替提交哈希 @@ -189,8 +190,8 @@ 类型: 复制 复制全部文本 - 复制路径 复制完整路径 + 复制路径 新建分支 ... 新分支基于 : 完成后切换到新分支 @@ -226,8 +227,8 @@ 路径 : 目标 : 所有子节点将被同时从列表中移除。 - 删除分组确认 仅从列表中移除,不会删除硬盘中的文件! + 删除分组确认 删除仓库确认 删除子模块确认 子模块路径 : @@ -296,11 +297,11 @@ 从暂存中移除 从暂存中移除 {0} 个文件 从暂存中移除选中的更改 - 使用 THEIRS (checkout --theirs) 使用 MINE (checkout --ours) + 使用 THEIRS (checkout --theirs) 文件历史 - 文件内容 文件变更 + 文件内容 GIT工作流 开发分支 : 特性分支 : @@ -330,8 +331,8 @@ 规则 : 添加LFS追踪文件规则 拉取LFS对象 (fetch) - 拉取LFS对象 执行`git lfs prune`命令,下载远程LFS对象,但不会更新工作副本。 + 拉取LFS对象 启用Git LFS支持 显示LFS对象锁 没有锁定的LFS文件 @@ -343,11 +344,11 @@ 精简本地LFS对象存储 运行`git lfs prune`命令,从本地存储中精简当前版本不需要的LFS对象 拉回LFS对象 (pull) - 拉回LFS对象 运行`git lfs pull`命令,下载远程LFS对象并更新工作副本。 + 拉回LFS对象 推送 - 推送LFS对象 将排队的大文件推送到Git LFS远程服务 + 推送LFS对象 远程 : 跟踪名为'{0}'的文件 跟踪所有 *{0} 文件 @@ -366,8 +367,8 @@ 取消弹出面板 克隆远程仓库 关闭当前页面 - 切换到上一个页面 切换到下一个页面 + 切换到上一个页面 新建页面 打开偏好设置面板 仓库页面快捷键 @@ -378,11 +379,11 @@ 丢弃选中的更改 拉取 (fetch) 远程变更 切换左边栏为分支/标签等显示模式(默认) + 切换左边栏为提交搜索模式 拉回 (pull) 远程变更 推送本地变更到远程 重新加载仓库状态 将选中的变更暂存或从暂存列表中移除 - 切换左边栏为提交搜索模式 显示本地更改 显示历史记录 显示贮藏列表 @@ -391,9 +392,9 @@ 定位到下一个匹配搜索的位置 定位到上一个匹配搜索的位置 打开搜索 + 丢弃 暂存 移出暂存区 - 丢弃 初始化新仓库 路径 : 挑选(Cherry-Pick)操作进行中。 @@ -405,10 +406,10 @@ 回滚提交操作进行中。 正在回滚提交 交互式变基 - 目标分支 : 起始提交 : - 在浏览器中访问 + 目标分支 : 复制链接地址 + 在浏览器中访问 出错了 系统提示 合并分支 @@ -434,16 +435,16 @@ 复制仓库路径 新标签页 粘贴 - 刚刚 - {0}分钟前 + {0}天前 1小时前 {0}小时前 - 昨天 - {0}天前 + 刚刚 上个月 - {0}个月前 一年前 + {0}分钟前 + {0}个月前 {0}年前 + 昨天 偏好设置 AI Analyze Diff Prompt @@ -455,11 +456,11 @@ 启用流式输出 外观配置 缺省字体 + 代码字体大小 编辑器制表符宽度 字体大小 默认 代码编辑器 - 代码字体大小 等宽字体 仅在文本编辑器中使用等宽字体 主题 @@ -485,24 +486,24 @@ 邮箱 默认GIT用户邮箱 拉取更新时启用修剪(--prune) + 本软件要求GIT最低版本为2.23.0 安装路径 启用HTTP SSL验证 用户名 默认GIT用户名 Git 版本 - 本软件要求GIT最低版本为2.23.0 GPG签名 启用提交签名 - 启用标签签名 签名格式 签名程序位置 签名程序所在路径 + 启用标签签名 用户签名KEY 输入签名提交所使用的KEY 第三方工具集成 终端/SHELL - 终端/SHELL 安装路径 + 终端/SHELL 清理远程已删除分支 目标 : 清理工作树 @@ -669,11 +670,11 @@ 提交统计 提交次数 提交者 + 总览 本月 本周 - 提交次数: 贡献者人数: - 总览 + 提交次数: 子模块 添加子模块 复制路径 @@ -688,13 +689,13 @@ 删除 ${0}$... 合并 ${0}$ 到 ${1}$... 推送 ${0}$... - 仓库地址 : 更新子模块 更新所有子模块 启用 '--init' 启用 '--recursive' 子模块 : 启用 '--remote' + 仓库地址 : 警告 起始页 新建分组 @@ -724,13 +725,13 @@ 触发点击事件 提交(修改原始提交) 自动暂存所有变更并提交 - 当前有 {0} 个文件在暂存区中,但仅显示了 {1} 个文件({2} 个文件被过滤掉了),是否继续提交? 提交未包含变更文件!是否继续(--allow-empty)? 检测到冲突 文件冲突已解决 显示未跟踪文件 没有提交信息记录 没有可应用的提交信息模板 + 请选中冲突文件,打开右键菜单,选择合适的解决方式 署名 已暂存 从暂存区移除选中 @@ -740,7 +741,6 @@ 暂存所有 查看忽略变更文件 模板:${0}$ - 请选中冲突文件,打开右键菜单,选择合适的解决方式 工作区: 配置工作区... 本地工作树 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 88b0ab64..e090fe2a 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -2,19 +2,20 @@ + 關於 關於 SourceGit 開源免費的 Git 客戶端 新增工作區 - 簽出分支方式: - 已有分支 - 建立新分支 工作區路徑: 填寫該工作區的路徑。支援相對路徑。 分支名稱: 選填。預設使用目標資料夾名稱。 追蹤分支 設定遠端追蹤分支 + 簽出分支方式: + 建立新分支 + 已有分支 AI 助理 重新產生 使用 AI 產生提交訊息 @@ -64,8 +65,8 @@ 追蹤上游分支不存在或已刪除! 位元組 取 消 - 重設檔案為此版本 重設檔案到上一版本 + 重設檔案為此版本 產生提交訊息 切換變更顯示模式 檔案名稱 + 路徑列表模式 @@ -73,12 +74,12 @@ 檔案目錄樹狀結構模式 簽出 (checkout) 分支 簽出 (checkout) 提交 - 注意: 執行該操作後,目前 HEAD 會變為分離 (detached) 狀態! 提交: - 目標分支: + 注意: 執行該操作後,目前 HEAD 會變為分離 (detached) 狀態! 未提交變更: 捨棄變更 擱置變更並自動復原 + 目標分支: 揀選提交 提交資訊中追加來源資訊 提交列表: @@ -97,9 +98,9 @@ 遠端存放庫: 關閉 提交訊息編輯器 + 簽出 (checkout) 此提交 揀選 (cherry-pick) 此提交 揀選 (cherry-pick)... - 簽出 (checkout) 此提交 與目前 HEAD 比較 與本機工作區比較 複製摘要資訊 @@ -134,12 +135,12 @@ 相關參照 提交編號 在瀏覽器中檢視 - 填寫提交訊息標題 詳細描述 + 填寫提交訊息標題 存放庫設定 提交訊息範本 - 範本名稱: 範本內容: + 範本名稱: 自訂動作 指令參數: 使用 ${REPO} 表示存放庫路徑、${BRANCH} 表示所選的分支、${SHA} 表示所選的提交編號 @@ -189,8 +190,8 @@ 類型: 複製 複製全部內容 - 複製路徑 複製完整路徑 + 複製路徑 新增分支... 新分支基於: 完成後切換到新分支 @@ -226,8 +227,8 @@ 路徑: 目標: 所有子節點都會從清單中移除。 - 刪除群組確認 只會從清單中移除,而不會刪除磁碟中的檔案! + 刪除群組確認 刪除存放庫確認 刪除子模組確認 子模組路徑: @@ -296,11 +297,11 @@ 取消暫存 從暫存中移除 {0} 個檔案 取消暫存選取的變更 - 使用對方版本 (checkout --theirs) 使用我方版本 (checkout --ours) + 使用對方版本 (checkout --theirs) 檔案歷史 - 檔案内容 檔案變更 + 檔案内容 Git 工作流 開發分支: 功能分支: @@ -330,8 +331,8 @@ 規則: 加入 LFS 追蹤檔案規則 提取 (fetch) - 提取 LFS 物件 執行 `git lfs fetch` 以下載遠端 LFS 物件,但不會更新工作副本。 + 提取 LFS 物件 啟用 Git LFS 支援 顯示 LFS 物件鎖 沒有鎖定的 LFS 物件 @@ -343,11 +344,11 @@ 清理 (prune) 執行 `git lfs prune` 以從本機中清理目前版本不需要的 LFS 物件 拉取 (pull) - 拉取 LFS 物件 執行 `git lfs pull` 以下載遠端 LFS 物件並更新工作副本。 + 拉取 LFS 物件 推送 (push) - 推送 LFS 物件 將大型檔案推送到 Git LFS 遠端服務 + 推送 LFS 物件 遠端存放庫: 追蹤名稱為「{0}」的檔案 追蹤所有 *{0} 檔案 @@ -366,8 +367,8 @@ 取消彈出面板 複製 (clone) 遠端存放庫 關閉目前頁面 - 切換到上一個頁面 切換到下一個頁面 + 切換到上一個頁面 新增頁面 開啟偏好設定面板 存放庫頁面快速鍵 @@ -378,11 +379,11 @@ 捨棄選取的變更 提取 (fetch) 遠端的變更 切換左邊欄為分支/標籤等顯示模式 (預設) + 切換左邊欄為歷史搜尋模式 拉取 (pull) 遠端的變更 推送 (push) 本機變更到遠端存放庫 強制重新載入存放庫 暫存或取消暫存選取的變更 - 切換左邊欄為歷史搜尋模式 顯示本機變更 顯示歷史記錄 顯示擱置變更列表 @@ -391,9 +392,9 @@ 前往下一個搜尋相符的位置 前往上一個搜尋相符的位置 開啟搜尋面板 + 捨棄 暫存 取消暫存 - 捨棄 初始化存放庫 路徑: 揀選 (cherry-pick) 操作進行中。 @@ -405,10 +406,10 @@ 復原提交操作進行中。 正在復原提交 互動式重定基底 - 目標分支: 起始提交: - 在瀏覽器中開啟連結 + 目標分支: 複製連結 + 在瀏覽器中開啟連結 發生錯誤 系統提示 合併分支 @@ -434,16 +435,16 @@ 複製存放庫路徑 新分頁 貼上 - 剛剛 - {0} 分鐘前 + {0} 天前 1 小時前 {0} 小時前 - 昨天 - {0} 天前 + 剛剛 上個月 - {0} 個月前 一年前 + {0} 分鐘前 + {0} 個月前 {0} 年前 + 昨天 偏好設定 AI 分析變更差異提示詞 @@ -484,24 +485,24 @@ 電子郵件 預設 Git 使用者電子郵件 拉取變更時進行清理 (--prune) + 本軟體要求 Git 最低版本為 2.23.0 安裝路徑 啟用 HTTP SSL 驗證 使用者名稱 預設 Git 使用者名稱 Git 版本 - 本軟體要求 Git 最低版本為 2.23.0 GPG 簽章 啟用提交簽章 - 啟用標籤簽章 GPG 簽章格式 可執行檔案路徑 填寫 gpg.exe 所在路徑 + 啟用標籤簽章 使用者簽章金鑰 填寫簽章提交所使用的金鑰 第三方工具整合 終端機/Shell - 終端機/Shell 安裝路徑 + 終端機/Shell 清理遠端已刪除分支 目標: 清理工作區 @@ -668,11 +669,11 @@ 提交統計 提交次數 提交者 + 總覽 本月 本週 - 提交次數: 貢獻者人數: - 總覽 + 提交次數: 子模組 新增子模組 複製路徑 @@ -687,13 +688,13 @@ 刪除 ${0}$... 合併 ${0}$ 到 ${1}$... 推送 ${0}$... - 存放庫網址: 更新子模組 更新所有子模組 啟用 [--init] 選項 啟用 [--recursive] 選項 子模組: 啟用 [--remote] 選項 + 存放庫網址: 警告 起始頁 新增群組 @@ -706,8 +707,8 @@ 開啟所有包含存放庫 開啟本機存放庫 開啟終端機 - 快速搜尋存放庫... 重新掃描預設複製 (clone) 目錄下的存放庫 + 快速搜尋存放庫... 排序 本機變更 加入至 .gitignore 忽略清單 @@ -723,13 +724,13 @@ 觸發點擊事件 提交 (修改原始提交) 自動暫存全部變更並提交 - 您已暫存 {0} 檔案,但只顯示 {1} 檔案 ({2} 檔案被篩選器隱藏)。您要繼續嗎? 未包含任何檔案變更! 您是否仍要提交 (--allow-empty)? 檢測到衝突 檔案衝突已解決 顯示未追蹤檔案 沒有提交訊息記錄 沒有可套用的提交訊息範本 + 請選擇發生衝突的檔案,開啟右鍵選單,選擇合適的解決方式 署名 已暫存 取消暫存選取的檔案 @@ -739,7 +740,6 @@ 暫存所有檔案 檢視不追蹤變更的檔案 範本: ${0}$ - 請選擇發生衝突的檔案,開啟右鍵選單,選擇合適的解決方式 工作區: 設定工作區... 本機工作區 From f29402ceec9f2c6fcf796c2a5248c656a2c46cb8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 12:05:43 +0000 Subject: [PATCH 041/524] doc: Update translation status and missing keys --- TRANSLATION.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 0f44cbcf..2fd8672b 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -36,12 +36,13 @@ This document shows the translation status of each locale file in the repository
-### ![fr__FR](https://img.shields.io/badge/fr__FR-99.73%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-99.60%25-yellow)
Missing keys in fr_FR.axaml - Text.Configure.Git.PreferredMergeMode +- Text.PruneRemote - Text.WorkingCopy.ConfirmCommitWithFilter
@@ -147,16 +148,33 @@ This document shows the translation status of each locale file in the repository -### ![ru__RU](https://img.shields.io/badge/ru__RU-99.73%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.33%25-yellow)
Missing keys in ru_RU.axaml +- Text.BranchCM.CompareWithHead - Text.Configure.Git.PreferredMergeMode +- Text.Launcher.Error +- Text.Welcome.ScanDefaultCloneDir - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) +### ![zh__CN](https://img.shields.io/badge/zh__CN-99.87%25-yellow) -### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file +
+Missing keys in zh_CN.axaml + +- Text.WorkingCopy.ConfirmCommitWithFilter + +
+ +### ![zh__TW](https://img.shields.io/badge/zh__TW-99.87%25-yellow) + +
+Missing keys in zh_TW.axaml + +- Text.WorkingCopy.ConfirmCommitWithFilter + +
\ No newline at end of file From 2c5ee4fa99b00e25c49e144f8a105a910b5af62b Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 20:19:00 +0800 Subject: [PATCH 042/524] localization: add keys deleted by sorter tools back Signed-off-by: leo --- src/Resources/Locales/fr_FR.axaml | 1 + src/Resources/Locales/ru_RU.axaml | 3 +++ src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + 4 files changed, 6 insertions(+) diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index f3cf80eb..ac2ed8b8 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -505,6 +505,7 @@ SHELL/TERMINAL Chemin Shell/Terminal + Élaguer une branche distant Cible : Élaguer les Worktrees Élaguer les information de worktree dans `$GIT_COMMON_DIR/worktrees` diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 7da65b5e..e778af86 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -43,6 +43,7 @@ Расследование РАССЛЕДОВАНИЕ В ЭТОМ ФАЙЛЕ НЕ ПОДДЕРЖИВАЕТСЯ!!! Проверить ${0}$... + Сравнить с ГОЛОВОЙ (HEAD) Сравнить с рабочим каталогом Копировать имя ветки Изменить действие @@ -409,6 +410,7 @@ Целевая ветка: Копировать ссылку Открыть в браузере + ОШИБКА УВЕДОМЛЕНИЕ Влить ветку В: @@ -706,6 +708,7 @@ Открыть все репозитории Открыть репозиторий Открыть терминал + Повторное сканирование репозиториев в каталоге клонирования по умолчанию Поиск репозиториев... Сортировка Изменения diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 281d6a4d..c1cbcc77 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -725,6 +725,7 @@ 触发点击事件 提交(修改原始提交) 自动暂存所有变更并提交 + 当前有 {0} 个文件在暂存区中,但仅显示了 {1} 个文件({2} 个文件被过滤掉了),是否继续提交? 提交未包含变更文件!是否继续(--allow-empty)? 检测到冲突 文件冲突已解决 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index e090fe2a..34dac155 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -724,6 +724,7 @@ 觸發點擊事件 提交 (修改原始提交) 自動暫存全部變更並提交 + 您已暫存 {0} 檔案,但只顯示 {1} 檔案 ({2} 檔案被篩選器隱藏)。您要繼續嗎? 未包含任何檔案變更! 您是否仍要提交 (--allow-empty)? 檢測到衝突 檔案衝突已解決 From 7fedef396f2f964a392cf9b422818eaf663d840d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 7 Apr 2025 12:19:19 +0000 Subject: [PATCH 043/524] doc: Update translation status and missing keys --- TRANSLATION.md | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 2fd8672b..0f44cbcf 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -36,13 +36,12 @@ This document shows the translation status of each locale file in the repository -### ![fr__FR](https://img.shields.io/badge/fr__FR-99.60%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-99.73%25-yellow)
Missing keys in fr_FR.axaml - Text.Configure.Git.PreferredMergeMode -- Text.PruneRemote - Text.WorkingCopy.ConfirmCommitWithFilter
@@ -148,33 +147,16 @@ This document shows the translation status of each locale file in the repository -### ![ru__RU](https://img.shields.io/badge/ru__RU-99.33%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.73%25-yellow)
Missing keys in ru_RU.axaml -- Text.BranchCM.CompareWithHead - Text.Configure.Git.PreferredMergeMode -- Text.Launcher.Error -- Text.Welcome.ScanDefaultCloneDir - Text.WorkingCopy.ConfirmCommitWithFilter
-### ![zh__CN](https://img.shields.io/badge/zh__CN-99.87%25-yellow) +### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) -
-Missing keys in zh_CN.axaml - -- Text.WorkingCopy.ConfirmCommitWithFilter - -
- -### ![zh__TW](https://img.shields.io/badge/zh__TW-99.87%25-yellow) - -
-Missing keys in zh_TW.axaml - -- Text.WorkingCopy.ConfirmCommitWithFilter - -
\ No newline at end of file +### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file From 1555abd027cbf2d9eafdba88edb8ff76995305db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20W?= <44604769+goran-w@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:22:53 +0200 Subject: [PATCH 044/524] Added new ExternalMerger - Plastic SCM (#1162) Motivation: https://m-pixel.com/how-to-use-plastic-scms-merge-tool-with-p4v/ --- src/Models/ExternalMerger.cs | 1 + .../Images/ExternalToolIcons/plastic_merge.png | Bin 0 -> 6369 bytes 2 files changed, 1 insertion(+) create mode 100644 src/Resources/Images/ExternalToolIcons/plastic_merge.png diff --git a/src/Models/ExternalMerger.cs b/src/Models/ExternalMerger.cs index 49d31df5..d97d3933 100644 --- a/src/Models/ExternalMerger.cs +++ b/src/Models/ExternalMerger.cs @@ -42,6 +42,7 @@ namespace SourceGit.Models new ExternalMerger(7, "win_merge", "WinMerge", "WinMergeU.exe", "\"$MERGED\"", "-u -e -sw \"$LOCAL\" \"$REMOTE\""), new ExternalMerger(8, "codium", "VSCodium", "VSCodium.exe", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\""), new ExternalMerger(9, "p4merge", "P4Merge", "p4merge.exe", "-tw 4 \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"", "-tw 4 \"$LOCAL\" \"$REMOTE\""), + new ExternalMerger(10, "plastic_merge", "Plastic SCM", "mergetool.exe", "-s=\"$REMOTE\" -b=\"$BASE\" -d=\"$LOCAL\" -r=\"$MERGED\" --automatic", "-s=\"$LOCAL\" -d=\"$REMOTE\""), }; } else if (OperatingSystem.IsMacOS()) diff --git a/src/Resources/Images/ExternalToolIcons/plastic_merge.png b/src/Resources/Images/ExternalToolIcons/plastic_merge.png new file mode 100644 index 0000000000000000000000000000000000000000..0d82fc86f7f266a9be39ed16757d02f609febcc3 GIT binary patch literal 6369 zcmeH~c{G&m|Ho&{WQ(#!Lemt9W*^KwTFLZy**GEfR)vc_2y>9}S|wIBqx$ z7I%;D6{K+qjcF_ zSm3bk#E$K0K4mQRrI~g1<+F@)674h{_V)Ig)X&lXz^tIvQwCr3m@00Xk9xIf-{BpZ z6D`Hp(U(%6B%W;?uiv1cSV{A_W-I4q-hR1sFRQ2?Eg!0GtG3`OdMUxjb70Qsuzu+H z@W?yt-zU#@e56ih?QMe>PWqv&Z5M=hN01U1KZEb zb?nr8Kcv4llUeb$`oZ~%HAgS_Tp&1gnuMCvS42PRt++j}LhSkJoQrGF-)r-qDta>= z_2#DSzG17nj+u7z*d7+zeadzA=jtaNyWNfbRd?#Y=}J~^8%h2A*K5JG(Z0>OTCQ>l zxVn!7Wn^qh%+0!%41QyR+(bc&S><4NB%D-GY}pt%q^R2^kF9Dvcvd0!70ki2f#b5P z@6RQf?b4~a2|nt&XJ?!%7YOqc^60Sm7i*r&Qz*zwrkPDoM_zdeg`W>Se>;vikSD5p z(N}B<)m#i0sx2mC1&uA_V*!qk1!Cj)(NNLBU{*G9(EvLNl%QB(1Xo~zapR~YjmVU5>3P5Vq;^m zu_UZe6oDg9sZ<=Eh$9j)kOf8@FOUFn7=d`94Dp5G2#VPvZnT6e6rf~GfF)cfu|}hz zanv{e_|Xi;cf3ISRRu^7TpSRMBVh43J|Fkv46(#127-Kb=s(U7`$Ah3=M9R5>qKnO zDFzfs7XFA>?#l4`PLPEZ!R1F!2L*}u(_$RP za}vgq%)(>HR4RaBS+L0%B7s0AQwac`g$I5>xeCM*K)?oNCRj4 zL*}sY7#5L8#aKXj=71D}C51@(0pTg)LRAUye)LL);y@@$I7lLr03wD(0*M$h3!q{E z8I%J84T0g=p@8_KMKF<1^N2l{C&;Ce{%^G z>h~hQr0;LJe#`Ys3jC7s@9O$3*DopXOUA#e>;FwI<$ph>Kmqgy6bpSS1*vGfgg&$6 zS?;DfZ~~RX$@`ZV$nmhEgHKlaA?S!L zy-`wHA;Er#TrGdivvcON&w6sFQV~3P0i&y5J1l*4Sl%3d@9~@-LXQ|cHi4ef1`H_5Lm!;+lLmcNCDJ=wCCAjyo!G+*Wh6Gk;}%`%*deiyyV=+B^2(D_c63Y)5Wi`nT7g+&6*8y; zc}l5vzWoM}U)^!JqGgZQ0J_k_Fg6``+{bW0^`lTNYJZe&$Ber+7hd=haFfJghp>vr zPDyGuLeDT)6QCzF{#SBn+JM*$i6zU3z^#F&T8%3Tov!K zF+No8;hT$SdYIZrZM=WHB-g?|W3F@noDoS(xigD#53sC0jT}xJ3VB%_w2XXlG8(_t zc&<`mG2q&&ur&Lii-KN|KE7Q-iS@a0CVJ9D!uv`1qp&Q%_qUE5z#q9~d~~1rlt_G>_M?X417wZ2Y1;JuxC1EM`$`e zwcmMYiIo1b+I`srEw<_guTws_%w6?6>*|VchDGE|GE^pNS;#@ z8o3Wu-&!cPh-O|=d-SMP>?Ccc&nifVwS-uZxv2%7{)Q*_4qe%v7RQLcDpxwM*FleY z#K3S@SASlaBfV#PU#c+ZkN1Y1;gr0kUWS;Gp>~I~xRvpzU^5*fe1ocNv=2shW}#5G zW_wCXx8_rF4mU<$++O4QVPo#|%jE_Zm%HN->h~AXc@4d-MYana;#&w4Tk95p8u(Y< zg;!(Es>*MYi#OD0wP)%OUBv&ei(-2B8HpZ+mKy9r%qz>1j)h!W%cI&}sZIWjdKH}0 z`z|RUzDEf$v2@tfj*oiSnsW!f+|jto+71z~XS!QZ$?>T67dytkb%wR9UZ%hM>h(Ve zYXq>EHQNyPlx+G;GD6l&<;a&K;pv)7?iFcMn36Hie@fvBCAfa%>2f>UXN9}+YqAeD zGM%4R%IjX#kgr#r8#y!XG;DFV$BhHqZoF$!Io=uGa~}6+KxeI+ZChm{?6Xx)?^QJh zyUBR<&24Fc@DO*u`^iC4ZO60alpAG7%WsfxMQts4=LZj|Md`+0e!WuPCU?`;a)oA7 zyWv3Ll25JoKPw$Qx6C56r1_3K{6H|EV8?%5qS4TVT;V6++zwDR)w$fKtUx+*j=X8j z>k-`>Po!4;M8+9?m4}E9qZtpZOxU)@{?RGvNbp@RTNrYP;ft*TJ_fk$exx6~>@T#& zsFc=SSBL1%Y|SvUyiL3w;H*~MlkJq2r>}+7QeUgj^uYd=PHgvAGPPOhny~}p4~TE;h{1*ne14u0t)ee#MM? zXOlxUN2ZRtF{KIG)e`~I1>JRq@Ay%1D#MRy?MINEfab(QTX&VX#~=KpHaxC*OY45x@g+}_8#CK^{UY+#t5ZEq8ceNA&DiSsWvXLb&&fK! zoHlI>zvQ$UsZTRM0nv5iR%>lSPf=LaN-{67CK_j_`b1L_2E-jZTFY(-tx<} zO|whaEGQ0{A0slZe{mw@%+^6t0Ntd9?Ge0U`y$jnGs#3>_KFNr8hu{)LkD{c z6P=U;kW(`z;NYs@E4;-i3R&$Pny{9AJ$r8%C`l57&hT*DxmWv??<>7}#LLXjE@O=H zqxK1d`iJH<^jT}J=vkLNxGp>2wh{ip>Be2H8T1is$LY#+R=DdJG9qPLO67sz1+VYl zo}ZH8q-1HXL!W)h%(8BBLtBS`+T1@i_fMJjA2f3@;)@gRAM}U@o-b6o(2cG)sa2bZ z+*wkFe0s>JUOBeO?k!GZSz>{fPutYSB#~RuEd;ThJvsPxE%MpYSeI2MZQ%3Qg?CF2 zEx}NO#_U>8SGpHmTzYtZ`b)f=BzrCKN#)j84}%-9ud~Ogj20jFX8uETYSZZ!WLg0Z zvC3%p%|LS2m426`OQAIn4hn-vi|7vmP2uaYbGB1Y3_Xf`HoAS{{md-gSf?Es&H3Ji zbL0loKT%G+HXUBPH-WrPZvuO;vSc#8Q_BJdIPUaCk=Y7~nxE`!J z>~}Jmej6VsQYNL$sY#x-sk|mPE2{ZnK--vb<7C-wJt?sOdR>9JI(ax&*@tcVAGdk& A_y7O^ literal 0 HcmV?d00001 From 7cda7211f1035a63bf444c57051a308cebbe8d48 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 7 Apr 2025 21:20:59 +0800 Subject: [PATCH 045/524] refactor: statistics dialog - use `%aN+%aE` instead of `%aN` to get commit author - show user avatar in statistics dialog Signed-off-by: leo --- src/Commands/Statistics.cs | 2 +- src/Models/Statistics.cs | 16 +++++++++------- src/Views/Statistics.axaml | 16 ++++++++++------ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/Commands/Statistics.cs b/src/Commands/Statistics.cs index 1439cedd..41b3889e 100644 --- a/src/Commands/Statistics.cs +++ b/src/Commands/Statistics.cs @@ -8,7 +8,7 @@ namespace SourceGit.Commands { WorkingDirectory = repo; Context = repo; - Args = $"log --date-order --branches --remotes -{max} --format=%ct$%aN"; + Args = $"log --date-order --branches --remotes -{max} --format=%ct$%aN±%aE"; } public Models.Statistics Result() diff --git a/src/Models/Statistics.cs b/src/Models/Statistics.cs index 969d3945..87a6eabd 100644 --- a/src/Models/Statistics.cs +++ b/src/Models/Statistics.cs @@ -18,9 +18,9 @@ namespace SourceGit.Models ThisWeek, } - public class StaticsticsAuthor(string name, int count) + public class StaticsticsAuthor(User user, int count) { - public string Name { get; set; } = name; + public User User { get; set; } = user; public int Count { get; set; } = count; } @@ -73,7 +73,7 @@ namespace SourceGit.Models } } - public void AddCommit(DateTime time, string author) + public void AddCommit(DateTime time, User author) { Total++; @@ -126,7 +126,7 @@ namespace SourceGit.Models } private StaticsticsMode _mode = StaticsticsMode.All; - private Dictionary _mapUsers = new Dictionary(); + private Dictionary _mapUsers = new Dictionary(); private Dictionary _mapSamples = new Dictionary(); } @@ -150,14 +150,16 @@ namespace SourceGit.Models public void AddCommit(string author, double timestamp) { + var user = User.FindOrAdd(author); + var time = DateTime.UnixEpoch.AddSeconds(timestamp).ToLocalTime(); if (time >= _thisWeekStart) - Week.AddCommit(time, author); + Week.AddCommit(time, user); if (time >= _thisMonthStart) - Month.AddCommit(time, author); + Month.AddCommit(time, user); - All.AddCommit(time, author); + All.AddCommit(time, user); } public void Complete() diff --git a/src/Views/Statistics.axaml b/src/Views/Statistics.axaml index 0c002407..3bbdafbe 100644 --- a/src/Views/Statistics.axaml +++ b/src/Views/Statistics.axaml @@ -136,7 +136,7 @@ - + - - - + + + + - + @@ -177,7 +181,7 @@ - + From da38b72ee5b3f653bfd197975a73b66ef430b571 Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 8 Apr 2025 18:03:40 +0800 Subject: [PATCH 046/524] ux: disable commit button when commit message is empty Signed-off-by: leo --- src/Converters/StringConverters.cs | 3 +++ src/ViewModels/WorkingCopy.cs | 9 +++------ src/Views/WorkingCopy.axaml | 30 +++++++++++++++++++++++++----- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/Converters/StringConverters.cs b/src/Converters/StringConverters.cs index 5e4608c5..bcadfae9 100644 --- a/src/Converters/StringConverters.cs +++ b/src/Converters/StringConverters.cs @@ -81,5 +81,8 @@ namespace SourceGit.Converters public static readonly FuncValueConverter ContainsSpaces = new FuncValueConverter(v => v != null && v.Contains(' ')); + + public static readonly FuncValueConverter IsNotNullOrWhitespace = + new FuncValueConverter(v => v != null && v.Trim().Length > 0); } } diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index a0933ea3..784328cc 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -1652,6 +1652,9 @@ namespace SourceGit.ViewModels private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty = false, bool confirmWithFilter = false) { + if (string.IsNullOrWhiteSpace(_commitMessage)) + return; + if (!_repo.CanCreatePopup()) { App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!"); @@ -1672,12 +1675,6 @@ namespace SourceGit.ViewModels return; } - if (string.IsNullOrWhiteSpace(_commitMessage)) - { - App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!"); - return; - } - if (!_useAmend && !allowEmpty) { if ((autoStage && _count == 0) || (!autoStage && _staged.Count == 0)) diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 94dd0c30..4ca854fa 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -295,7 +295,9 @@ - + @@ -309,7 +311,6 @@ Command="{Binding Commit}" HotKey="{OnPlatform Ctrl+Enter, macOS=⌘+Enter}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNull}}" - IsEnabled="{Binding !IsCommitting}" ToolTip.Placement="Top" ToolTip.VerticalOffset="0"> @@ -324,6 +325,13 @@ + + + + + + + @@ -331,8 +339,14 @@ Width="0" Height="0" Background="Transparent" Command="{Binding CommitWithAutoStage}" - HotKey="{OnPlatform Ctrl+Shift+Enter, macOS=⌘+Shift+Enter}" - IsEnabled="{Binding !IsCommitting}"/> + HotKey="{OnPlatform Ctrl+Shift+Enter, macOS=⌘+Shift+Enter}"> + + + + + + + + - - - - From a99ab377977776cf0c45c483fd6fa3b44fc09265 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 11 Apr 2025 01:33:18 +0000 Subject: [PATCH 054/524] doc: Update translation status and missing keys --- TRANSLATION.md | 66 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 0a469262..aee13ea5 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-97.86%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-97.34%25-yellow)
Missing keys in de_DE.axaml @@ -27,10 +27,14 @@ This document shows the translation status of each locale file in the repository - Text.Preferences.General.ShowTagsInGraph - Text.StashCM.SaveAsPatch - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![es__ES](https://img.shields.io/badge/es__ES-99.20%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-98.67%25-yellow)
Missing keys in es_ES.axaml @@ -41,10 +45,14 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.Continue - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![fr__FR](https://img.shields.io/badge/fr__FR-99.20%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-98.67%25-yellow)
Missing keys in fr_FR.axaml @@ -55,10 +63,14 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.Continue - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![it__IT](https://img.shields.io/badge/it__IT-98.93%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-98.40%25-yellow)
Missing keys in it_IT.axaml @@ -71,10 +83,14 @@ This document shows the translation status of each locale file in the repository - Text.CopyFullPath - Text.Preferences.General.ShowTagsInGraph - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![ja__JP](https://img.shields.io/badge/ja__JP-98.93%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-98.40%25-yellow)
Missing keys in ja_JP.axaml @@ -87,10 +103,14 @@ This document shows the translation status of each locale file in the repository - Text.Repository.FilterCommits - Text.Repository.Tags.OrderByNameDes - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![pt__BR](https://img.shields.io/badge/pt__BR-90.24%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-89.76%25-yellow)
Missing keys in pt_BR.axaml @@ -167,11 +187,15 @@ This document shows the translation status of each locale file in the repository - Text.StashCM.SaveAsPatch - Text.WorkingCopy.CommitToEdit - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs - Text.WorkingCopy.SignOff
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.20%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-98.67%25-yellow)
Missing keys in ru_RU.axaml @@ -182,9 +206,33 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.Continue - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.WorkingCopy.ConfirmCommitWithFilter +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs
-### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) +### ![zh__CN](https://img.shields.io/badge/zh__CN-99.47%25-yellow) -### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file +
+Missing keys in zh_CN.axaml + +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs + +
+ +### ![zh__TW](https://img.shields.io/badge/zh__TW-99.47%25-yellow) + +
+Missing keys in zh_TW.axaml + +- Text.WorkingCopy.Conflicts.OpenExternalMergeTool +- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts +- Text.WorkingCopy.Conflicts.UseMine +- Text.WorkingCopy.Conflicts.UseTheirs + +
\ No newline at end of file From 1799de4907c9b01290cd9e9700c80717b1238b41 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 11 Apr 2025 10:02:33 +0800 Subject: [PATCH 055/524] code_review: PR #1173 - rename c-style `file_arg` to `fileArg` - add missing translations for zh_CN and zh_TW - re-design conflict view and add tooltip for `USE THEIRS` and `USE MINE` - re-order unstaged toolbar buttons Signed-off-by: leo --- src/Commands/MergeTool.cs | 6 +- src/Resources/Locales/zh_CN.axaml | 4 + src/Resources/Locales/zh_TW.axaml | 4 + src/Views/Conflict.axaml | 167 ++++++++++++++++-------------- src/Views/WorkingCopy.axaml | 26 ++--- 5 files changed, 115 insertions(+), 92 deletions(-) diff --git a/src/Commands/MergeTool.cs b/src/Commands/MergeTool.cs index 276c078b..f67f5e48 100644 --- a/src/Commands/MergeTool.cs +++ b/src/Commands/MergeTool.cs @@ -14,11 +14,11 @@ namespace SourceGit.Commands cmd.RaiseError = true; // NOTE: If no names are specified, 'git mergetool' will run the merge tool program on every file with merge conflicts. - var file_arg = string.IsNullOrEmpty(file) ? "" : $"\"{file}\""; + var fileArg = string.IsNullOrEmpty(file) ? "" : $"\"{file}\""; if (toolType == 0) { - cmd.Args = $"mergetool {file_arg}"; + cmd.Args = $"mergetool {fileArg}"; return cmd.Exec(); } @@ -35,7 +35,7 @@ namespace SourceGit.Commands return false; } - cmd.Args = $"-c mergetool.sourcegit.cmd=\"\\\"{toolPath}\\\" {supported.Cmd}\" -c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true mergetool --tool=sourcegit {file_arg}"; + cmd.Args = $"-c mergetool.sourcegit.cmd=\"\\\"{toolPath}\\\" {supported.Cmd}\" -c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true mergetool --tool=sourcegit {fileArg}"; return cmd.Exec(); } diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index b303374f..1b878b29 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -731,7 +731,11 @@ 自动暂存所有变更并提交 当前有 {0} 个文件在暂存区中,但仅显示了 {1} 个文件({2} 个文件被过滤掉了),是否继续提交? 检测到冲突 + 打开合并工具 + 打开合并工具解决冲突 文件冲突已解决 + 使用 MINE + 使用 THEIRS 显示未跟踪文件 没有提交信息记录 没有可应用的提交信息模板 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 4239667f..e090d32d 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -730,7 +730,11 @@ 自動暫存全部變更並提交 您已暫存 {0} 檔案,但只顯示 {1} 檔案 ({2} 檔案被篩選器隱藏)。您要繼續嗎? 檢測到衝突 + 使用外部合併工具開啟 + 使用外部合併工具開啟 檔案衝突已解決 + 使用 MINE + 使用 THEIRS 顯示未追蹤檔案 沒有提交訊息記錄 沒有可套用的提交訊息範本 diff --git a/src/Views/Conflict.axaml b/src/Views/Conflict.axaml index 7f13f14e..f2d7bdec 100644 --- a/src/Views/Conflict.axaml +++ b/src/Views/Conflict.axaml @@ -12,83 +12,83 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -105,9 +105,24 @@ - + + diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index 7d471142..41d80b04 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -68,6 +68,19 @@ + + - - + + +
diff --git a/src/Views/ConfigureWorkspace.axaml.cs b/src/Views/ConfigureWorkspace.axaml.cs index 9e458f6f..8ef5dec7 100644 --- a/src/Views/ConfigureWorkspace.axaml.cs +++ b/src/Views/ConfigureWorkspace.axaml.cs @@ -1,4 +1,7 @@ using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Platform.Storage; +using System; namespace SourceGit.Views { @@ -16,5 +19,28 @@ namespace SourceGit.Views if (!Design.IsDesignMode) ViewModels.Preferences.Instance.Save(); } + + private async void SelectDefaultCloneDir(object _, RoutedEventArgs e) + { + var workspace = DataContext as ViewModels.ConfigureWorkspace; + if (workspace?.Selected == null) + return; + + var options = new FolderPickerOpenOptions() { AllowMultiple = false }; + try + { + var selected = await StorageProvider.OpenFolderPickerAsync(options); + if (selected.Count == 1) + { + workspace.Selected.DefaultCloneDir = selected[0].Path.LocalPath; + } + } + catch (Exception ex) + { + App.RaiseException(string.Empty, $"Failed to select default clone directory: {ex.Message}"); + } + + e.Handled = true; + } } } From b7aa49403bdb3805460b1c70d7e3b7fa4887c13c Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 14 Apr 2025 17:03:08 +0800 Subject: [PATCH 073/524] code_review: PR #1183 - code style in `Clone` constructor - re-design workspace configuration dialog Signed-off-by: leo --- 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/ta_IN.axaml | 1 + src/Resources/Locales/zh_CN.axaml | 1 + src/Resources/Locales/zh_TW.axaml | 1 + src/ViewModels/Clone.cs | 17 +++++------------ src/Views/ConfigureWorkspace.axaml | 29 +++++++++++++++++------------ 12 files changed, 32 insertions(+), 24 deletions(-) diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 1ceac07c..3cb70cea 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -176,6 +176,7 @@ Benutzername für dieses Repository Arbeitsplätze Farbe + Name Zuletzt geöffnete Tabs beim Starten wiederherstellen Konventionelle Commit-Hilfe Breaking Change: diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 7ec38670..7e931998 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -176,6 +176,7 @@ User name for this repository Workspaces Color + Name Restore tabs on startup CONTINUE Empty commit detected! Do you want to continue (--allow-empty)? diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 04fdde4b..24deeabd 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -179,6 +179,7 @@ Nombre de usuario para este repositorio Espacios de Trabajo Color + Nombre Restaurar pestañas al iniciar Asistente de Commit Convencional Cambio Importante: diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index f5679ab8..61098493 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -180,6 +180,7 @@ Nom d'utilisateur pour ce dépôt Espaces de travail Couleur + Nom Restaurer les onglets au démarrage Assistant Commits Conventionnels Changement Radical : diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 5ed81da2..1d9901a8 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -179,6 +179,7 @@ Nome utente per questo repository Spazi di Lavoro Colore + Nome Ripristina schede all'avvio Guida Commit Convenzionali Modifica Sostanziale: diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml index 1b94ed6f..db671768 100644 --- a/src/Resources/Locales/ja_JP.axaml +++ b/src/Resources/Locales/ja_JP.axaml @@ -179,6 +179,7 @@ このリポジトリにおけるユーザー名 ワークスペース + 名前 起動時にタブを復元 Conventional Commitヘルパー 破壊的変更: diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index e78c1a36..299ececd 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -161,6 +161,7 @@ Nome de usuário para este repositório Workspaces Cor + Nome Restaurar abas ao inicializar Assistente de Conventional Commit Breaking Change: diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml index 30c2244b..d8d6f540 100644 --- a/src/Resources/Locales/ta_IN.axaml +++ b/src/Resources/Locales/ta_IN.axaml @@ -179,6 +179,7 @@ இந்த களஞ்சியத்திற்கான பயனர் பெயர் பணியிடங்கள் நிறம் + பெயர் தாவல்களை மீட்டமை வழக்கமான உறுதிமொழி உதவியாளர் உடைக்கும் மாற்றம்: diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index d8b63422..9040644a 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -180,6 +180,7 @@ 应用于本仓库的用户名 工作区 颜色 + 名称 启动时恢复打开的仓库 确认继续 提交未包含变更文件!是否继续(--allow-empty)? diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 833e6610..8437eefc 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -180,6 +180,7 @@ 用於本存放庫的使用者名稱 工作區 顏色 + 名稱 啟動時還原上次開啟的存放庫 确认继续 未包含任何檔案變更! 您是否仍要提交 (--allow-empty)? diff --git a/src/ViewModels/Clone.cs b/src/ViewModels/Clone.cs index 2b7c2580..97c90523 100644 --- a/src/ViewModels/Clone.cs +++ b/src/ViewModels/Clone.cs @@ -62,18 +62,13 @@ namespace SourceGit.ViewModels public Clone(string pageId) { _pageId = pageId; - View = new Views.Clone() { DataContext = this }; - // Use workspace-specific DefaultCloneDir if available var activeWorkspace = Preferences.Instance.GetActiveWorkspace(); - if (activeWorkspace != null && !string.IsNullOrEmpty(activeWorkspace.DefaultCloneDir)) - { - ParentFolder = activeWorkspace.DefaultCloneDir; - } - else - { - ParentFolder = Preferences.Instance.GitDefaultCloneDir; - } + _parentFolder = activeWorkspace?.DefaultCloneDir; + if (string.IsNullOrEmpty(ParentFolder)) + _parentFolder = Preferences.Instance.GitDefaultCloneDir; + + View = new Views.Clone() { DataContext = this }; Task.Run(async () => { @@ -81,9 +76,7 @@ namespace SourceGit.ViewModels { var text = await App.GetClipboardTextAsync(); if (Models.Remote.IsValidURL(text)) - { Dispatcher.UIThread.Invoke(() => Remote = text); - } } catch { diff --git a/src/Views/ConfigureWorkspace.axaml b/src/Views/ConfigureWorkspace.axaml index 0bef89b9..169df154 100644 --- a/src/Views/ConfigureWorkspace.axaml +++ b/src/Views/ConfigureWorkspace.axaml @@ -98,20 +98,25 @@ - - - + + + + + + + + + + + + + + - - - - - - - From 558eb7c9ac0ddff802047227e806770e303526cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 14 Apr 2025 09:03:23 +0000 Subject: [PATCH 074/524] doc: Update translation status and missing keys --- TRANSLATION.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index a2991c6e..7ae5b13f 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -70,7 +70,7 @@ This document shows the translation status of each locale file in the repository -### ![it__IT](https://img.shields.io/badge/it__IT-98.40%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-98.41%25-yellow)
Missing keys in it_IT.axaml @@ -90,7 +90,7 @@ This document shows the translation status of each locale file in the repository
-### ![ja__JP](https://img.shields.io/badge/ja__JP-98.40%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-98.41%25-yellow)
Missing keys in ja_JP.axaml @@ -110,7 +110,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-89.76%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-89.77%25-yellow)
Missing keys in pt_BR.axaml From 09c0edef8e97f00e3dc479a2abd02ca416ac9d78 Mon Sep 17 00:00:00 2001 From: Massimo Date: Mon, 14 Apr 2025 13:16:15 +0200 Subject: [PATCH 075/524] feat: implement IPC for opening repositories in new tabs (#1185) * refactor: improve diff handling for EOL changes and enhance text diff display - Updated `Diff.cs` to streamline whitespace handling in diff arguments. - Enhanced `DiffContext.cs` to check for EOL changes when old and new hashes differ, creating a text diff if necessary. - Added support for showing end-of-line symbols in `TextDiffView.axaml.cs` options. * localization: update translations to include EOF handling in ignore whitespace messages - Modified the ignore whitespace text in multiple language files to specify that EOF changes are also ignored. - Ensured consistency across all localization files for the patch application feature. * revert: Typo in DiffResult comment * revert: update diff arguments to ignore CR at EOL in whitespace handling (like before changes) * revert: update translations to remove EOF references in Text.Apply.IgnoreWS and fixed typo in Text.Diff.IgnoreWhitespace (EOF => EOL) * feat: add workspace-specific default clone directory functionality - Implemented logic in Clone.cs to set ParentFolder based on the active workspace's DefaultCloneDir if available, falling back to the global GitDefaultCloneDir. - Added DefaultCloneDir property to Workspace.cs to store the default clone directory for each workspace. - Updated ConfigureWorkspace.axaml to include a TextBox and Button for setting the DefaultCloneDir in the UI. - Implemented folder selection functionality in ConfigureWorkspace.axaml.cs to allow users to choose a directory for cloning. - This closes issue #1145 * feat: implement IPC for opening repositories in new tabs - Added functionality to send repository paths to an existing instance of the application using named pipes. - Introduced a new preference option to open repositories in a new tab instead of a new window. - Updated UI to include a checkbox for the new preference. - Enhanced the handling of IPC server lifecycle based on the new preference setting. - This closes issue #1184 --------- Co-authored-by: mpagani --- src/App.axaml.cs | 145 +++++++++++++++++++++++++++++- src/Resources/Locales/en_US.axaml | 1 + src/ViewModels/Preferences.cs | 7 ++ src/Views/Preferences.axaml | 7 +- 4 files changed, 157 insertions(+), 3 deletions(-) diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 0448a247..b1be7072 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -2,12 +2,14 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.IO.Pipes; using System.Net.Http; using System.Reflection; using System.Text; using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using System.Linq; using Avalonia; using Avalonia.Controls; @@ -46,6 +48,8 @@ namespace SourceGit Environment.Exit(exitTodo); else if (TryLaunchAsRebaseMessageEditor(args, out int exitMessage)) Environment.Exit(exitMessage); + else if (TrySendArgsToExistingInstance(args)) + Environment.Exit(0); else BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); } @@ -77,6 +81,44 @@ namespace SourceGit return builder; } + private static bool TrySendArgsToExistingInstance(string[] args) + { + if (args == null || args.Length != 1 || !Directory.Exists(args[0])) + return false; + + var pref = ViewModels.Preferences.Instance; + + if (!pref.OpenReposInNewTab) + return false; + + try + { + var processes = Process.GetProcessesByName("SourceGit"); + + if (processes.Length <= 1) + return false; + + using var client = new NamedPipeClientStream(".", "SourceGitIPC", PipeDirection.Out); + + client.Connect(1000); + + if (client.IsConnected) + { + using var writer = new StreamWriter(client); + + writer.WriteLine(args[0]); + writer.Flush(); + + return true; + } + } + catch (Exception) + { + } + + return false; + } + private static void LogException(Exception ex) { if (ex == null) @@ -328,7 +370,13 @@ namespace SourceGit AvaloniaXamlLoader.Load(this); var pref = ViewModels.Preferences.Instance; - pref.PropertyChanged += (_, _) => pref.Save(); + + pref.PropertyChanged += (s, e) => { + pref.Save(); + + if (e.PropertyName.Equals(nameof(ViewModels.Preferences.OpenReposInNewTab))) + HandleOpenReposInNewTabChanged(); + }; SetLocale(pref.Locale); SetTheme(pref.Theme, pref.ThemeOverrides); @@ -488,13 +536,104 @@ namespace SourceGit _launcher = new ViewModels.Launcher(startupRepo); desktop.MainWindow = new Views.Launcher() { DataContext = _launcher }; -#if !DISABLE_UPDATE_DETECTION var pref = ViewModels.Preferences.Instance; + + HandleOpenReposInNewTabChanged(); + +#if !DISABLE_UPDATE_DETECTION if (pref.ShouldCheck4UpdateOnStartup()) Check4Update(); #endif } + private void HandleOpenReposInNewTabChanged() + { + var pref = ViewModels.Preferences.Instance; + + if (pref.OpenReposInNewTab) + { + if (_ipcServerTask == null || _ipcServerTask.IsCompleted) + { + // Start IPC server + _ipcServerCts = new CancellationTokenSource(); + _ipcServerTask = Task.Run(() => StartIPCServer(_ipcServerCts.Token)); + } + } + else + { + // Stop IPC server if running + if (_ipcServerCts != null && !_ipcServerCts.IsCancellationRequested) + { + _ipcServerCts.Cancel(); + _ipcServerCts.Dispose(); + _ipcServerCts = null; + } + _ipcServerTask = null; + } + } + + private void StartIPCServer(CancellationToken cancellationToken) + { + try + { + while (!cancellationToken.IsCancellationRequested) + { + using var server = new NamedPipeServerStream("SourceGitIPC", PipeDirection.In); + + // Use WaitForConnectionAsync with cancellation token + try + { + Task connectionTask = server.WaitForConnectionAsync(cancellationToken); + connectionTask.Wait(cancellationToken); + } + catch (OperationCanceledException) + { + return; + } + catch (AggregateException ae) when (ae.InnerExceptions.Any(e => e is OperationCanceledException)) + { + return; + } + + // Process the connection + using var reader = new StreamReader(server); + var repoPath = reader.ReadLine(); + + if (!string.IsNullOrEmpty(repoPath) && Directory.Exists(repoPath)) + { + Dispatcher.UIThread.Post(() => + { + try + { + var test = new Commands.QueryRepositoryRootPath(repoPath).ReadToEnd(); + + if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut)) + { + var repoRootPath = test.StdOut.Trim(); + var pref = ViewModels.Preferences.Instance; + var node = pref.FindOrAddNodeByRepositoryPath(repoRootPath, null, false); + + ViewModels.Welcome.Instance.Refresh(); + + _launcher?.OpenRepositoryInTab(node, null); + + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop && desktop.MainWindow != null) + desktop.MainWindow.Activate(); + } + } + catch (Exception) + { + } + }); + } + } + } + catch (Exception) + { + // Pipe server failed, we can just exit the thread + } + } + private void Check4Update(bool manually = false) { Task.Run(async () => @@ -584,5 +723,7 @@ namespace SourceGit private ResourceDictionary _activeLocale = null; private ResourceDictionary _themeOverrides = null; private ResourceDictionary _fontsOverrides = null; + private Task _ipcServerTask = null; + private CancellationTokenSource _ipcServerCts = null; } } diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 7e931998..123b6381 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -752,4 +752,5 @@ Lock Remove Unlock + Open repositories in new tab instead of new window diff --git a/src/ViewModels/Preferences.cs b/src/ViewModels/Preferences.cs index cad6c224..d1e78d6a 100644 --- a/src/ViewModels/Preferences.cs +++ b/src/ViewModels/Preferences.cs @@ -90,6 +90,12 @@ namespace SourceGit.ViewModels } } + public bool OpenReposInNewTab + { + get => _openReposInNewTab; + set => SetProperty(ref _openReposInNewTab, value); + } + public bool UseSystemWindowFrame { get => _useSystemWindowFrame; @@ -632,6 +638,7 @@ namespace SourceGit.ViewModels private string _defaultFontFamily = string.Empty; private string _monospaceFontFamily = string.Empty; private bool _onlyUseMonoFontInEditor = false; + private bool _openReposInNewTab = false; private bool _useSystemWindowFrame = false; private double _defaultFontSize = 13; private double _editorFontSize = 13; diff --git a/src/Views/Preferences.axaml b/src/Views/Preferences.axaml index 702ec20f..704757df 100644 --- a/src/Views/Preferences.axaml +++ b/src/Views/Preferences.axaml @@ -46,7 +46,7 @@ - + + + Date: Mon, 14 Apr 2025 22:03:51 +0800 Subject: [PATCH 076/524] code_review: PR #1185 - make `SourceGit` running in singleton mode - `TrySendArgsToExistingInstance` should not be called before `BuildAvaloniaApp().StartWithClassicDesktopLifetime(args)` since we may want to launch `SourceGit` as a core editor. - avoid `preference.json` to be saved by multiple instances. - move IPC code to models. Signed-off-by: leo --- src/App.axaml.cs | 166 +++++------------------------- src/Models/IpcChannel.cs | 97 +++++++++++++++++ src/Resources/Locales/en_US.axaml | 1 - src/ViewModels/Preferences.cs | 15 ++- src/Views/Preferences.axaml | 7 +- 5 files changed, 133 insertions(+), 153 deletions(-) create mode 100644 src/Models/IpcChannel.cs diff --git a/src/App.axaml.cs b/src/App.axaml.cs index b1be7072..6504e85b 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -2,14 +2,12 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.IO.Pipes; using System.Net.Http; using System.Reflection; using System.Text; using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using System.Linq; using Avalonia; using Avalonia.Controls; @@ -48,8 +46,6 @@ namespace SourceGit Environment.Exit(exitTodo); else if (TryLaunchAsRebaseMessageEditor(args, out int exitMessage)) Environment.Exit(exitMessage); - else if (TrySendArgsToExistingInstance(args)) - Environment.Exit(0); else BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); } @@ -81,44 +77,6 @@ namespace SourceGit return builder; } - private static bool TrySendArgsToExistingInstance(string[] args) - { - if (args == null || args.Length != 1 || !Directory.Exists(args[0])) - return false; - - var pref = ViewModels.Preferences.Instance; - - if (!pref.OpenReposInNewTab) - return false; - - try - { - var processes = Process.GetProcessesByName("SourceGit"); - - if (processes.Length <= 1) - return false; - - using var client = new NamedPipeClientStream(".", "SourceGitIPC", PipeDirection.Out); - - client.Connect(1000); - - if (client.IsConnected) - { - using var writer = new StreamWriter(client); - - writer.WriteLine(args[0]); - writer.Flush(); - - return true; - } - } - catch (Exception) - { - } - - return false; - } - private static void LogException(Exception ex) { if (ex == null) @@ -370,13 +328,7 @@ namespace SourceGit AvaloniaXamlLoader.Load(this); var pref = ViewModels.Preferences.Instance; - - pref.PropertyChanged += (s, e) => { - pref.Save(); - - if (e.PropertyName.Equals(nameof(ViewModels.Preferences.OpenReposInNewTab))) - HandleOpenReposInNewTabChanged(); - }; + pref.PropertyChanged += (_, _) => pref.Save(); SetLocale(pref.Locale); SetTheme(pref.Theme, pref.ThemeOverrides); @@ -395,7 +347,17 @@ namespace SourceGit if (TryLaunchAsAskpass(desktop)) return; - TryLaunchAsNormal(desktop); + _ipcChannel = new Models.IpcChannel(); + if (!_ipcChannel.IsFirstInstance) + { + _ipcChannel.SendToFirstInstance(desktop.Args is { Length: 1 } ? desktop.Args[0] : string.Empty); + Quit(0); + } + else + { + _ipcChannel.MessageReceived += TryOpenRepository; + TryLaunchAsNormal(desktop); + } } } #endregion @@ -533,12 +495,12 @@ namespace SourceGit if (desktop.Args != null && desktop.Args.Length == 1 && Directory.Exists(desktop.Args[0])) startupRepo = desktop.Args[0]; + var pref = ViewModels.Preferences.Instance; + pref.SetCanModify(); + _launcher = new ViewModels.Launcher(startupRepo); desktop.MainWindow = new Views.Launcher() { DataContext = _launcher }; - - var pref = ViewModels.Preferences.Instance; - - HandleOpenReposInNewTabChanged(); + desktop.Exit += (_, _) => _ipcChannel.Dispose(); #if !DISABLE_UPDATE_DETECTION if (pref.ShouldCheck4UpdateOnStartup()) @@ -546,91 +508,20 @@ namespace SourceGit #endif } - private void HandleOpenReposInNewTabChanged() + private void TryOpenRepository(string repo) { - var pref = ViewModels.Preferences.Instance; - - if (pref.OpenReposInNewTab) + if (string.IsNullOrEmpty(repo) || !Directory.Exists(repo)) + return; + + var test = new Commands.QueryRepositoryRootPath(repo).ReadToEnd(); + if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut)) { - if (_ipcServerTask == null || _ipcServerTask.IsCompleted) + Dispatcher.UIThread.Invoke(() => { - // Start IPC server - _ipcServerCts = new CancellationTokenSource(); - _ipcServerTask = Task.Run(() => StartIPCServer(_ipcServerCts.Token)); - } - } - else - { - // Stop IPC server if running - if (_ipcServerCts != null && !_ipcServerCts.IsCancellationRequested) - { - _ipcServerCts.Cancel(); - _ipcServerCts.Dispose(); - _ipcServerCts = null; - } - _ipcServerTask = null; - } - } - - private void StartIPCServer(CancellationToken cancellationToken) - { - try - { - while (!cancellationToken.IsCancellationRequested) - { - using var server = new NamedPipeServerStream("SourceGitIPC", PipeDirection.In); - - // Use WaitForConnectionAsync with cancellation token - try - { - Task connectionTask = server.WaitForConnectionAsync(cancellationToken); - connectionTask.Wait(cancellationToken); - } - catch (OperationCanceledException) - { - return; - } - catch (AggregateException ae) when (ae.InnerExceptions.Any(e => e is OperationCanceledException)) - { - return; - } - - // Process the connection - using var reader = new StreamReader(server); - var repoPath = reader.ReadLine(); - - if (!string.IsNullOrEmpty(repoPath) && Directory.Exists(repoPath)) - { - Dispatcher.UIThread.Post(() => - { - try - { - var test = new Commands.QueryRepositoryRootPath(repoPath).ReadToEnd(); - - if (test.IsSuccess && !string.IsNullOrEmpty(test.StdOut)) - { - var repoRootPath = test.StdOut.Trim(); - var pref = ViewModels.Preferences.Instance; - var node = pref.FindOrAddNodeByRepositoryPath(repoRootPath, null, false); - - ViewModels.Welcome.Instance.Refresh(); - - _launcher?.OpenRepositoryInTab(node, null); - - if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop && desktop.MainWindow != null) - desktop.MainWindow.Activate(); - } - } - catch (Exception) - { - } - }); - } - } - } - catch (Exception) - { - // Pipe server failed, we can just exit the thread + var node = ViewModels.Preferences.Instance.FindOrAddNodeByRepositoryPath(test.StdOut.Trim(), null, false); + ViewModels.Welcome.Instance.Refresh(); + _launcher?.OpenRepositoryInTab(node, null); + }); } } @@ -719,11 +610,10 @@ namespace SourceGit return trimmed.Count > 0 ? string.Join(',', trimmed) : string.Empty; } + private Models.IpcChannel _ipcChannel = null; private ViewModels.Launcher _launcher = null; private ResourceDictionary _activeLocale = null; private ResourceDictionary _themeOverrides = null; private ResourceDictionary _fontsOverrides = null; - private Task _ipcServerTask = null; - private CancellationTokenSource _ipcServerCts = null; } } diff --git a/src/Models/IpcChannel.cs b/src/Models/IpcChannel.cs new file mode 100644 index 00000000..e2a34b29 --- /dev/null +++ b/src/Models/IpcChannel.cs @@ -0,0 +1,97 @@ +using System; +using System.IO; +using System.IO.Pipes; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace SourceGit.Models +{ + public class IpcChannel : IDisposable + { + public bool IsFirstInstance + { + get => _server != null; + } + + public event Action MessageReceived; + + public IpcChannel() + { + try + { + _server = new NamedPipeServerStream("SourceGitIPCChannel", PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous | PipeOptions.CurrentUserOnly); + _cancellationTokenSource = new CancellationTokenSource(); + Task.Run(StartServer); + } + catch + { + // IGNORE + } + } + + public void SendToFirstInstance(string cmd) + { + try + { + using (var client = new NamedPipeClientStream(".", "SourceGitIPCChannel", PipeDirection.Out)) + { + client.Connect(1000); + if (client.IsConnected) + { + using (var writer = new StreamWriter(client)) + { + writer.Write(Encoding.UTF8.GetBytes(cmd)); + writer.Flush(); + } + } + } + } + catch + { + // IGNORE + } + } + + public void Dispose() + { + _server?.Close(); + } + + private async void StartServer() + { + var buffer = new byte[1024]; + + while (true) + { + try + { + await _server.WaitForConnectionAsync(_cancellationTokenSource.Token); + + using (var stream = new MemoryStream()) + { + while (true) + { + var readed = await _server.ReadAsync(buffer.AsMemory(0, 1024), _cancellationTokenSource.Token); + if (readed == 0) + break; + + stream.Write(buffer, 0, readed); + } + + stream.Seek(0, SeekOrigin.Begin); + MessageReceived?.Invoke(Encoding.UTF8.GetString(stream.ToArray()).Trim()); + _server.Disconnect(); + } + } + catch + { + // IGNORE + } + } + } + + private NamedPipeServerStream _server = null; + private CancellationTokenSource _cancellationTokenSource = null; + } +} diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 123b6381..7e931998 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -752,5 +752,4 @@ Lock Remove Unlock - Open repositories in new tab instead of new window diff --git a/src/ViewModels/Preferences.cs b/src/ViewModels/Preferences.cs index d1e78d6a..9395e0a7 100644 --- a/src/ViewModels/Preferences.cs +++ b/src/ViewModels/Preferences.cs @@ -90,12 +90,6 @@ namespace SourceGit.ViewModels } } - public bool OpenReposInNewTab - { - get => _openReposInNewTab; - set => SetProperty(ref _openReposInNewTab, value); - } - public bool UseSystemWindowFrame { get => _useSystemWindowFrame; @@ -369,6 +363,11 @@ namespace SourceGit.ViewModels set => SetProperty(ref _lastCheckUpdateTime, value); } + public void SetCanModify() + { + _isReadonly = false; + } + public bool IsGitConfigured() { var path = GitInstallPath; @@ -496,7 +495,7 @@ namespace SourceGit.ViewModels public void Save() { - if (_isLoading) + if (_isLoading || _isReadonly) return; var file = Path.Combine(Native.OS.DataDir, "preference.json"); @@ -632,13 +631,13 @@ namespace SourceGit.ViewModels private static Preferences _instance = null; private static bool _isLoading = false; + private bool _isReadonly = true; private string _locale = "en_US"; private string _theme = "Default"; private string _themeOverrides = string.Empty; private string _defaultFontFamily = string.Empty; private string _monospaceFontFamily = string.Empty; private bool _onlyUseMonoFontInEditor = false; - private bool _openReposInNewTab = false; private bool _useSystemWindowFrame = false; private double _defaultFontSize = 13; private double _editorFontSize = 13; diff --git a/src/Views/Preferences.axaml b/src/Views/Preferences.axaml index 704757df..702ec20f 100644 --- a/src/Views/Preferences.axaml +++ b/src/Views/Preferences.axaml @@ -46,7 +46,7 @@ - + - - Date: Mon, 14 Apr 2025 22:05:05 +0800 Subject: [PATCH 077/524] fix: update visible staged changes retrieval in WorkingCopy (#1187) * doc: Update translation status and missing keys * fix: update visible staged changes retrieval in WorkingCopy * fix: prevent unintended amend behavior when changing current branch --------- Co-authored-by: github-actions[bot] --- TRANSLATION.md | 48 +++++++++++++++++++++++++++-------- src/ViewModels/Repository.cs | 10 +++++++- src/ViewModels/WorkingCopy.cs | 1 + 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 7ae5b13f..b4194fd9 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-97.34%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-97.21%25-yellow)
Missing keys in de_DE.axaml @@ -31,10 +31,11 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![es__ES](https://img.shields.io/badge/es__ES-98.67%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-98.54%25-yellow)
Missing keys in es_ES.axaml @@ -49,10 +50,11 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![fr__FR](https://img.shields.io/badge/fr__FR-98.67%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-98.54%25-yellow)
Missing keys in fr_FR.axaml @@ -67,10 +69,11 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![it__IT](https://img.shields.io/badge/it__IT-98.41%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-98.28%25-yellow)
Missing keys in it_IT.axaml @@ -87,10 +90,11 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![ja__JP](https://img.shields.io/badge/ja__JP-98.41%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-98.28%25-yellow)
Missing keys in ja_JP.axaml @@ -107,10 +111,11 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![pt__BR](https://img.shields.io/badge/pt__BR-89.77%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-89.66%25-yellow)
Missing keys in pt_BR.axaml @@ -192,12 +197,20 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs - Text.WorkingCopy.SignOff +- Text.Preferences.General.OpenReposInNewTab
-### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) -### ![ta__IN](https://img.shields.io/badge/ta__IN-98.67%25-yellow) +
+Missing keys in ru_RU.axaml + +- Text.Preferences.General.OpenReposInNewTab + +
+ +### ![ta__IN](https://img.shields.io/badge/ta__IN-98.54%25-yellow)
Missing keys in ta_IN.axaml @@ -212,9 +225,24 @@ This document shows the translation status of each locale file in the repository - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine - Text.WorkingCopy.Conflicts.UseTheirs +- Text.Preferences.General.OpenReposInNewTab
-### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen) +### ![zh__CN](https://img.shields.io/badge/zh__CN-99.87%25-yellow) -### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen) \ No newline at end of file +
+Missing keys in zh_CN.axaml + +- Text.Preferences.General.OpenReposInNewTab + +
+ +### ![zh__TW](https://img.shields.io/badge/zh__TW-99.87%25-yellow) + +
+Missing keys in zh_TW.axaml + +- Text.Preferences.General.OpenReposInNewTab + +
\ No newline at end of file diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 9b720c7b..97d47a77 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -162,7 +162,15 @@ namespace SourceGit.ViewModels public Models.Branch CurrentBranch { get => _currentBranch; - private set => SetProperty(ref _currentBranch, value); + private set + { + var oldHead = _currentBranch?.Head; + if (SetProperty(ref _currentBranch, value)) + { + if (oldHead != _currentBranch.Head && _workingCopy is { UseAmend: true }) + _workingCopy.UseAmend = false; + } + } } public List LocalBranchTrees diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 802c6c5d..3d7b9a28 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -94,6 +94,7 @@ namespace SourceGit.ViewModels } Staged = GetStagedChanges(); + VisibleStaged = GetVisibleChanges(_staged); SelectedStaged = []; } } From 1e0fd63543607b07664eb5083f6368ab804479e8 Mon Sep 17 00:00:00 2001 From: Gadfly Date: Mon, 14 Apr 2025 22:07:24 +0800 Subject: [PATCH 078/524] localization: add translation sorting and formatting (#1186) * doc: Update translation status and missing keys * localization: add translation sorting and formatting --------- Co-authored-by: github-actions[bot] --- .github/workflows/localization-check.yml | 5 ++-- build/scripts/localization-check.js | 34 +++++++++++++++++++++++- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.github/workflows/localization-check.yml b/.github/workflows/localization-check.yml index cc5201ab..8dcd61c8 100644 --- a/.github/workflows/localization-check.yml +++ b/.github/workflows/localization-check.yml @@ -4,7 +4,6 @@ on: branches: [ develop ] paths: - 'src/Resources/Locales/**' - - 'README.md' workflow_dispatch: workflow_call: @@ -32,8 +31,8 @@ jobs: git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' if [ -n "$(git status --porcelain)" ]; then - git add README.md TRANSLATION.md - git commit -m 'doc: Update translation status and missing keys' + git add TRANSLATION.md src/Resources/Locales/*.axaml + git commit -m 'doc: Update translation status and sort locale files' git push else echo "No changes to commit" diff --git a/build/scripts/localization-check.js b/build/scripts/localization-check.js index 1e8f1f0d..fc27fd1b 100644 --- a/build/scripts/localization-check.js +++ b/build/scripts/localization-check.js @@ -14,6 +14,22 @@ async function parseXml(filePath) { return parser.parseStringPromise(data); } +async function filterAndSortTranslations(localeData, enUSKeys, enUSData) { + const strings = localeData.ResourceDictionary['x:String']; + // Remove keys that don't exist in English file + const filtered = strings.filter(item => enUSKeys.has(item.$['x:Key'])); + + // Sort based on the key order in English file + const enUSKeysArray = enUSData.ResourceDictionary['x:String'].map(item => item.$['x:Key']); + filtered.sort((a, b) => { + const aIndex = enUSKeysArray.indexOf(a.$['x:Key']); + const bIndex = enUSKeysArray.indexOf(b.$['x:Key']); + return aIndex - bIndex; + }); + + return filtered; +} + async function calculateTranslationRate() { const enUSData = await parseXml(enUSFile); const enUSKeys = new Set(enUSData.ResourceDictionary['x:String'].map(item => item.$['x:Key'])); @@ -33,6 +49,22 @@ async function calculateTranslationRate() { const localeKeys = new Set(localeData.ResourceDictionary['x:String'].map(item => item.$['x:Key'])); const missingKeys = [...enUSKeys].filter(key => !localeKeys.has(key)); + // Sort and clean up extra translations + const sortedAndCleaned = await filterAndSortTranslations(localeData, enUSKeys, enUSData); + localeData.ResourceDictionary['x:String'] = sortedAndCleaned; + + // Save the updated file + const builder = new xml2js.Builder({ + headless: true, + renderOpts: { pretty: true, indent: ' ' } + }); + let xmlStr = builder.buildObject(localeData); + + // Add an empty line before the first x:String + xmlStr = xmlStr.replace(' 0) { const progress = ((enUSKeys.size - missingKeys.length) / enUSKeys.size) * 100; const badgeColor = progress >= 75 ? 'yellow' : 'red'; @@ -41,7 +73,7 @@ async function calculateTranslationRate() { lines.push(`
\nMissing keys in ${file}\n\n${missingKeys.map(key => `- ${key}`).join('\n')}\n\n
`) } else { lines.push(`### ![${locale}](https://img.shields.io/badge/${locale}-%E2%88%9A-brightgreen)`); - } + } } const content = lines.join('\n\n'); From e5dc211c35cb2a0d72a0d8910dee1c2dd06e9df6 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 14 Apr 2025 22:24:48 +0800 Subject: [PATCH 079/524] refactor: simpfy IPC code Signed-off-by: leo --- src/Models/IpcChannel.cs | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/Models/IpcChannel.cs b/src/Models/IpcChannel.cs index e2a34b29..9a9e0315 100644 --- a/src/Models/IpcChannel.cs +++ b/src/Models/IpcChannel.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.IO.Pipes; -using System.Text; using System.Threading; using System.Threading.Tasks; @@ -41,7 +40,7 @@ namespace SourceGit.Models { using (var writer = new StreamWriter(client)) { - writer.Write(Encoding.UTF8.GetBytes(cmd)); + writer.WriteLine(cmd); writer.Flush(); } } @@ -55,34 +54,22 @@ namespace SourceGit.Models public void Dispose() { - _server?.Close(); + _cancellationTokenSource?.Cancel(); } private async void StartServer() { - var buffer = new byte[1024]; + using var reader = new StreamReader(_server); - while (true) + while (!_cancellationTokenSource.IsCancellationRequested) { try { await _server.WaitForConnectionAsync(_cancellationTokenSource.Token); - - using (var stream = new MemoryStream()) - { - while (true) - { - var readed = await _server.ReadAsync(buffer.AsMemory(0, 1024), _cancellationTokenSource.Token); - if (readed == 0) - break; - - stream.Write(buffer, 0, readed); - } - - stream.Seek(0, SeekOrigin.Begin); - MessageReceived?.Invoke(Encoding.UTF8.GetString(stream.ToArray()).Trim()); - _server.Disconnect(); - } + + var line = (await reader.ReadLineAsync(_cancellationTokenSource.Token))?.Trim(); + MessageReceived?.Invoke(line); + _server.Disconnect(); } catch { From 05982e6dc0df4784c8c3863b6b08c45eb1f87fc2 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 14 Apr 2025 23:23:40 +0800 Subject: [PATCH 080/524] style: re-design style for disabled primary button Signed-off-by: leo --- src/Resources/Styles.axaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 38321356..391b9523 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -499,6 +499,12 @@ + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs new file mode 100644 index 00000000..624ff21e --- /dev/null +++ b/src/Views/ViewLogs.axaml.cs @@ -0,0 +1,108 @@ +using System; +using System.ComponentModel; + +using Avalonia; +using Avalonia.Controls; +using Avalonia.Controls.Primitives; +using Avalonia.Interactivity; + +using AvaloniaEdit; +using AvaloniaEdit.Document; +using AvaloniaEdit.Editing; +using AvaloniaEdit.TextMate; + +namespace SourceGit.Views +{ + public class LogContentPresenter : TextEditor + { + public static readonly StyledProperty LogProperty = + AvaloniaProperty.Register(nameof(Log)); + + public ViewModels.CommandLog Log + { + get => GetValue(LogProperty); + set => SetValue(LogProperty, value); + } + + protected override Type StyleKeyOverride => typeof(TextEditor); + + public LogContentPresenter() : base(new TextArea(), new TextDocument()) + { + IsReadOnly = true; + ShowLineNumbers = false; + WordWrap = false; + HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; + VerticalScrollBarVisibility = ScrollBarVisibility.Auto; + + TextArea.TextView.Margin = new Thickness(4, 0); + TextArea.TextView.Options.EnableHyperlinks = true; + TextArea.TextView.Options.EnableEmailHyperlinks = true; + } + + protected override void OnLoaded(RoutedEventArgs e) + { + base.OnLoaded(e); + + if (_textMate == null) + { + _textMate = Models.TextMateHelper.CreateForEditor(this); + Models.TextMateHelper.SetGrammarByFileName(_textMate, "Log.log"); + } + } + + protected override void OnUnloaded(RoutedEventArgs e) + { + base.OnUnloaded(e); + + if (_textMate != null) + { + _textMate.Dispose(); + _textMate = null; + } + + GC.Collect(); + } + + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == LogProperty) + { + if (change.NewValue is ViewModels.CommandLog log) + { + Text = log.Content; + log.Register(OnLogLineReceived); + } + else + { + Text = string.Empty; + } + } + } + + private void OnLogLineReceived(string newline) + { + AppendText("\n"); + AppendText(newline); + } + + private TextMate.Installation _textMate = null; + } + + public partial class ViewLogs : ChromelessWindow + { + public ViewLogs() + { + InitializeComponent(); + } + + private void OnRemoveLog(object sender, RoutedEventArgs e) + { + if (sender is Button { DataContext: ViewModels.CommandLog log } && DataContext is ViewModels.ViewLogs vm) + vm.Logs.Remove(log); + + e.Handled = true; + } + } +} From c23177229836cf9329bb40f9048e2b7a0c8e922d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 17 Apr 2025 05:24:26 +0000 Subject: [PATCH 106/524] doc: Update translation status and sort locale files --- TRANSLATION.md | 36 +++++++++++++++++++++++-------- src/Resources/Locales/zh_CN.axaml | 2 +- src/Resources/Locales/zh_TW.axaml | 2 +- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index d942a328..e2535903 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-97.21%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-96.96%25-yellow)
Missing keys in de_DE.axaml @@ -26,7 +26,9 @@ This document shows the translation status of each locale file in the repository - Text.Preferences.AI.Streaming - Text.Preferences.Appearance.EditorTabWidth - Text.Preferences.General.ShowTagsInGraph +- Text.Repository.ViewLogs - Text.StashCM.SaveAsPatch +- Text.ViewLogs - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -35,7 +37,7 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-98.54%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-98.28%25-yellow)
Missing keys in es_ES.axaml @@ -46,6 +48,8 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.NoLocalChanges - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.ConfirmEmptyCommit.WithLocalChanges +- Text.Repository.ViewLogs +- Text.ViewLogs - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -54,7 +58,7 @@ This document shows the translation status of each locale file in the repository
-### ![fr__FR](https://img.shields.io/badge/fr__FR-98.54%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-98.28%25-yellow)
Missing keys in fr_FR.axaml @@ -65,6 +69,8 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.NoLocalChanges - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.ConfirmEmptyCommit.WithLocalChanges +- Text.Repository.ViewLogs +- Text.ViewLogs - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -73,7 +79,7 @@ This document shows the translation status of each locale file in the repository
-### ![it__IT](https://img.shields.io/badge/it__IT-98.28%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-98.02%25-yellow)
Missing keys in it_IT.axaml @@ -86,6 +92,8 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.WithLocalChanges - Text.CopyFullPath - Text.Preferences.General.ShowTagsInGraph +- Text.Repository.ViewLogs +- Text.ViewLogs - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -94,7 +102,7 @@ This document shows the translation status of each locale file in the repository
-### ![ja__JP](https://img.shields.io/badge/ja__JP-98.28%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-98.02%25-yellow)
Missing keys in ja_JP.axaml @@ -107,6 +115,8 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.WithLocalChanges - Text.Repository.FilterCommits - Text.Repository.Tags.OrderByNameDes +- Text.Repository.ViewLogs +- Text.ViewLogs - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -115,7 +125,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-89.66%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-89.42%25-yellow)
Missing keys in pt_BR.axaml @@ -183,6 +193,7 @@ This document shows the translation status of each locale file in the repository - Text.Repository.Tags.OrderByNameDes - Text.Repository.Tags.Sort - Text.Repository.UseRelativeTimeInHistories +- Text.Repository.ViewLogs - Text.SetUpstream - Text.SetUpstream.Local - Text.SetUpstream.Unset @@ -191,6 +202,7 @@ This document shows the translation status of each locale file in the repository - Text.Stash.AutoRestore - Text.Stash.AutoRestore.Tip - Text.StashCM.SaveAsPatch +- Text.ViewLogs - Text.WorkingCopy.CommitToEdit - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool @@ -201,16 +213,18 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.60%25-yellow)
Missing keys in ru_RU.axaml - Text.CommitMessageTextBox.SubjectCount +- Text.Repository.ViewLogs +- Text.ViewLogs
-### ![ta__IN](https://img.shields.io/badge/ta__IN-98.54%25-yellow) +### ![ta__IN](https://img.shields.io/badge/ta__IN-98.28%25-yellow)
Missing keys in ta_IN.axaml @@ -221,7 +235,9 @@ This document shows the translation status of each locale file in the repository - Text.ConfirmEmptyCommit.NoLocalChanges - Text.ConfirmEmptyCommit.StageAllThenCommit - Text.ConfirmEmptyCommit.WithLocalChanges +- Text.Repository.ViewLogs - Text.UpdateSubmodules.Target +- Text.ViewLogs - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine @@ -229,13 +245,15 @@ This document shows the translation status of each locale file in the repository
-### ![uk__UA](https://img.shields.io/badge/uk__UA-99.73%25-yellow) +### ![uk__UA](https://img.shields.io/badge/uk__UA-99.47%25-yellow)
Missing keys in uk_UA.axaml - Text.CommitMessageTextBox.SubjectCount - Text.ConfigureWorkspace.Name +- Text.Repository.ViewLogs +- Text.ViewLogs
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index a4d33601..cb99d6f0 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -759,4 +759,4 @@ 锁定工作树 移除工作树 解除工作树锁定 - + \ No newline at end of file diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 581f25f2..2fa67983 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -759,4 +759,4 @@ 鎖定工作區 移除工作區 解除鎖定工作區 - + \ No newline at end of file From 0e967ffc8e28a361d3bc4a48a1f72e38a58897c7 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 13:30:25 +0800 Subject: [PATCH 107/524] fix: pressing `Alt+Enter` to commit and push in a repository that has no remotes will crash (#1205) Signed-off-by: leo --- src/ViewModels/WorkingCopy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 60b8fd11..10544970 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -1735,7 +1735,7 @@ namespace SourceGit.ViewModels CommitMessage = string.Empty; UseAmend = false; - if (autoPush) + if (autoPush && _repo.Remotes.Count > 0) _repo.ShowAndStartPopup(new Push(_repo, null)); } From 33ae6a998959bc63aa8796f10bdd4c705e7c021b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Mart=C3=ADnez=20M=2E?= <56406225+jjesus-dev@users.noreply.github.com> Date: Wed, 16 Apr 2025 23:34:27 -0600 Subject: [PATCH 108/524] localization: update spanish translations (#1206) add missing translations modify instances of `stagear` with `hacer stage` --- src/Resources/Locales/es_ES.axaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index d4d442b0..ff6d02f7 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -136,6 +136,7 @@ SHA Abrir en Navegador Descripción + ASUNTO Introducir asunto del commit Configurar Repositorio PLANTILLA DE COMMIT @@ -157,6 +158,7 @@ Fetch remotos automáticamente Minuto(s) Remoto por Defecto + Modo preferido de Merge SEGUIMIENTO DE INCIDENCIAS Añadir Regla de Ejemplo para Azure DevOps Añadir Regla de Ejemplo para Incidencias de Gitee @@ -181,6 +183,10 @@ Color Nombre Restaurar pestañas al iniciar + CONTINUAR + ¡Commit vacío detectado! ¿Quieres continuar (--allow-empty)? + HACER STAGE A TODO & COMMIT + ¡Commit vacío detectado! ¿Quieres continuar (--allow-empty) o hacer stage a todo y después commit? Asistente de Commit Convencional Cambio Importante: Incidencia Cerrada: @@ -717,15 +723,20 @@ Ignorar archivos en la misma carpeta Ignorar solo este archivo Enmendar - Puedes stagear este archivo ahora. + Puedes hacer stage a este archivo ahora. COMMIT COMMIT & PUSH Plantilla/Historias Activar evento de clic Commit (Editar) - Stagear todos los cambios y commit + Hacer stage a todos los cambios y commit + Tienes {0} archivo(s) en stage, pero solo {1} archivo(s) mostrado(s) ({2} archivo(s) están filtrados). ¿Quieres continuar? CONFLICTOS DETECTADOS + ABRIR HERRAMIENTA DE MERGE EXTERNA + ABRIR TODOS LOS CONFLICTOS EN HERRAMIENTA DE MERGE EXTERNA LOS CONFLICTOS DE ARCHIVOS ESTÁN RESUELTOS + USAR MÍOS + USAR SUYOS INCLUIR ARCHIVOS NO RASTREADOS NO HAY MENSAJES DE ENTRADA RECIENTES NO HAY PLANTILLAS DE COMMIT From 2a43efde07864bdfac359757cfcf1d17fe3f3e9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 17 Apr 2025 05:34:40 +0000 Subject: [PATCH 109/524] doc: Update translation status and sort locale files --- TRANSLATION.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index e2535903..62fe960f 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -37,24 +37,13 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-98.28%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-99.74%25-yellow)
Missing keys in es_ES.axaml -- Text.CommitMessageTextBox.SubjectCount -- Text.Configure.Git.PreferredMergeMode -- Text.ConfirmEmptyCommit.Continue -- Text.ConfirmEmptyCommit.NoLocalChanges -- Text.ConfirmEmptyCommit.StageAllThenCommit -- Text.ConfirmEmptyCommit.WithLocalChanges - Text.Repository.ViewLogs - Text.ViewLogs -- Text.WorkingCopy.ConfirmCommitWithFilter -- Text.WorkingCopy.Conflicts.OpenExternalMergeTool -- Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts -- Text.WorkingCopy.Conflicts.UseMine -- Text.WorkingCopy.Conflicts.UseTheirs
From c1e31ac4e3a1a7ca062761c50533de65d455e692 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 15:48:02 +0800 Subject: [PATCH 110/524] ci: try to remove zlib1g-dev:arm64 Signed-off-by: leo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcb32580..12792cf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,7 +58,7 @@ jobs: if: ${{ matrix.runtime == 'linux-arm64' }} run: | sudo apt-get update - sudo apt-get install -y llvm gcc-aarch64-linux-gnu zlib1g-dev:arm64 + sudo apt-get install -y llvm gcc-aarch64-linux-gnu - name: Build run: dotnet build -c Release - name: Publish From 021aab84087fd348a56283fda640caa9c89ec054 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 16:07:40 +0800 Subject: [PATCH 111/524] enhance: add a button to clear all git command logs Signed-off-by: leo --- build/scripts/localization-check.js | 3 +-- src/Resources/Locales/en_US.axaml | 1 + src/Resources/Locales/zh_CN.axaml | 3 ++- src/Resources/Locales/zh_TW.axaml | 3 ++- src/ViewModels/ViewLogs.cs | 6 ++++++ src/Views/ViewLogs.axaml | 11 ++++++++++- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/build/scripts/localization-check.js b/build/scripts/localization-check.js index fc27fd1b..8d636b5b 100644 --- a/build/scripts/localization-check.js +++ b/build/scripts/localization-check.js @@ -62,8 +62,7 @@ async function calculateTranslationRate() { // Add an empty line before the first x:String xmlStr = xmlStr.replace(' 0) { const progress = ((enUSKeys.size - missingKeys.length) / enUSKeys.size) * 100; diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 5d1bb7e1..1e92ae38 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -699,6 +699,7 @@ Use --remote option URL: Logs + CLEAR ALL Warning Welcome Page Create Group diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index cb99d6f0..0471285f 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -703,6 +703,7 @@ 启用 '--remote' 仓库地址 : 日志列表 + 清空日志 警告 起始页 新建分组 @@ -759,4 +760,4 @@ 锁定工作树 移除工作树 解除工作树锁定 - \ No newline at end of file + diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 2fa67983..edd8cf8c 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -703,6 +703,7 @@ 啟用 [--remote] 選項 存放庫網址: 日誌清單 + 清除所有日誌 警告 起始頁 新增群組 @@ -759,4 +760,4 @@ 鎖定工作區 移除工作區 解除鎖定工作區 - \ No newline at end of file + diff --git a/src/ViewModels/ViewLogs.cs b/src/ViewModels/ViewLogs.cs index 44c819ce..21ab81ab 100644 --- a/src/ViewModels/ViewLogs.cs +++ b/src/ViewModels/ViewLogs.cs @@ -21,6 +21,12 @@ namespace SourceGit.ViewModels _repo = repo; } + public void ClearAll() + { + SelectedLog = null; + Logs.Clear(); + } + private Repository _repo = null; private CommandLog _selectedLog = null; } diff --git a/src/Views/ViewLogs.axaml b/src/Views/ViewLogs.axaml index 8272078d..125caa22 100644 --- a/src/Views/ViewLogs.axaml +++ b/src/Views/ViewLogs.axaml @@ -4,6 +4,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="using:SourceGit.ViewModels" xmlns:v="using:SourceGit.Views" + xmlns:c="using:SourceGit.Converters" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="SourceGit.Views.ViewLogs" x:DataType="vm:ViewLogs" @@ -13,7 +14,7 @@ Width="800" Height="500" CanResize="False" WindowStartupLocation="CenterOwner"> - + + + +
diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs index 624ff21e..62bf288d 100644 --- a/src/Views/ViewLogs.axaml.cs +++ b/src/Views/ViewLogs.axaml.cs @@ -97,10 +97,33 @@ namespace SourceGit.Views InitializeComponent(); } - private void OnRemoveLog(object sender, RoutedEventArgs e) + private void OnLogContextRequested(object sender, ContextRequestedEventArgs e) { - if (sender is Button { DataContext: ViewModels.CommandLog log } && DataContext is ViewModels.ViewLogs vm) + if (sender is not Grid { DataContext: ViewModels.CommandLog log } grid || DataContext is not ViewModels.ViewLogs vm) + return; + + var copy = new MenuItem(); + copy.Header = App.Text("ViewLogs.CopyLog"); + copy.Icon = App.CreateMenuIcon("Icons.Copy"); + copy.Click += (_, ev) => + { + App.CopyText(log.Content); + ev.Handled = true; + }; + + var rm = new MenuItem(); + rm.Header = App.Text("ViewLogs.Delete"); + rm.Icon = App.CreateMenuIcon("Icons.Clear"); + rm.Click += (_, ev) => + { vm.Logs.Remove(log); + ev.Handled = true; + }; + + var menu = new ContextMenu(); + menu.Items.Add(copy); + menu.Items.Add(rm); + menu.Open(grid); e.Handled = true; } From a06d1183d76049bd7df1e6136025895dddbe1655 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 17 Apr 2025 08:32:08 +0000 Subject: [PATCH 114/524] doc: Update translation status and sort locale files --- TRANSLATION.md | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 5e316750..4f13d26a 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-96.83%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-96.57%25-yellow)
Missing keys in de_DE.axaml @@ -30,6 +30,8 @@ This document shows the translation status of each locale file in the repository - Text.StashCM.SaveAsPatch - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -38,7 +40,7 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-99.60%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-99.34%25-yellow)
Missing keys in es_ES.axaml @@ -46,10 +48,12 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete
-### ![fr__FR](https://img.shields.io/badge/fr__FR-98.15%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-97.89%25-yellow)
Missing keys in fr_FR.axaml @@ -63,6 +67,8 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -71,7 +77,7 @@ This document shows the translation status of each locale file in the repository
-### ![it__IT](https://img.shields.io/badge/it__IT-97.89%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-97.63%25-yellow)
Missing keys in it_IT.axaml @@ -87,6 +93,8 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -95,7 +103,7 @@ This document shows the translation status of each locale file in the repository
-### ![ja__JP](https://img.shields.io/badge/ja__JP-97.89%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-97.63%25-yellow)
Missing keys in ja_JP.axaml @@ -111,6 +119,8 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts @@ -119,7 +129,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-89.30%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-89.06%25-yellow)
Missing keys in pt_BR.axaml @@ -198,6 +208,8 @@ This document shows the translation status of each locale file in the repository - Text.StashCM.SaveAsPatch - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.CommitToEdit - Text.WorkingCopy.ConfirmCommitWithFilter - Text.WorkingCopy.Conflicts.OpenExternalMergeTool @@ -208,7 +220,7 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.47%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-99.21%25-yellow)
Missing keys in ru_RU.axaml @@ -217,10 +229,12 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete
-### ![ta__IN](https://img.shields.io/badge/ta__IN-98.15%25-yellow) +### ![ta__IN](https://img.shields.io/badge/ta__IN-97.89%25-yellow)
Missing keys in ta_IN.axaml @@ -235,6 +249,8 @@ This document shows the translation status of each locale file in the repository - Text.UpdateSubmodules.Target - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete - Text.WorkingCopy.Conflicts.OpenExternalMergeTool - Text.WorkingCopy.Conflicts.OpenExternalMergeToolAllConflicts - Text.WorkingCopy.Conflicts.UseMine @@ -242,7 +258,7 @@ This document shows the translation status of each locale file in the repository
-### ![uk__UA](https://img.shields.io/badge/uk__UA-99.34%25-yellow) +### ![uk__UA](https://img.shields.io/badge/uk__UA-99.08%25-yellow)
Missing keys in uk_UA.axaml @@ -252,6 +268,8 @@ This document shows the translation status of each locale file in the repository - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear +- Text.ViewLogs.CopyLog +- Text.ViewLogs.Delete
From 104a3f0bbf762063cadb7d97119f0e50139243db Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 16:35:18 +0800 Subject: [PATCH 115/524] code_style: run `dotnet format` Signed-off-by: leo --- src/Commands/QueryLocalChanges.cs | 226 +++++++++++++++--------------- src/ViewModels/CommandLog.cs | 2 +- src/Views/TextDiffView.axaml.cs | 2 +- src/Views/ViewLogs.axaml.cs | 1 - 4 files changed, 115 insertions(+), 116 deletions(-) diff --git a/src/Commands/QueryLocalChanges.cs b/src/Commands/QueryLocalChanges.cs index e85e79c9..4e626a79 100644 --- a/src/Commands/QueryLocalChanges.cs +++ b/src/Commands/QueryLocalChanges.cs @@ -36,119 +36,119 @@ namespace SourceGit.Commands switch (status) { - case " M": - change.Set(Models.ChangeState.None, Models.ChangeState.Modified); - break; - case " T": - change.Set(Models.ChangeState.None, Models.ChangeState.TypeChanged); - break; - case " A": - change.Set(Models.ChangeState.None, Models.ChangeState.Added); - break; - case " D": - change.Set(Models.ChangeState.None, Models.ChangeState.Deleted); - break; - case " R": - change.Set(Models.ChangeState.None, Models.ChangeState.Renamed); - break; - case " C": - change.Set(Models.ChangeState.None, Models.ChangeState.Copied); - break; - case "M": - change.Set(Models.ChangeState.Modified); - break; - case "MM": - change.Set(Models.ChangeState.Modified, Models.ChangeState.Modified); - break; - case "MT": - change.Set(Models.ChangeState.Modified, Models.ChangeState.TypeChanged); - break; - case "MD": - change.Set(Models.ChangeState.Modified, Models.ChangeState.Deleted); - break; - case "T": - change.Set(Models.ChangeState.TypeChanged); - break; - case "TM": - change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Modified); - break; - case "TT": - change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.TypeChanged); - break; - case "TD": - change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Deleted); - break; - case "A": - change.Set(Models.ChangeState.Added); - break; - case "AM": - change.Set(Models.ChangeState.Added, Models.ChangeState.Modified); - break; - case "AT": - change.Set(Models.ChangeState.Added, Models.ChangeState.TypeChanged); - break; - case "AD": - change.Set(Models.ChangeState.Added, Models.ChangeState.Deleted); - break; - case "D": - change.Set(Models.ChangeState.Deleted); - break; - case "R": - change.Set(Models.ChangeState.Renamed); - break; - case "RM": - change.Set(Models.ChangeState.Renamed, Models.ChangeState.Modified); - break; - case "RT": - change.Set(Models.ChangeState.Renamed, Models.ChangeState.TypeChanged); - break; - case "RD": - change.Set(Models.ChangeState.Renamed, Models.ChangeState.Deleted); - break; - case "C": - change.Set(Models.ChangeState.Copied); - break; - case "CM": - change.Set(Models.ChangeState.Copied, Models.ChangeState.Modified); - break; - case "CT": - change.Set(Models.ChangeState.Copied, Models.ChangeState.TypeChanged); - break; - case "CD": - change.Set(Models.ChangeState.Copied, Models.ChangeState.Deleted); - break; - case "DR": - change.Set(Models.ChangeState.Deleted, Models.ChangeState.Renamed); - break; - case "DC": - change.Set(Models.ChangeState.Deleted, Models.ChangeState.Copied); - break; - case "DD": - change.Set(Models.ChangeState.Deleted, Models.ChangeState.Deleted); - break; - case "AU": - change.Set(Models.ChangeState.Added, Models.ChangeState.Unmerged); - break; - case "UD": - change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Deleted); - break; - case "UA": - change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Added); - break; - case "DU": - change.Set(Models.ChangeState.Deleted, Models.ChangeState.Unmerged); - break; - case "AA": - change.Set(Models.ChangeState.Added, Models.ChangeState.Added); - break; - case "UU": - change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Unmerged); - break; - case "??": - change.Set(Models.ChangeState.Untracked, Models.ChangeState.Untracked); - break; - default: - break; + case " M": + change.Set(Models.ChangeState.None, Models.ChangeState.Modified); + break; + case " T": + change.Set(Models.ChangeState.None, Models.ChangeState.TypeChanged); + break; + case " A": + change.Set(Models.ChangeState.None, Models.ChangeState.Added); + break; + case " D": + change.Set(Models.ChangeState.None, Models.ChangeState.Deleted); + break; + case " R": + change.Set(Models.ChangeState.None, Models.ChangeState.Renamed); + break; + case " C": + change.Set(Models.ChangeState.None, Models.ChangeState.Copied); + break; + case "M": + change.Set(Models.ChangeState.Modified); + break; + case "MM": + change.Set(Models.ChangeState.Modified, Models.ChangeState.Modified); + break; + case "MT": + change.Set(Models.ChangeState.Modified, Models.ChangeState.TypeChanged); + break; + case "MD": + change.Set(Models.ChangeState.Modified, Models.ChangeState.Deleted); + break; + case "T": + change.Set(Models.ChangeState.TypeChanged); + break; + case "TM": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Modified); + break; + case "TT": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.TypeChanged); + break; + case "TD": + change.Set(Models.ChangeState.TypeChanged, Models.ChangeState.Deleted); + break; + case "A": + change.Set(Models.ChangeState.Added); + break; + case "AM": + change.Set(Models.ChangeState.Added, Models.ChangeState.Modified); + break; + case "AT": + change.Set(Models.ChangeState.Added, Models.ChangeState.TypeChanged); + break; + case "AD": + change.Set(Models.ChangeState.Added, Models.ChangeState.Deleted); + break; + case "D": + change.Set(Models.ChangeState.Deleted); + break; + case "R": + change.Set(Models.ChangeState.Renamed); + break; + case "RM": + change.Set(Models.ChangeState.Renamed, Models.ChangeState.Modified); + break; + case "RT": + change.Set(Models.ChangeState.Renamed, Models.ChangeState.TypeChanged); + break; + case "RD": + change.Set(Models.ChangeState.Renamed, Models.ChangeState.Deleted); + break; + case "C": + change.Set(Models.ChangeState.Copied); + break; + case "CM": + change.Set(Models.ChangeState.Copied, Models.ChangeState.Modified); + break; + case "CT": + change.Set(Models.ChangeState.Copied, Models.ChangeState.TypeChanged); + break; + case "CD": + change.Set(Models.ChangeState.Copied, Models.ChangeState.Deleted); + break; + case "DR": + change.Set(Models.ChangeState.Deleted, Models.ChangeState.Renamed); + break; + case "DC": + change.Set(Models.ChangeState.Deleted, Models.ChangeState.Copied); + break; + case "DD": + change.Set(Models.ChangeState.Deleted, Models.ChangeState.Deleted); + break; + case "AU": + change.Set(Models.ChangeState.Added, Models.ChangeState.Unmerged); + break; + case "UD": + change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Deleted); + break; + case "UA": + change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Added); + break; + case "DU": + change.Set(Models.ChangeState.Deleted, Models.ChangeState.Unmerged); + break; + case "AA": + change.Set(Models.ChangeState.Added, Models.ChangeState.Added); + break; + case "UU": + change.Set(Models.ChangeState.Unmerged, Models.ChangeState.Unmerged); + break; + case "??": + change.Set(Models.ChangeState.Untracked, Models.ChangeState.Untracked); + break; + default: + break; } if (change.Index != Models.ChangeState.None || change.WorkTree != Models.ChangeState.None) diff --git a/src/ViewModels/CommandLog.cs b/src/ViewModels/CommandLog.cs index e10aa724..a677d0be 100644 --- a/src/ViewModels/CommandLog.cs +++ b/src/ViewModels/CommandLog.cs @@ -82,6 +82,6 @@ namespace SourceGit.ViewModels private string _content = string.Empty; private StringBuilder _builder = new StringBuilder(); - private event Action _onNewLineReceived; + private event Action _onNewLineReceived; } } diff --git a/src/Views/TextDiffView.axaml.cs b/src/Views/TextDiffView.axaml.cs index 722d6912..ad2f8cea 100644 --- a/src/Views/TextDiffView.axaml.cs +++ b/src/Views/TextDiffView.axaml.cs @@ -1261,7 +1261,7 @@ namespace SourceGit.Views if (line.NoNewLineEndOfFile) builder.Append("\u26D4"); - + builder.Append('\n'); } diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs index 62bf288d..107341ab 100644 --- a/src/Views/ViewLogs.axaml.cs +++ b/src/Views/ViewLogs.axaml.cs @@ -1,5 +1,4 @@ using System; -using System.ComponentModel; using Avalonia; using Avalonia.Controls; From 3358ff9aee18918c67cdbf3fb7055ccb43b9fd35 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 17:24:56 +0800 Subject: [PATCH 116/524] enhance: disable hyper link and email link in git command logs Signed-off-by: leo --- src/Views/ViewLogs.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs index 107341ab..dcfc3dc9 100644 --- a/src/Views/ViewLogs.axaml.cs +++ b/src/Views/ViewLogs.axaml.cs @@ -34,8 +34,8 @@ namespace SourceGit.Views VerticalScrollBarVisibility = ScrollBarVisibility.Auto; TextArea.TextView.Margin = new Thickness(4, 0); - TextArea.TextView.Options.EnableHyperlinks = true; - TextArea.TextView.Options.EnableEmailHyperlinks = true; + TextArea.TextView.Options.EnableHyperlinks = false; + TextArea.TextView.Options.EnableEmailHyperlinks = false; } protected override void OnLoaded(RoutedEventArgs e) From 231010abc666c1d3e0bb2cc36e0da4cf207b633d Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 17:45:49 +0800 Subject: [PATCH 117/524] ux: custom style for command line in git command log Signed-off-by: leo --- src/Views/ViewLogs.axaml.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs index dcfc3dc9..8a3426d2 100644 --- a/src/Views/ViewLogs.axaml.cs +++ b/src/Views/ViewLogs.axaml.cs @@ -4,16 +4,39 @@ using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Interactivity; +using Avalonia.Media; using AvaloniaEdit; using AvaloniaEdit.Document; using AvaloniaEdit.Editing; +using AvaloniaEdit.Rendering; using AvaloniaEdit.TextMate; namespace SourceGit.Views { public class LogContentPresenter : TextEditor { + public class LineStyleTransformer : DocumentColorizingTransformer + { + protected override void ColorizeLine(DocumentLine line) + { + var content = CurrentContext.Document.GetText(line); + if (content.StartsWith("$ git ", StringComparison.Ordinal)) + { + ChangeLinePart(line.Offset, line.Offset + 1, v => + { + v.TextRunProperties.SetForegroundBrush(Brushes.Orange); + }); + + ChangeLinePart(line.Offset + 2, line.EndOffset, v => + { + var old = v.TextRunProperties.Typeface; + v.TextRunProperties.SetTypeface(new Typeface(old.FontFamily, old.Style, FontWeight.Bold)); + }); + } + } + } + public static readonly StyledProperty LogProperty = AvaloniaProperty.Register(nameof(Log)); @@ -46,6 +69,7 @@ namespace SourceGit.Views { _textMate = Models.TextMateHelper.CreateForEditor(this); Models.TextMateHelper.SetGrammarByFileName(_textMate, "Log.log"); + TextArea.TextView.LineTransformers.Add(new LineStyleTransformer()); } } From 090b64d68dcfdc19d1b05366f9b9b96e6027dc1e Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 18:21:55 +0800 Subject: [PATCH 118/524] refactor: notification popup uses the same text presenter with git command log viewer (#1149) Signed-off-by: leo --- src/Views/CommandLogContentPresenter.cs | 152 ++++++++++++++++++++++++ src/Views/LauncherPage.axaml | 8 +- src/Views/ViewLogs.axaml | 4 +- src/Views/ViewLogs.axaml.cs | 111 ----------------- 4 files changed, 159 insertions(+), 116 deletions(-) create mode 100644 src/Views/CommandLogContentPresenter.cs diff --git a/src/Views/CommandLogContentPresenter.cs b/src/Views/CommandLogContentPresenter.cs new file mode 100644 index 00000000..a2499f8d --- /dev/null +++ b/src/Views/CommandLogContentPresenter.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; + +using Avalonia; +using Avalonia.Controls.Primitives; +using Avalonia.Interactivity; +using Avalonia.Media; + +using AvaloniaEdit; +using AvaloniaEdit.Document; +using AvaloniaEdit.Editing; +using AvaloniaEdit.Rendering; +using AvaloniaEdit.TextMate; + +namespace SourceGit.Views +{ + public class CommandLogContentPresenter : TextEditor + { + public class LineStyleTransformer : DocumentColorizingTransformer + { + protected override void ColorizeLine(DocumentLine line) + { + var content = CurrentContext.Document.GetText(line); + if (content.StartsWith("$ git ", StringComparison.Ordinal)) + { + ChangeLinePart(line.Offset, line.Offset + 1, v => + { + v.TextRunProperties.SetForegroundBrush(Brushes.Orange); + }); + + ChangeLinePart(line.Offset + 2, line.EndOffset, v => + { + var old = v.TextRunProperties.Typeface; + v.TextRunProperties.SetTypeface(new Typeface(old.FontFamily, old.Style, FontWeight.Bold)); + }); + } + else if (content.StartsWith("remote: ", StringComparison.Ordinal)) + { + ChangeLinePart(line.Offset, line.Offset + 7, v => + { + v.TextRunProperties.SetForegroundBrush(Brushes.SeaGreen); + }); + } + else + { + foreach (var err in _errors) + { + var idx = content.IndexOf(err, StringComparison.Ordinal); + if (idx >= 0) + { + ChangeLinePart(line.Offset + idx, line.Offset + err.Length + 1, v => + { + v.TextRunProperties.SetForegroundBrush(Brushes.Red); + }); + } + } + } + } + + private readonly List _errors = ["! [rejected]", "! [remote rejected]"]; + } + + public static readonly StyledProperty LogProperty = + AvaloniaProperty.Register(nameof(Log)); + + public ViewModels.CommandLog Log + { + get => GetValue(LogProperty); + set => SetValue(LogProperty, value); + } + + public static readonly StyledProperty PureTextProperty = + AvaloniaProperty.Register(nameof(PureText)); + + public string PureText + { + get => GetValue(PureTextProperty); + set => SetValue(PureTextProperty, value); + } + + protected override Type StyleKeyOverride => typeof(TextEditor); + + public CommandLogContentPresenter() : base(new TextArea(), new TextDocument()) + { + IsReadOnly = true; + ShowLineNumbers = false; + WordWrap = false; + HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; + VerticalScrollBarVisibility = ScrollBarVisibility.Auto; + + TextArea.TextView.Margin = new Thickness(4, 0); + TextArea.TextView.Options.EnableHyperlinks = false; + TextArea.TextView.Options.EnableEmailHyperlinks = false; + } + + protected override void OnLoaded(RoutedEventArgs e) + { + base.OnLoaded(e); + + if (_textMate == null) + { + _textMate = Models.TextMateHelper.CreateForEditor(this); + Models.TextMateHelper.SetGrammarByFileName(_textMate, "Log.log"); + TextArea.TextView.LineTransformers.Add(new LineStyleTransformer()); + } + } + + protected override void OnUnloaded(RoutedEventArgs e) + { + base.OnUnloaded(e); + + if (_textMate != null) + { + _textMate.Dispose(); + _textMate = null; + } + + GC.Collect(); + } + + protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) + { + base.OnPropertyChanged(change); + + if (change.Property == LogProperty) + { + if (change.NewValue is ViewModels.CommandLog log) + { + Text = log.Content; + log.Register(OnLogLineReceived); + } + else + { + Text = string.Empty; + } + } + else if (change.Property == PureTextProperty) + { + if (!string.IsNullOrEmpty(PureText)) + Text = PureText; + } + } + + private void OnLogLineReceived(string newline) + { + AppendText("\n"); + AppendText(newline); + } + + private TextMate.Installation _textMate = null; + } +} diff --git a/src/Views/LauncherPage.axaml b/src/Views/LauncherPage.axaml index 7ce450de..46fb97f6 100644 --- a/src/Views/LauncherPage.axaml +++ b/src/Views/LauncherPage.axaml @@ -141,9 +141,11 @@ - - - + diff --git a/src/Views/ViewLogs.axaml b/src/Views/ViewLogs.axaml index 9c1ae435..c4aa46f7 100644 --- a/src/Views/ViewLogs.axaml +++ b/src/Views/ViewLogs.axaml @@ -100,8 +100,8 @@ BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="1" Background="{DynamicResource Brush.Contents}"> - + diff --git a/src/Views/ViewLogs.axaml.cs b/src/Views/ViewLogs.axaml.cs index 8a3426d2..f0a27884 100644 --- a/src/Views/ViewLogs.axaml.cs +++ b/src/Views/ViewLogs.axaml.cs @@ -1,118 +1,7 @@ -using System; - -using Avalonia; using Avalonia.Controls; -using Avalonia.Controls.Primitives; -using Avalonia.Interactivity; -using Avalonia.Media; - -using AvaloniaEdit; -using AvaloniaEdit.Document; -using AvaloniaEdit.Editing; -using AvaloniaEdit.Rendering; -using AvaloniaEdit.TextMate; namespace SourceGit.Views { - public class LogContentPresenter : TextEditor - { - public class LineStyleTransformer : DocumentColorizingTransformer - { - protected override void ColorizeLine(DocumentLine line) - { - var content = CurrentContext.Document.GetText(line); - if (content.StartsWith("$ git ", StringComparison.Ordinal)) - { - ChangeLinePart(line.Offset, line.Offset + 1, v => - { - v.TextRunProperties.SetForegroundBrush(Brushes.Orange); - }); - - ChangeLinePart(line.Offset + 2, line.EndOffset, v => - { - var old = v.TextRunProperties.Typeface; - v.TextRunProperties.SetTypeface(new Typeface(old.FontFamily, old.Style, FontWeight.Bold)); - }); - } - } - } - - public static readonly StyledProperty LogProperty = - AvaloniaProperty.Register(nameof(Log)); - - public ViewModels.CommandLog Log - { - get => GetValue(LogProperty); - set => SetValue(LogProperty, value); - } - - protected override Type StyleKeyOverride => typeof(TextEditor); - - public LogContentPresenter() : base(new TextArea(), new TextDocument()) - { - IsReadOnly = true; - ShowLineNumbers = false; - WordWrap = false; - HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; - VerticalScrollBarVisibility = ScrollBarVisibility.Auto; - - TextArea.TextView.Margin = new Thickness(4, 0); - TextArea.TextView.Options.EnableHyperlinks = false; - TextArea.TextView.Options.EnableEmailHyperlinks = false; - } - - protected override void OnLoaded(RoutedEventArgs e) - { - base.OnLoaded(e); - - if (_textMate == null) - { - _textMate = Models.TextMateHelper.CreateForEditor(this); - Models.TextMateHelper.SetGrammarByFileName(_textMate, "Log.log"); - TextArea.TextView.LineTransformers.Add(new LineStyleTransformer()); - } - } - - protected override void OnUnloaded(RoutedEventArgs e) - { - base.OnUnloaded(e); - - if (_textMate != null) - { - _textMate.Dispose(); - _textMate = null; - } - - GC.Collect(); - } - - protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) - { - base.OnPropertyChanged(change); - - if (change.Property == LogProperty) - { - if (change.NewValue is ViewModels.CommandLog log) - { - Text = log.Content; - log.Register(OnLogLineReceived); - } - else - { - Text = string.Empty; - } - } - } - - private void OnLogLineReceived(string newline) - { - AppendText("\n"); - AppendText(newline); - } - - private TextMate.Installation _textMate = null; - } - public partial class ViewLogs : ChromelessWindow { public ViewLogs() From 4c1a04477e69c2dfa146cc0fd32db822632c6461 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 20:03:46 +0800 Subject: [PATCH 119/524] refactor: enhanced copy commit information context menu (#1209) Signed-off-by: leo --- src/Resources/Icons.axaml | 3 ++ src/Resources/Locales/de_DE.axaml | 4 +-- src/Resources/Locales/en_US.axaml | 7 ++-- src/Resources/Locales/es_ES.axaml | 4 +-- src/Resources/Locales/fr_FR.axaml | 4 +-- src/Resources/Locales/it_IT.axaml | 4 +-- src/Resources/Locales/ja_JP.axaml | 4 +-- src/Resources/Locales/pt_BR.axaml | 4 +-- src/Resources/Locales/ru_RU.axaml | 4 +-- src/Resources/Locales/ta_IN.axaml | 4 +-- src/Resources/Locales/uk_UA.axaml | 4 +-- src/Resources/Locales/zh_CN.axaml | 7 ++-- src/Resources/Locales/zh_TW.axaml | 7 ++-- src/ViewModels/Histories.cs | 56 ++++++++++++++++++++++++++----- 14 files changed, 84 insertions(+), 32 deletions(-) diff --git a/src/Resources/Icons.axaml b/src/Resources/Icons.axaml index a966d47d..51e3d8bf 100644 --- a/src/Resources/Icons.axaml +++ b/src/Resources/Icons.axaml @@ -46,6 +46,7 @@ M416 832H128V128h384v192C512 355 541 384 576 384L768 384v32c0 19 13 32 32 32S832 435 832 416v-64c0-6 0-19-6-25l-256-256c-6-6-19-6-25-6H128A64 64 0 0064 128v704C64 867 93 896 129 896h288c19 0 32-13 32-32S435 832 416 832zM576 172 722 320H576V172zM736 512C614 512 512 614 512 736S614 960 736 960s224-102 224-224S858 512 736 512zM576 736C576 646 646 576 736 576c32 0 58 6 83 26l-218 218c-19-26-26-51-26-83zm160 160c-32 0-64-13-96-32l224-224c19 26 32 58 32 96 0 90-70 160-160 160z M896 320c0-19-6-32-19-45l-192-192c-13-13-26-19-45-19H192c-38 0-64 26-64 64v768c0 38 26 64 64 64h640c38 0 64-26 64-64V320zm-256 384H384c-19 0-32-13-32-32s13-32 32-32h256c19 0 32 13 32 32s-13 32-32 32zm166-384H640V128l192 192h-26z M599 425 599 657 425 832 425 425 192 192 832 192Z + M505 74c-145 3-239 68-239 68-12 8-15 25-7 37 9 13 25 15 38 6 0 0 184-136 448 2 12 7 29 3 36-10 8-13 3-29-12-37-71-38-139-56-199-63-23-3-44-3-65-3m17 111c-254-3-376 201-376 201-8 12-5 29 7 37 12 8 29 4 39-10 0 0 103-178 329-175 226 3 325 173 325 173 8 12 24 17 37 9 14-8 17-24 9-37 0 0-117-195-370-199m-31 106c-72 5-140 31-192 74C197 449 132 603 204 811c5 14 20 21 34 17 14-5 21-20 16-34-66-191-7-316 79-388 84-69 233-85 343-17 54 34 96 93 118 151 22 58 20 114 3 141-18 28-54 38-86 30-32-8-58-31-59-80-1-73-58-118-118-125-57-7-123 24-140 92-32 125 49 302 238 361 14 4 29-3 34-17 4-14-3-29-18-34-163-51-225-206-202-297 10-41 46-55 84-52 37 4 69 26 69 73 2 70 48 117 100 131 52 13 112-3 144-52 33-50 28-120 3-188-26-68-73-136-140-178a356 356 0 00-213-52m15 104v0c-76 3-152 42-195 125-56 106-31 215 7 293 38 79 90 131 90 131 10 11 27 11 38 0s11-26 0-38c0 0-46-47-79-116s-54-157-8-244c48-90 133-111 208-90 76 22 140 88 138 186-2 15 9 28 24 29 15 1 27-10 29-27 3-122-79-210-176-239a246 246 0 00-75-9m9 213c-15 0-26 13-26 27 0 0 1 63 36 124 36 61 112 119 244 107 15-1 26-13 25-28-1-15-14-26-30-25-116 11-165-33-193-81-28-47-29-98-29-98a27 27 0 00-27-27z m211 611a142 142 0 00-90-4v-190a142 142 0 0090-4v198zm0 262v150h-90v-146a142 142 0 0090-4zm0-723a142 142 0 00-90-4v-146h90zm-51 246a115 115 0 11115-115 115 115 0 01-115 115zm0 461a115 115 0 11115-115 115 115 0 01-115 115zm256-691h563v90h-563zm0 461h563v90h-563zm0-282h422v90h-422zm0 474h422v90h-422z M853 267H514c-4 0-6-2-9-4l-38-66c-13-21-38-36-64-36H171c-41 0-75 34-75 75v555c0 41 34 75 75 75h683c41 0 75-34 75-75V341c0-41-34-75-75-75zm-683-43h233c4 0 6 2 9 4l38 66c13 21 38 36 64 36H853c6 0 11 4 11 11v75h-704V235c0-6 4-11 11-11zm683 576H171c-6 0-11-4-11-11V480h704V789c0 6-4 11-11 11z M1088 227H609L453 78a11 11 0 00-7-3H107a43 43 0 00-43 43v789a43 43 0 0043 43h981a43 43 0 0043-43V270a43 43 0 00-43-43zM757 599c0 5-5 9-10 9h-113v113c0 5-4 9-9 9h-56c-5 0-9-4-9-9V608h-113c-5 0-10-4-10-9V543c0-5 5-9 10-9h113V420c0-5 4-9 9-9h56c5 0 9 4 9 9V533h113c5 0 10 4 10 9v56z @@ -116,6 +117,7 @@ M558 545 790 403c24-15 31-47 16-71-15-24-46-31-70-17L507 457 277 315c-24-15-56-7-71 17-15 24-7 56 17 71l232 143V819c0 28 23 51 51 51 28 0 51-23 51-51V545h0zM507 0l443 256v512L507 1024 63 768v-512L507 0z M770 320a41 41 0 00-56-14l-252 153L207 306a41 41 0 10-43 70l255 153 2 296a41 41 0 0082 0l-2-295 255-155a41 41 0 0014-56zM481 935a42 42 0 01-42 0L105 741a42 42 0 01-21-36v-386a42 42 0 0121-36L439 89a42 42 0 0142 0l335 193a42 42 0 0121 36v87h84v-87a126 126 0 00-63-109L523 17a126 126 0 00-126 0L63 210a126 126 0 00-63 109v386a126 126 0 0063 109l335 193a126 126 0 00126 0l94-54-42-72zM1029 700h-126v-125a42 42 0 00-84 0v126h-126a42 42 0 000 84h126v126a42 42 0 1084 0v-126h126a42 42 0 000-84z M416 587c21 0 37 17 37 37v299A37 37 0 01416 960h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299zm448 0c21 0 37 17 37 37v299A37 37 0 01864 960h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299zM758 91l183 189a37 37 0 010 52l-182 188a37 37 0 01-53 1l-183-189a37 37 0 010-52l182-188a37 37 0 0153-1zM416 139c21 0 37 17 37 37v299A37 37 0 01416 512h-299a37 37 0 01-37-37v-299c0-21 17-37 37-37h299z + M653 435l-26 119H725c9 0 13 4 13 13v47c0 9-4 13-13 13h-107l-21 115c0 9-4 13-13 13h-47c-9 0-13-4-13-13l21-111H427l-21 115c0 9-4 13-13 13H346c-9 0-13-4-13-13l21-107h-85c-4-9-9-21-13-34v-38c0-9 4-13 13-13h98l26-119H294c-9 0-13-4-13-13V375c0-9 4-13 13-13h115l13-81c0-9 4-13 13-13h43c9 0 13 4 13 13L469 363h119l13-81c0-9 4-13 13-13h47c9 0 13 4 13 13l-13 77h85c9 0 13 4 13 13v47c0 9-4 13-13 13h-98v4zM512 0C230 0 0 230 0 512c0 145 60 282 166 375L90 1024H512c282 0 512-230 512-512S794 0 512 0zm-73 559h124l26-119h-128l-21 119z M875 128h-725A107 107 0 0043 235v555A107 107 0 00149 896h725a107 107 0 00107-107v-555A107 107 0 00875 128zm-115 640h-183v-58l25-3c15 0 19-8 14-24l-22-61H419l-28 82 39 2V768h-166v-58l18-3c18-2 22-11 26-24l125-363-40-4V256h168l160 448 39 3zM506 340l-72 218h145l-71-218h-2z M177 156c-22 5-33 17-36 37c-10 57-33 258-13 278l445 445c23 23 61 23 84 0l246-246c23-23 23-61 0-84l-445-445C437 120 231 145 177 156zM331 344c-26 26-69 26-95 0c-26-26-26-69 0-95s69-26 95 0C357 276 357 318 331 344z M683 537h-144v-142h-142V283H239a44 44 0 00-41 41v171a56 56 0 0014 34l321 321a41 41 0 0058 0l174-174a41 41 0 000-58zm-341-109a41 41 0 110-58a41 41 0 010 58zM649 284V142h-69v142h-142v68h142v142h69v-142h142v-68h-142z @@ -130,6 +132,7 @@ M762 1024C876 818 895 504 448 514V768L64 384l384-384v248c535-14 595 472 314 776z M832 464H332V240c0-31 25-56 56-56h248c31 0 56 25 56 56v68c0 4 4 8 8 8h56c4 0 8-4 8-8v-68c0-71-57-128-128-128H388c-71 0-128 57-128 128v224h-68c-18 0-32 14-32 32v384c0 18 14 32 32 32h640c18 0 32-14 32-32V496c0-18-14-32-32-32zM540 701v53c0 4-4 8-8 8h-40c-4 0-8-4-8-8v-53c-12-9-20-23-20-39 0-27 22-48 48-48s48 22 48 48c0 16-8 30-20 39z M170 831l343-342L855 831l105-105-448-448L64 726 170 831z + M667 607c-3-2-7-14-0-38 73-77 118-187 118-290C784 115 668 0 508 0 348 0 236 114 236 278c0 104 45 215 119 292 7 24-2 33-8 35C274 631 0 725 0 854L0 1024l1024 0 0-192C989 714 730 627 667 607L667 607z M880 128A722 722 0 01555 13a77 77 0 00-85 0 719 719 0 01-325 115c-40 4-71 38-71 80v369c0 246 329 446 439 446 110 0 439-200 439-446V207c0-41-31-76-71-80zM465 692a36 36 0 01-53 0L305 579a42 42 0 010-57 36 36 0 0153 0l80 85L678 353a36 36 0 0153 0 42 42 0 01-0 57L465 692z M812 864h-29V654c0-21-11-40-28-52l-133-88 134-89c18-12 28-31 28-52V164h28c18 0 32-14 32-32s-14-32-32-32H212c-18 0-32 14-32 32s14 32 32 32h30v210c0 21 11 40 28 52l133 88-134 89c-18 12-28 31-28 52V864H212c-18 0-32 14-32 32s14 32 32 32h600c18 0 32-14 32-32s-14-32-32-32zM441 566c18-12 28-31 28-52s-11-40-28-52L306 373V164h414v209l-136 90c-18 12-28 31-28 52 0 21 11 40 28 52l135 89V695c-9-7-20-13-32-19-30-15-93-41-176-41-63 0-125 14-175 38-12 6-22 12-31 18v-36l136-90z M0 512M1024 512M512 0M512 1024M762 412v100h-500v-100h-150v200h800v-200h-150z diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 3cb70cea..7a3da294 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -102,8 +102,8 @@ Mehrere cherry-picken Mit HEAD vergleichen Mit Worktree vergleichen - Info kopieren - SHA kopieren + Information + SHA Benutzerdefinierte Aktion Interactives Rebase von ${0}$ auf diesen Commit Merge in ${0}$ hinein diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index bd4cfc56..20a70f22 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -99,8 +99,11 @@ Cherry-Pick ... Compare with HEAD Compare with Worktree - Copy Info - Copy SHA + Author + Committer + Information + SHA + Subject Custom Action Interactively Rebase ${0}$ on Here Merge to ${0}$ diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index e316a470..204cfc1a 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -103,8 +103,8 @@ Cherry-Pick ... Comparar con HEAD Comparar con Worktree - Copiar Información - Copiar SHA + Información + SHA Acción personalizada Rebase Interactivo ${0}$ hasta Aquí Merge a ${0}$ diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index fd41b4f0..f45a83d9 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -103,8 +103,8 @@ Cherry-Pick ... Comparer avec HEAD Comparer avec le worktree - Copier les informations - Copier le SHA + Informations + SHA Action personnalisée Rebase interactif de ${0}$ ici Fusionner dans ${0}$ diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 4498348d..b7d2568a 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -103,8 +103,8 @@ Cherry-Pick... Confronta con HEAD Confronta con Worktree - Copia Info - Copia SHA + Informazioni + SHA Azione Personalizzata Riallinea Interattivamente ${0}$ fino a Qui Unisci a ${0}$ diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml index 4b785c3d..c50504e1 100644 --- a/src/Resources/Locales/ja_JP.axaml +++ b/src/Resources/Locales/ja_JP.axaml @@ -103,8 +103,8 @@ チェリーピック... HEADと比較 ワークツリーと比較 - 情報をコピー - SHAをコピー + 情報 + SHA カスタムアクション ${0}$ ブランチをここにインタラクティブリベース ${0}$ にマージ diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 299ececd..a4e9d883 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -93,8 +93,8 @@ Cherry-Pick ... Comparar com HEAD Comparar com Worktree - Copiar Informações - Copiar SHA + Informações + SHA Ação customizada Rebase Interativo ${0}$ até Aqui Rebase ${0}$ até Aqui diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index c3e8b87a..b8c86415 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -103,8 +103,8 @@ Применить несколько ревизий ... Сравнить c ГОЛОВОЙ (HEAD) Сравнить с рабочим каталогом - Копировать информацию - Копировать SHA + Информацию + SHA Пользовательское действие Интерактивное перемещение (rebase -i) ${0}$ сюда Влить в ${0}$ diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml index c62dd2b5..b4e4d939 100644 --- a/src/Resources/Locales/ta_IN.axaml +++ b/src/Resources/Locales/ta_IN.axaml @@ -103,8 +103,8 @@ கனி-பறி ... தலையுடன் ஒப்பிடுக பணிமரத்துடன் ஒப்பிடுக - தகவலை நகலெடு - பாகொவ-வை நகலெடு + தகவலை + பாகொவ-வை தனிப்பயன் செயல் இங்கே ${0}$ ஐ ஊடாடும் வகையில் மறுதளம் ${0}$ இதற்கு ஒன்றிணை diff --git a/src/Resources/Locales/uk_UA.axaml b/src/Resources/Locales/uk_UA.axaml index 828c36f8..a3b63bde 100644 --- a/src/Resources/Locales/uk_UA.axaml +++ b/src/Resources/Locales/uk_UA.axaml @@ -103,8 +103,8 @@ Cherry-pick ... Порівняти з HEAD Порівняти з робочим деревом - Копіювати інформацію - Копіювати SHA + Iнформацію + SHA Спеціальна дія Інтерактивно перебазувати ${0}$ сюди Злиття в ${0}$ diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 7546b3c4..3d41bccd 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -103,8 +103,11 @@ 挑选(cherry-pick)... 与当前HEAD比较 与本地工作树比较 - 复制简要信息 - 复制提交指纹 + 作者 + 提交者 + 简要信息 + 提交指纹 + 主题 自定义操作 交互式变基(rebase -i) ${0}$ 到此处 合并(merge)此提交至 ${0}$ diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 61921ea4..3a10f6ca 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -103,8 +103,11 @@ 揀選 (cherry-pick)... 與目前 HEAD 比較 與本機工作區比較 - 複製摘要資訊 - 複製提交編號 + 作者 + 提交者 + 摘要資訊 + 提交編號 + 標題 自訂動作 互動式重定基底 (rebase -i) ${0}$ 到此處 合併 (merge) 此提交到 ${0}$ diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index b3216a91..ee5e5891 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -330,7 +330,7 @@ namespace SourceGit.ViewModels var copyMultipleSHAs = new MenuItem(); copyMultipleSHAs.Header = App.Text("CommitCM.CopySHA"); - copyMultipleSHAs.Icon = App.CreateMenuIcon("Icons.Copy"); + copyMultipleSHAs.Icon = App.CreateMenuIcon("Icons.Fingerprint"); copyMultipleSHAs.Click += (_, e) => { var builder = new StringBuilder(); @@ -340,11 +340,10 @@ namespace SourceGit.ViewModels App.CopyText(builder.ToString()); e.Handled = true; }; - multipleMenu.Items.Add(copyMultipleSHAs); var copyMultipleInfo = new MenuItem(); copyMultipleInfo.Header = App.Text("CommitCM.CopyInfo"); - copyMultipleInfo.Icon = App.CreateMenuIcon("Icons.Copy"); + copyMultipleInfo.Icon = App.CreateMenuIcon("Icons.Info"); copyMultipleInfo.Click += (_, e) => { var builder = new StringBuilder(); @@ -354,7 +353,13 @@ namespace SourceGit.ViewModels App.CopyText(builder.ToString()); e.Handled = true; }; - multipleMenu.Items.Add(copyMultipleInfo); + + var copyMultiple = new MenuItem(); + copyMultiple.Header = App.Text("Copy"); + copyMultiple.Icon = App.CreateMenuIcon("Icons.Copy"); + copyMultiple.Items.Add(copyMultipleSHAs); + copyMultiple.Items.Add(copyMultipleInfo); + multipleMenu.Items.Add(copyMultiple); return multipleMenu; } @@ -715,23 +720,58 @@ namespace SourceGit.ViewModels var copySHA = new MenuItem(); copySHA.Header = App.Text("CommitCM.CopySHA"); - copySHA.Icon = App.CreateMenuIcon("Icons.Copy"); + copySHA.Icon = App.CreateMenuIcon("Icons.Fingerprint"); copySHA.Click += (_, e) => { App.CopyText(commit.SHA); e.Handled = true; }; - menu.Items.Add(copySHA); + + var copySubject = new MenuItem(); + copySubject.Header = App.Text("CommitCM.CopySubject"); + copySubject.Icon = App.CreateMenuIcon("Icons.Subject"); + copySubject.Click += (_, e) => + { + App.CopyText(commit.Subject); + e.Handled = true; + }; var copyInfo = new MenuItem(); copyInfo.Header = App.Text("CommitCM.CopyInfo"); - copyInfo.Icon = App.CreateMenuIcon("Icons.Copy"); + copyInfo.Icon = App.CreateMenuIcon("Icons.Info"); copyInfo.Click += (_, e) => { App.CopyText($"{commit.SHA.Substring(0, 10)} - {commit.Subject}"); e.Handled = true; }; - menu.Items.Add(copyInfo); + + var copyAuthor = new MenuItem(); + copyAuthor.Header = App.Text("CommitCM.CopyAuthor"); + copyAuthor.Icon = App.CreateMenuIcon("Icons.User"); + copyAuthor.Click += (_, e) => + { + App.CopyText(commit.Author.ToString()); + e.Handled = true; + }; + + var copyCommitter = new MenuItem(); + copyCommitter.Header = App.Text("CommitCM.CopyCommitter"); + copyCommitter.Icon = App.CreateMenuIcon("Icons.User"); + copyCommitter.Click += (_, e) => + { + App.CopyText(commit.Committer.ToString()); + e.Handled = true; + }; + + var copy = new MenuItem(); + copy.Header = App.Text("Copy"); + copy.Icon = App.CreateMenuIcon("Icons.Copy"); + copy.Items.Add(copySHA); + copy.Items.Add(copySubject); + copy.Items.Add(copyInfo); + copy.Items.Add(copyAuthor); + copy.Items.Add(copyCommitter); + menu.Items.Add(copy); return menu; } From 5bd7dd428dc0df2616f8a7a8cf21af8c9d65981a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 17 Apr 2025 12:04:02 +0000 Subject: [PATCH 120/524] doc: Update translation status and sort locale files --- TRANSLATION.md | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/TRANSLATION.md b/TRANSLATION.md index 4f13d26a..866aac65 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -6,12 +6,15 @@ This document shows the translation status of each locale file in the repository ### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen) -### ![de__DE](https://img.shields.io/badge/de__DE-96.57%25-yellow) +### ![de__DE](https://img.shields.io/badge/de__DE-96.19%25-yellow)
Missing keys in de_DE.axaml - Text.BranchUpstreamInvalid +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Configure.CustomAction.WaitForExit - Text.Configure.Git.PreferredMergeMode @@ -40,11 +43,14 @@ This document shows the translation status of each locale file in the repository
-### ![es__ES](https://img.shields.io/badge/es__ES-99.34%25-yellow) +### ![es__ES](https://img.shields.io/badge/es__ES-98.95%25-yellow)
Missing keys in es_ES.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.Repository.ViewLogs - Text.ViewLogs - Text.ViewLogs.Clear @@ -53,11 +59,14 @@ This document shows the translation status of each locale file in the repository
-### ![fr__FR](https://img.shields.io/badge/fr__FR-97.89%25-yellow) +### ![fr__FR](https://img.shields.io/badge/fr__FR-97.51%25-yellow)
Missing keys in fr_FR.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Configure.Git.PreferredMergeMode - Text.ConfirmEmptyCommit.Continue @@ -77,11 +86,14 @@ This document shows the translation status of each locale file in the repository
-### ![it__IT](https://img.shields.io/badge/it__IT-97.63%25-yellow) +### ![it__IT](https://img.shields.io/badge/it__IT-97.24%25-yellow)
Missing keys in it_IT.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Configure.Git.PreferredMergeMode - Text.ConfirmEmptyCommit.Continue @@ -103,11 +115,14 @@ This document shows the translation status of each locale file in the repository
-### ![ja__JP](https://img.shields.io/badge/ja__JP-97.63%25-yellow) +### ![ja__JP](https://img.shields.io/badge/ja__JP-97.24%25-yellow)
Missing keys in ja_JP.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Configure.Git.PreferredMergeMode - Text.ConfirmEmptyCommit.Continue @@ -129,7 +144,7 @@ This document shows the translation status of each locale file in the repository
-### ![pt__BR](https://img.shields.io/badge/pt__BR-89.06%25-yellow) +### ![pt__BR](https://img.shields.io/badge/pt__BR-88.71%25-yellow)
Missing keys in pt_BR.axaml @@ -144,6 +159,9 @@ This document shows the translation status of each locale file in the repository - Text.BranchCM.MergeMultiBranches - Text.BranchUpstreamInvalid - Text.Clone.RecurseSubmodules +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitCM.Merge - Text.CommitCM.MergeMultiple - Text.CommitDetail.Files.Search @@ -220,11 +238,14 @@ This document shows the translation status of each locale file in the repository
-### ![ru__RU](https://img.shields.io/badge/ru__RU-99.21%25-yellow) +### ![ru__RU](https://img.shields.io/badge/ru__RU-98.82%25-yellow)
Missing keys in ru_RU.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Repository.ViewLogs - Text.ViewLogs @@ -234,11 +255,14 @@ This document shows the translation status of each locale file in the repository
-### ![ta__IN](https://img.shields.io/badge/ta__IN-97.89%25-yellow) +### ![ta__IN](https://img.shields.io/badge/ta__IN-97.51%25-yellow)
Missing keys in ta_IN.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.Configure.Git.PreferredMergeMode - Text.ConfirmEmptyCommit.Continue @@ -258,11 +282,14 @@ This document shows the translation status of each locale file in the repository
-### ![uk__UA](https://img.shields.io/badge/uk__UA-99.08%25-yellow) +### ![uk__UA](https://img.shields.io/badge/uk__UA-98.69%25-yellow)
Missing keys in uk_UA.axaml +- Text.CommitCM.CopyAuthor +- Text.CommitCM.CopyCommitter +- Text.CommitCM.CopySubject - Text.CommitMessageTextBox.SubjectCount - Text.ConfigureWorkspace.Name - Text.Repository.ViewLogs From de31d4bad417e50ddea85496fe00da284f04e28f Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 17 Apr 2025 21:17:54 +0800 Subject: [PATCH 121/524] ux: layout of git command log item Signed-off-by: leo --- src/Views/ViewLogs.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/ViewLogs.axaml b/src/Views/ViewLogs.axaml index c4aa46f7..e29a5afd 100644 --- a/src/Views/ViewLogs.axaml +++ b/src/Views/ViewLogs.axaml @@ -75,7 +75,7 @@ Date: Thu, 17 Apr 2025 17:14:52 +0100 Subject: [PATCH 122/524] Fixed tooltip Tooltip for chosing mine was wrong. Was --theirs when should be --ours. (cherry picked from commit 26a471933c21a135e946273d49b9135b401bbd7f) --- src/Views/Conflict.axaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Views/Conflict.axaml b/src/Views/Conflict.axaml index f2d7bdec..cf2e25a0 100644 --- a/src/Views/Conflict.axaml +++ b/src/Views/Conflict.axaml @@ -111,7 +111,7 @@ -