From 7bba40d03fc1c550a530574b26c477a60c1d996a Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Fri, 6 Jun 2025 14:10:55 +1000 Subject: [PATCH] typos: (#1397) --- README.md | 4 ++-- build/README.md | 2 +- src/App.manifest | 2 +- src/Commands/Blame.cs | 2 +- src/Commands/MergeTool.cs | 4 ++-- src/Models/Commit.cs | 8 ++++---- src/Models/DateTimeFormat.cs | 2 +- src/Models/IpcChannel.cs | 6 +++--- src/Models/RepositorySettings.cs | 4 ++-- src/Models/Stash.cs | 2 +- src/Models/Worktree.cs | 2 +- src/Native/Linux.cs | 4 ++-- src/Native/Windows.cs | 16 ++++++++-------- src/Resources/Locales/de_DE.axaml | 2 +- src/Resources/Locales/en_US.axaml | 2 +- src/Resources/Locales/es_ES.axaml | 2 +- src/Resources/Locales/fr_FR.axaml | 2 +- src/Resources/Locales/it_IT.axaml | 2 +- src/Resources/Locales/ja_JP.axaml | 2 +- src/Resources/Locales/pt_BR.axaml | 2 +- src/Resources/Locales/ru_RU.axaml | 2 +- src/Resources/Locales/ta_IN.axaml | 2 +- src/Resources/Locales/uk_UA.axaml | 2 +- src/Resources/Locales/zh_CN.axaml | 2 +- src/Resources/Locales/zh_TW.axaml | 2 +- src/ViewModels/AssumeUnchangedManager.cs | 2 +- src/ViewModels/InitGitFlow.cs | 2 +- src/ViewModels/Launcher.cs | 2 +- src/ViewModels/Repository.cs | 20 ++++++++++---------- src/ViewModels/RepositoryConfigure.cs | 10 +++++----- src/ViewModels/SubmoduleCollection.cs | 6 +++--- src/ViewModels/TagCollection.cs | 6 +++--- src/ViewModels/WorkingCopy.cs | 6 +++--- src/Views/ColorPicker.cs | 22 +++++++++++----------- src/Views/InitGitFlow.axaml | 2 +- src/Views/Launcher.axaml.cs | 2 +- src/Views/RepositoryConfigure.axaml | 2 +- src/Views/Statistics.axaml | 2 +- src/Views/WorkingCopy.axaml | 2 +- 39 files changed, 84 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 8c12c646..f9ba3072 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ You can find the current translation status in [TRANSLATION.md](https://github.c **To use this tool, you need to install Git(>=2.25.1) first.** -You can download the latest stable from [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) or download workflow artifacts from [Github Actions](https://github.com/sourcegit-scm/sourcegit/actions) to try this app based on latest commits. +You can download the latest stable from [Releases](https://github.com/sourcegit-scm/sourcegit/releases/latest) or download workflow artifacts from [GitHub Actions](https://github.com/sourcegit-scm/sourcegit/actions) to try this app based on latest commits. This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs. @@ -93,7 +93,7 @@ For **macOS** users: brew tap ybeapps/homebrew-sourcegit brew install --cask --no-quarantine sourcegit ``` -* If you want to install `SourceGit.app` from Github Release manually, you need run following command to make sure it works: +* If you want to install `SourceGit.app` from GitHub Release manually, you need run following command to make sure it works: ```shell sudo xattr -cr /Applications/SourceGit.app ``` diff --git a/build/README.md b/build/README.md index b4358a55..17305edf 100644 --- a/build/README.md +++ b/build/README.md @@ -12,4 +12,4 @@ dotnet publish -c Release -r $RUNTIME_IDENTIFIER -o $DESTINATION_FOLDER src/SourceGit.csproj ``` > [!NOTE] -> Please replace the `$RUNTIME_IDENTIFIER` with one of `win-x64`,`win-arm64`,`linux-x64`,`linux-arm64`,`osx-x64`,`osx-arm64`, and replece the `$DESTINATION_FOLDER` with the real path that will store the output executable files. +> Please replace the `$RUNTIME_IDENTIFIER` with one of `win-x64`,`win-arm64`,`linux-x64`,`linux-arm64`,`osx-x64`,`osx-arm64`, and replace the `$DESTINATION_FOLDER` with the real path that will store the output executable files. diff --git a/src/App.manifest b/src/App.manifest index b3bc3bdf..11a2ff11 100644 --- a/src/App.manifest +++ b/src/App.manifest @@ -1,7 +1,7 @@  diff --git a/src/Commands/Blame.cs b/src/Commands/Blame.cs index 0bb45c98..4fa8b317 100644 --- a/src/Commands/Blame.cs +++ b/src/Commands/Blame.cs @@ -89,7 +89,7 @@ namespace SourceGit.Commands private readonly Models.BlameData _result = new Models.BlameData(); private readonly StringBuilder _content = new StringBuilder(); - private readonly string _dateFormat = Models.DateTimeFormat.Actived.DateOnly; + private readonly string _dateFormat = Models.DateTimeFormat.Active.DateOnly; private string _lastSHA = string.Empty; private bool _needUnifyCommitSHA = false; private int _minSHALen = 64; diff --git a/src/Commands/MergeTool.cs b/src/Commands/MergeTool.cs index f67f5e48..fc6d0d75 100644 --- a/src/Commands/MergeTool.cs +++ b/src/Commands/MergeTool.cs @@ -24,7 +24,7 @@ namespace SourceGit.Commands if (!File.Exists(toolPath)) { - Dispatcher.UIThread.Post(() => App.RaiseException(repo, $"Can NOT found external merge tool in '{toolPath}'!")); + Dispatcher.UIThread.Post(() => App.RaiseException(repo, $"Can NOT find external merge tool in '{toolPath}'!")); return false; } @@ -54,7 +54,7 @@ namespace SourceGit.Commands if (!File.Exists(toolPath)) { - Dispatcher.UIThread.Invoke(() => App.RaiseException(repo, $"Can NOT found external diff tool in '{toolPath}'!")); + Dispatcher.UIThread.Invoke(() => App.RaiseException(repo, $"Can NOT find external diff tool in '{toolPath}'!")); return false; } diff --git a/src/Models/Commit.cs b/src/Models/Commit.cs index d8eb8ab6..ced7597e 100644 --- a/src/Models/Commit.cs +++ b/src/Models/Commit.cs @@ -37,10 +37,10 @@ namespace SourceGit.Models public List Decorators { get; set; } = new List(); public bool HasDecorators => Decorators.Count > 0; - public string AuthorTimeStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString(DateTimeFormat.Actived.DateTime); - public string CommitterTimeStr => DateTime.UnixEpoch.AddSeconds(CommitterTime).ToLocalTime().ToString(DateTimeFormat.Actived.DateTime); - public string AuthorTimeShortStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString(DateTimeFormat.Actived.DateOnly); - public string CommitterTimeShortStr => DateTime.UnixEpoch.AddSeconds(CommitterTime).ToLocalTime().ToString(DateTimeFormat.Actived.DateOnly); + public string AuthorTimeStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString(DateTimeFormat.Active.DateTime); + public string CommitterTimeStr => DateTime.UnixEpoch.AddSeconds(CommitterTime).ToLocalTime().ToString(DateTimeFormat.Active.DateTime); + public string AuthorTimeShortStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString(DateTimeFormat.Active.DateOnly); + public string CommitterTimeShortStr => DateTime.UnixEpoch.AddSeconds(CommitterTime).ToLocalTime().ToString(DateTimeFormat.Active.DateOnly); public bool IsMerged { get; set; } = false; public bool IsCommitterVisible => !Author.Equals(Committer) || AuthorTime != CommitterTime; diff --git a/src/Models/DateTimeFormat.cs b/src/Models/DateTimeFormat.cs index 4e8aa550..16276c40 100644 --- a/src/Models/DateTimeFormat.cs +++ b/src/Models/DateTimeFormat.cs @@ -25,7 +25,7 @@ namespace SourceGit.Models set; } = 0; - public static DateTimeFormat Actived + public static DateTimeFormat Active { get => Supported[ActiveIndex]; } diff --git a/src/Models/IpcChannel.cs b/src/Models/IpcChannel.cs index d47a46bd..c2a6c6c7 100644 --- a/src/Models/IpcChannel.cs +++ b/src/Models/IpcChannel.cs @@ -19,7 +19,7 @@ namespace SourceGit.Models { try { - _singletoneLock = File.Open(Path.Combine(Native.OS.DataDir, "process.lock"), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); + _singletonLock = File.Open(Path.Combine(Native.OS.DataDir, "process.lock"), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); _isFirstInstance = true; _server = new NamedPipeServerStream( "SourceGitIPCChannel" + Environment.UserName, @@ -67,7 +67,7 @@ namespace SourceGit.Models public void Dispose() { _cancellationTokenSource?.Cancel(); - _singletoneLock?.Dispose(); + _singletonLock?.Dispose(); } private async void StartServer() @@ -96,7 +96,7 @@ namespace SourceGit.Models } } - private FileStream _singletoneLock = null; + private FileStream _singletonLock = null; private bool _isFirstInstance = false; private NamedPipeServerStream _server = null; private CancellationTokenSource _cancellationTokenSource = null; diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index 306ba189..3a864ffe 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -32,7 +32,7 @@ namespace SourceGit.Models set; } = false; - public bool OnlyHighlighCurrentBranchInHistories + public bool OnlyHighlightCurrentBranchInHistories { get; set; @@ -188,7 +188,7 @@ namespace SourceGit.Models set; } = false; - public string PreferedOpenAIService + public string PreferredOpenAIService { get; set; diff --git a/src/Models/Stash.cs b/src/Models/Stash.cs index 257b6d33..369ab145 100644 --- a/src/Models/Stash.cs +++ b/src/Models/Stash.cs @@ -11,6 +11,6 @@ namespace SourceGit.Models public ulong Time { get; set; } = 0; public string Message { get; set; } = ""; - public string TimeStr => DateTime.UnixEpoch.AddSeconds(Time).ToLocalTime().ToString(DateTimeFormat.Actived.DateTime); + public string TimeStr => DateTime.UnixEpoch.AddSeconds(Time).ToLocalTime().ToString(DateTimeFormat.Active.DateTime); } } diff --git a/src/Models/Worktree.cs b/src/Models/Worktree.cs index 3f954650..26f88a8a 100644 --- a/src/Models/Worktree.cs +++ b/src/Models/Worktree.cs @@ -23,7 +23,7 @@ namespace SourceGit.Models get { if (IsDetached) - return $"deteched HEAD at {Head.AsSpan(10)}"; + return $"detached HEAD at {Head.AsSpan(10)}"; if (Branch.StartsWith("refs/heads/", StringComparison.Ordinal)) return Branch.Substring(11); diff --git a/src/Native/Linux.cs b/src/Native/Linux.cs index 2bdcf561..3f6de903 100644 --- a/src/Native/Linux.cs +++ b/src/Native/Linux.cs @@ -120,8 +120,8 @@ namespace SourceGit.Native private string FindExecutable(string filename) { var pathVariable = Environment.GetEnvironmentVariable("PATH") ?? string.Empty; - var pathes = pathVariable.Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries); - foreach (var path in pathes) + var paths = pathVariable.Split(Path.PathSeparator, StringSplitOptions.RemoveEmptyEntries); + foreach (var path in paths) { var test = Path.Combine(path, filename); if (File.Exists(test)) diff --git a/src/Native/Windows.cs b/src/Native/Windows.cs index 83b11c47..adca05f3 100644 --- a/src/Native/Windows.cs +++ b/src/Native/Windows.cs @@ -80,17 +80,17 @@ namespace SourceGit.Native var p = IntPtrToPixelPoint(lParam); GetWindowRect(hWnd, out var rcWindow); - var borderThinkness = (int)(4 * window.RenderScaling); + var borderThickness = (int)(4 * window.RenderScaling); int y = 1; int x = 1; - if (p.X >= rcWindow.left && p.X < rcWindow.left + borderThinkness) + if (p.X >= rcWindow.left && p.X < rcWindow.left + borderThickness) x = 0; - else if (p.X < rcWindow.right && p.X >= rcWindow.right - borderThinkness) + else if (p.X < rcWindow.right && p.X >= rcWindow.right - borderThickness) x = 2; - if (p.Y >= rcWindow.top && p.Y < rcWindow.top + borderThinkness) + if (p.Y >= rcWindow.top && p.Y < rcWindow.top + borderThickness) y = 0; - else if (p.Y < rcWindow.bottom && p.Y >= rcWindow.bottom - borderThinkness) + else if (p.Y < rcWindow.bottom && p.Y >= rcWindow.bottom - borderThickness) y = 2; var zone = y * 3 + x; @@ -351,10 +351,10 @@ namespace SourceGit.Native Microsoft.Win32.RegistryView.Registry64); // VSCodium (system) - var systemVScodium = localMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{88DA3577-054F-4CA1-8122-7D820494CFFB}_is1"); - if (systemVScodium != null) + var systemVSCodium = localMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{88DA3577-054F-4CA1-8122-7D820494CFFB}_is1"); + if (systemVSCodium != null) { - return systemVScodium.GetValue("DisplayIcon") as string; + return systemVSCodium.GetValue("DisplayIcon") as string; } var currentUser = Microsoft.Win32.RegistryKey.OpenBaseKey( diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 89a0ae1b..032e5ce7 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -766,7 +766,7 @@ UNSTAGED STAGEN ALLES STAGEN - ALS UNVERÄNDERT ANGENOMMENE ANZEIGEN + ALS UNVERÄNDERT ANGENOMMENE ANZEIGEN Template: ${0}$ ARBEITSPLATZ: Arbeitsplätze konfigurieren... diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 8ed2770d..afdff5da 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -791,7 +791,7 @@ UNSTAGED STAGE STAGE ALL - VIEW ASSUME UNCHANGED + VIEW ASSUME UNCHANGED Template: ${0}$ WORKSPACE: Configure Workspaces... diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index a1879bde..1d97cb6f 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -794,7 +794,7 @@ UNSTAGED STAGE STAGE TODO - VER ASSUME UNCHANGED + VER ASSUME UNCHANGED Plantilla: ${0}$ ESPACIO DE TRABAJO: Configura Espacios de Trabajo... diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 52ec8d6d..635d74c2 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -733,7 +733,7 @@ NON INDEXÉ INDEXER INDEXER TOUT - VOIR LES FICHIERS PRÉSUMÉS INCHANGÉS + VOIR LES FICHIERS PRÉSUMÉS INCHANGÉS Modèle: ${0}$ ESPACE DE TRAVAIL : Configurer les espaces de travail... diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 9488d8d9..3aef0043 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -776,7 +776,7 @@ NON IN STAGE FAI LO STAGE FAI LO STAGE DI TUTTO - VISUALIZZA COME NON MODIFICATO + VISUALIZZA COME NON MODIFICATO Template: ${0}$ WORKSPACE: Configura Workspaces... diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml index 80372cb4..918a6b4d 100644 --- a/src/Resources/Locales/ja_JP.axaml +++ b/src/Resources/Locales/ja_JP.axaml @@ -731,7 +731,7 @@ 未ステージのファイル ステージへ移動 すべてステージへ移動 - 変更されていないとみなしたものを表示 + 変更されていないとみなしたものを表示 テンプレート: ${0}$ ワークスペース: ワークスペースを設定... diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 2d34f612..f448a908 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -667,7 +667,7 @@ UNSTAGED STAGE STAGE TODOS - VER SUPOR NÃO ALTERADO + VER SUPOR NÃO ALTERADO Template: ${0}$ Workspaces: Configurar workspaces... diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 0aeb60b5..80766130 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -791,7 +791,7 @@ НЕСФОРМИРОВАННЫЕ СФОРМИРОВАТЬ СФОРМИРОВАТЬ ВСЁ - ОТКРЫТЬ СПИСОК НЕОТСЛЕЖИВАЕМЫХ ФАЙЛОВ + ОТКРЫТЬ СПИСОК НЕОТСЛЕЖИВАЕМЫХ ФАЙЛОВ Шаблон: ${0}$ РАБОЧЕЕ ПРОСТРАНСТВО: Настройка рабочего пространства... diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml index ec558c5d..abe53252 100644 --- a/src/Resources/Locales/ta_IN.axaml +++ b/src/Resources/Locales/ta_IN.axaml @@ -732,7 +732,7 @@ நிலைநீக்கு நிலைபடுத்து அனைத்தும் நிலைபடுத்து - மாறாதது எனநினைப்பதை பார் + மாறாதது எனநினைப்பதை பார் வளர்புரு: ${0}$ பணியிடம்: பணியிடங்களை உள்ளமை... diff --git a/src/Resources/Locales/uk_UA.axaml b/src/Resources/Locales/uk_UA.axaml index 714374ce..096b4398 100644 --- a/src/Resources/Locales/uk_UA.axaml +++ b/src/Resources/Locales/uk_UA.axaml @@ -742,7 +742,7 @@ НЕПРОІНДЕКСОВАНІ ІНДЕКСУВАТИ ІНДЕКСУВАТИ ВСЕ - ПЕРЕГЛЯНУТИ ФАЙЛИ, ЩО ВВАЖАЮТЬСЯ НЕЗМІНЕНИМИ + ПЕРЕГЛЯНУТИ ФАЙЛИ, ЩО ВВАЖАЮТЬСЯ НЕЗМІНЕНИМИ Шаблон: ${0}$ РОБОЧИЙ ПРОСТІР: Налаштувати робочі простори... diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 628a097a..c7e57c97 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -795,7 +795,7 @@ 未暂存 暂存选中 暂存所有 - 查看忽略变更文件 + 查看忽略变更文件 模板:${0}$ 工作区: 配置工作区... diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index e2261005..18a3b04e 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -795,7 +795,7 @@ 未暫存 暫存選取的檔案 暫存所有檔案 - 檢視不追蹤變更的檔案 + 檢視不追蹤變更的檔案 範本: ${0}$ 工作區: 設定工作區... diff --git a/src/ViewModels/AssumeUnchangedManager.cs b/src/ViewModels/AssumeUnchangedManager.cs index bbfa220a..68151448 100644 --- a/src/ViewModels/AssumeUnchangedManager.cs +++ b/src/ViewModels/AssumeUnchangedManager.cs @@ -25,7 +25,7 @@ namespace SourceGit.ViewModels { if (!string.IsNullOrEmpty(file)) { - var log = _repo.CreateLog("Remove Assue Unchanged File"); + var log = _repo.CreateLog("Remove Assume Unchanged File"); new Commands.AssumeUnchanged(_repo.FullPath, file, false).Use(log).Exec(); log.Complete(); Files.Remove(file); diff --git a/src/ViewModels/InitGitFlow.cs b/src/ViewModels/InitGitFlow.cs index dec587b0..265a73d3 100644 --- a/src/ViewModels/InitGitFlow.cs +++ b/src/ViewModels/InitGitFlow.cs @@ -31,7 +31,7 @@ namespace SourceGit.ViewModels [Required(ErrorMessage = "Feature prefix is required!!!")] [RegularExpression(@"^[\w\-\.]+/$", ErrorMessage = "Bad feature prefix format!")] - public string FeturePrefix + public string FeaturePrefix { get => _featurePrefix; set => SetProperty(ref _featurePrefix, value, true); diff --git a/src/ViewModels/Launcher.cs b/src/ViewModels/Launcher.cs index 004b6a0a..187ff3aa 100644 --- a/src/ViewModels/Launcher.cs +++ b/src/ViewModels/Launcher.cs @@ -360,7 +360,7 @@ namespace SourceGit.ViewModels if (!Path.Exists(node.Id)) { - App.RaiseException(node.Id, "Repository does NOT exists any more. Please remove it."); + App.RaiseException(node.Id, "Repository does NOT exist any more. Please remove it."); return; } diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 0a384ec7..43a67ff4 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -127,12 +127,12 @@ namespace SourceGit.ViewModels public bool OnlyHighlightCurrentBranchInHistories { - get => _settings.OnlyHighlighCurrentBranchInHistories; + get => _settings.OnlyHighlightCurrentBranchInHistories; set { - if (value != _settings.OnlyHighlighCurrentBranchInHistories) + if (value != _settings.OnlyHighlightCurrentBranchInHistories) { - _settings.OnlyHighlighCurrentBranchInHistories = value; + _settings.OnlyHighlightCurrentBranchInHistories = value; OnPropertyChanged(); } } @@ -787,7 +787,7 @@ namespace SourceGit.ViewModels if (_currentBranch == null) { - App.RaiseException(_fullpath, "Can NOT found current branch!!!"); + App.RaiseException(_fullpath, "Can NOT find current branch!!!"); return; } @@ -811,7 +811,7 @@ namespace SourceGit.ViewModels if (_currentBranch == null) { - App.RaiseException(_fullpath, "Can NOT found current branch!!!"); + App.RaiseException(_fullpath, "Can NOT find current branch!!!"); return; } @@ -1304,7 +1304,7 @@ namespace SourceGit.ViewModels { if (_currentBranch == null) { - App.RaiseException(_fullpath, "Git do not hold any branch until you do first commit."); + App.RaiseException(_fullpath, "Git cannot create a branch before your first commit."); return; } @@ -1370,7 +1370,7 @@ namespace SourceGit.ViewModels { if (_currentBranch == null) { - App.RaiseException(_fullpath, "Git do not hold any branch until you do first commit."); + App.RaiseException(_fullpath, "Git cannot create a branch before your first commit."); return; } @@ -1449,7 +1449,7 @@ namespace SourceGit.ViewModels App.GetLauncher()?.OpenRepositoryInTab(node, null); } - public List GetPreferedOpenAIServices() + public List GetPreferredOpenAIServices() { var services = Preferences.Instance.OpenAIServices; if (services == null || services.Count == 0) @@ -1458,11 +1458,11 @@ namespace SourceGit.ViewModels if (services.Count == 1) return [services[0]]; - var prefered = _settings.PreferedOpenAIService; + var preferred = _settings.PreferredOpenAIService; var all = new List(); foreach (var service in services) { - if (service.Name.Equals(prefered, StringComparison.Ordinal)) + if (service.Name.Equals(preferred, StringComparison.Ordinal)) return [service]; all.Add(service); diff --git a/src/ViewModels/RepositoryConfigure.cs b/src/ViewModels/RepositoryConfigure.cs index d8a62a48..9ccbaccd 100644 --- a/src/ViewModels/RepositoryConfigure.cs +++ b/src/ViewModels/RepositoryConfigure.cs @@ -127,10 +127,10 @@ namespace SourceGit.ViewModels private set; } - public string PreferedOpenAIService + public string PreferredOpenAIService { - get => _repo.Settings.PreferedOpenAIService; - set => _repo.Settings.PreferedOpenAIService = value; + get => _repo.Settings.PreferredOpenAIService; + set => _repo.Settings.PreferredOpenAIService = value; } public AvaloniaList CustomActions @@ -156,8 +156,8 @@ namespace SourceGit.ViewModels foreach (var service in Preferences.Instance.OpenAIServices) AvailableOpenAIServices.Add(service.Name); - if (AvailableOpenAIServices.IndexOf(PreferedOpenAIService) == -1) - PreferedOpenAIService = "---"; + if (AvailableOpenAIServices.IndexOf(PreferredOpenAIService) == -1) + PreferredOpenAIService = "---"; _cached = new Commands.Config(repo.FullPath).ListAll(); if (_cached.TryGetValue("user.name", out var name)) diff --git a/src/ViewModels/SubmoduleCollection.cs b/src/ViewModels/SubmoduleCollection.cs index 7def3ced..b3688366 100644 --- a/src/ViewModels/SubmoduleCollection.cs +++ b/src/ViewModels/SubmoduleCollection.cs @@ -52,7 +52,7 @@ namespace SourceGit.ViewModels Counter = 1; } - public static List Build(IList submodules, HashSet expaneded) + public static List Build(IList submodules, HashSet expanded) { var nodes = new List(); var folders = new Dictionary(); @@ -79,13 +79,13 @@ namespace SourceGit.ViewModels } else if (lastFolder == null) { - lastFolder = new SubmoduleTreeNode(folder, depth, expaneded.Contains(folder)); + lastFolder = new SubmoduleTreeNode(folder, depth, expanded.Contains(folder)); folders.Add(folder, lastFolder); InsertFolder(nodes, lastFolder); } else { - var cur = new SubmoduleTreeNode(folder, depth, expaneded.Contains(folder)); + var cur = new SubmoduleTreeNode(folder, depth, expanded.Contains(folder)); folders.Add(folder, cur); InsertFolder(lastFolder.Children, cur); lastFolder = cur; diff --git a/src/ViewModels/TagCollection.cs b/src/ViewModels/TagCollection.cs index b6be1a0a..0f2cc5af 100644 --- a/src/ViewModels/TagCollection.cs +++ b/src/ViewModels/TagCollection.cs @@ -63,7 +63,7 @@ namespace SourceGit.ViewModels Counter = 1; } - public static List Build(List tags, HashSet expaneded) + public static List Build(List tags, HashSet expanded) { var nodes = new List(); var folders = new Dictionary(); @@ -90,13 +90,13 @@ namespace SourceGit.ViewModels } else if (lastFolder == null) { - lastFolder = new TagTreeNode(folder, expaneded.Contains(folder), depth); + lastFolder = new TagTreeNode(folder, expanded.Contains(folder), depth); folders.Add(folder, lastFolder); InsertFolder(nodes, lastFolder); } else { - var cur = new TagTreeNode(folder, expaneded.Contains(folder), depth); + var cur = new TagTreeNode(folder, expanded.Contains(folder), depth); folders.Add(folder, cur); InsertFolder(lastFolder.Children, cur); lastFolder = cur; diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index ac6d9486..b7dee5c9 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -1099,7 +1099,7 @@ namespace SourceGit.ViewModels var menu = new ContextMenu(); var ai = null as MenuItem; - var services = _repo.GetPreferedOpenAIServices(); + var services = _repo.GetPreferredOpenAIServices(); if (services.Count > 0) { ai = new MenuItem(); @@ -1497,7 +1497,7 @@ namespace SourceGit.ViewModels return null; } - var services = _repo.GetPreferedOpenAIServices(); + var services = _repo.GetPreferredOpenAIServices(); if (services.Count == 0) { App.RaiseException(_repo.FullPath, "Bad configuration for OpenAI"); @@ -1707,7 +1707,7 @@ namespace SourceGit.ViewModels if (!_repo.CanCreatePopup()) { - App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!"); + App.RaiseException(_repo.FullPath, "Repository has an unfinished job! Please wait!"); return; } diff --git a/src/Views/ColorPicker.cs b/src/Views/ColorPicker.cs index 8a0ecb55..1f9ef3a5 100644 --- a/src/Views/ColorPicker.cs +++ b/src/Views/ColorPicker.cs @@ -110,7 +110,7 @@ namespace SourceGit.Views context.DrawLine(pen, new Point(j * 32, 0), new Point(j * 32, 192)); // Selected - if (_hightlightedTableRect is { } rect) + if (_highlightedTableRect is { } rect) context.DrawRectangle(new Pen(Brushes.White, 2), rect); } @@ -143,7 +143,7 @@ namespace SourceGit.Views protected override void OnDataContextChanged(EventArgs e) { base.OnDataContextChanged(e); - _hightlightedTableRect = null; + _highlightedTableRect = null; } protected override Size MeasureOverride(Size availableSize) @@ -161,9 +161,9 @@ namespace SourceGit.Views var col = (int)Math.Floor(p.X / 32.0); var row = (int)Math.Floor(p.Y / 32.0); var rect = new Rect(col * 32 + 2, row * 32 + 2, 28, 28); - if (!rect.Equals(_hightlightedTableRect)) + if (!rect.Equals(_highlightedTableRect)) { - _hightlightedTableRect = rect; + _highlightedTableRect = rect; SetCurrentValue(ValueProperty, COLOR_TABLE[row, col].ToUInt32()); } @@ -172,32 +172,32 @@ namespace SourceGit.Views if (_darkestRect.Rect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _darkestColor.ToUInt32()); } else if (_darkerRect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _darkerColor.ToUInt32()); } else if (_darkRect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _darkColor.ToUInt32()); } else if (_lightRect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _lightColor.ToUInt32()); } else if (_lighterRect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _lighterColor.ToUInt32()); } else if (_lightestRect.Rect.Contains(p)) { - _hightlightedTableRect = null; + _highlightedTableRect = null; SetCurrentValue(ValueProperty, _lightestColor.ToUInt32()); } } @@ -234,7 +234,7 @@ namespace SourceGit.Views private Rect _lightRect = new Rect(160, 200, 32, 32); private Rect _lighterRect = new Rect(192, 200, 32, 32); private RoundedRect _lightestRect = new RoundedRect(new Rect(224, 200, 32, 32), new CornerRadius(0, 4, 4, 0)); - private Rect? _hightlightedTableRect = null; + private Rect? _highlightedTableRect = null; private Color _darkestColor; private Color _darkerColor; diff --git a/src/Views/InitGitFlow.axaml b/src/Views/InitGitFlow.axaml index 836e39a9..75fe696c 100644 --- a/src/Views/InitGitFlow.axaml +++ b/src/Views/InitGitFlow.axaml @@ -46,7 +46,7 @@ Height="26" VerticalAlignment="Center" CornerRadius="2" - Text="{Binding FeturePrefix, Mode=TwoWay}"/> + Text="{Binding FeaturePrefix, Mode=TwoWay}"/> + SelectedItem="{Binding PreferredOpenAIService, Mode=TwoWay}"> diff --git a/src/Views/Statistics.axaml b/src/Views/Statistics.axaml index a2d18393..163ce031 100644 --- a/src/Views/Statistics.axaml +++ b/src/Views/Statistics.axaml @@ -136,7 +136,7 @@ - +