From b5868b7bae8280e8c08942efe871f0e5dc974f62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20W?= Date: Thu, 10 Apr 2025 23:57:07 +0200 Subject: [PATCH 1/3] Make a few non-translated strings localizable (in Conflict view) --- src/Resources/Locales/en_US.axaml | 3 +++ src/Views/Conflict.axaml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index b25e4f776..4694eb3a1 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -726,7 +726,10 @@ 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? CONFLICTS DETECTED + OPEN EXTERNAL MERGETOOL FILE CONFLICTS ARE RESOLVED + USE MINE + USE THEIRS INCLUDE UNTRACKED FILES NO RECENT INPUT MESSAGES NO COMMIT TEMPLATES diff --git a/src/Views/Conflict.axaml b/src/Views/Conflict.axaml index 2dce264e1..7f13f14e5 100644 --- a/src/Views/Conflict.axaml +++ b/src/Views/Conflict.axaml @@ -105,9 +105,9 @@ - + - - - - From 56f521808668906dfec34169667060be99179132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20W?= Date: Thu, 10 Apr 2025 23:46:02 +0200 Subject: [PATCH 3/3] Corrected spelling and wording in related code and exception msg --- src/Models/Change.cs | 2 +- src/ViewModels/WorkingCopy.cs | 22 +++++++++++----------- src/Views/ChangeStatusIcon.cs | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Models/Change.cs b/src/Models/Change.cs index 36fe20ac4..e9d071811 100644 --- a/src/Models/Change.cs +++ b/src/Models/Change.cs @@ -36,7 +36,7 @@ public class Change public string OriginalPath { get; set; } = ""; public ChangeDataForAmend DataForAmend { get; set; } = null; - public bool IsConflit + public bool IsConflict { get { diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index dea8aceab..802c6c5da 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -243,7 +243,7 @@ public void SetData(List changes) // Just force refresh selected changes. Dispatcher.UIThread.Invoke(() => { - HasUnsolvedConflicts = _cached.Find(x => x.IsConflit) != null; + HasUnsolvedConflicts = _cached.Find(x => x.IsConflict) != null; UpdateDetail(); UpdateInProgressState(); @@ -275,7 +275,7 @@ public void SetData(List changes) if (c.WorkTree != Models.ChangeState.None) { unstaged.Add(c); - hasConflict |= c.IsConflit; + hasConflict |= c.IsConflict; } } @@ -379,7 +379,7 @@ public async void UseTheirs(List changes) foreach (var change in changes) { - if (!change.IsConflit) + if (!change.IsConflict) continue; if (change.WorkTree == Models.ChangeState.Deleted) @@ -419,7 +419,7 @@ public async void UseMine(List changes) foreach (var change in changes) { - if (!change.IsConflit) + if (!change.IsConflict) continue; if (change.Index == Models.ChangeState.Deleted) @@ -592,7 +592,7 @@ public ContextMenu CreateContextMenuForUnstagedChanges() menu.Items.Add(openWith); menu.Items.Add(new MenuItem() { Header = "-" }); - if (change.IsConflit) + if (change.IsConflict) { var useTheirs = new MenuItem(); useTheirs.Icon = App.CreateMenuIcon("Icons.Incoming"); @@ -931,20 +931,20 @@ public ContextMenu CreateContextMenuForUnstagedChanges() else { var hasConflicts = false; - var hasNoneConflicts = false; + var hasNonConflicts = false; foreach (var change in _selectedUnstaged) { - if (change.IsConflit) + if (change.IsConflict) hasConflicts = true; else - hasNoneConflicts = true; + hasNonConflicts = true; } if (hasConflicts) { - if (hasNoneConflicts) + if (hasNonConflicts) { - App.RaiseException(_repo.FullPath, "You have selected both non-conflict changes with conflicts!"); + App.RaiseException(_repo.FullPath, "Selection contains both conflict and non-conflict changes!"); return null; } @@ -1651,7 +1651,7 @@ private void SetDetail(Models.Change change, bool isUnstaged) if (change == null) DetailContext = null; - else if (change.IsConflit && isUnstaged) + else if (change.IsConflict && isUnstaged) DetailContext = new Conflict(_repo, this, change); else DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged), _detailContext as DiffContext); diff --git a/src/Views/ChangeStatusIcon.cs b/src/Views/ChangeStatusIcon.cs index 5d34be09c..7dbd0beb6 100644 --- a/src/Views/ChangeStatusIcon.cs +++ b/src/Views/ChangeStatusIcon.cs @@ -93,7 +93,7 @@ public override void Render(DrawingContext context) string indicator; if (IsUnstagedChange) { - if (Change.IsConflit) + if (Change.IsConflict) { background = Brushes.OrangeRed; indicator = "!"; @@ -139,7 +139,7 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang } if (isUnstaged) - ToolTip.SetTip(this, c.IsConflit ? "Conflict" : TIPS[(int)c.WorkTree]); + ToolTip.SetTip(this, c.IsConflict ? "Conflict" : TIPS[(int)c.WorkTree]); else ToolTip.SetTip(this, TIPS[(int)c.Index]);