diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml deleted file mode 100644 index 9e465fe7..00000000 --- a/.github/workflows/publish-packages.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Publish to Buildkite -on: - workflow_call: - secrets: - BUILDKITE_TOKEN: - required: true -jobs: - publish: - name: Publish to Buildkite - runs-on: ubuntu-latest - strategy: - matrix: - runtime: [linux-x64, linux-arm64] - steps: - - name: Download package artifacts - uses: actions/download-artifact@v4 - with: - name: package.${{ matrix.runtime }} - path: packages - - - name: Publish DEB package - env: - BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} - run: | - FILE=$(echo packages/*.deb) - curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-deb/packages \ - -H "Authorization: Bearer $BUILDKITE_TOKEN" \ - -F "file=@$FILE" \ - --fail - - - name: Publish RPM package - env: - BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} - run: | - FILE=$(echo packages/*.rpm) - curl -X POST https://api.buildkite.com/v2/packages/organizations/sourcegit/registries/sourcegit-rpm/packages \ - -H "Authorization: Bearer $BUILDKITE_TOKEN" \ - -F "file=@$FILE" \ - --fail diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 223fe75f..e61e608b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,12 +24,6 @@ jobs: uses: ./.github/workflows/package.yml with: version: ${{ needs.version.outputs.version }} - publish-packages: - needs: [package, version] - name: Publish Packages - uses: ./.github/workflows/publish-packages.yml - secrets: - BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} release: needs: [package, version] name: Release @@ -44,7 +38,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAG: ${{ github.ref_name }} VERSION: ${{ needs.version.outputs.version }} - run: gh release create "$TAG" -t "Release $VERSION" --notes-from-tag + run: gh release create "$TAG" -t "$VERSION" --notes-from-tag - name: Download artifacts uses: actions/download-artifact@v4 with: diff --git a/README.md b/README.md index 10e803d6..acbf22ff 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ ## Translation Status -[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-99.86%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.86%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-94.87%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-95.42%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-96.67%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md) +[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-97.55%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-100.00%25-brightgreen)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-94.69%25-yellow)](TRANSLATION.md) [![it__IT](https://img.shields.io/badge/it__IT-93.33%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-94.42%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md) > [!NOTE] > You can find the missing keys in [TRANSLATION.md](TRANSLATION.md) @@ -102,37 +102,33 @@ For **macOS** users: For **Linux** users: -* For Debian/Ubuntu based distributions, you can add the `sourcegit` repository by following: - You may need to install curl and/or gpg first, if you're on a very minimal host: +* Thanks [@aikawayataro](https://github.com/aikawayataro) for providing `rpm` and `deb` repositories, hosted on [Codeberg](https://codeberg.org/yataro/-/packages). + + `deb` how to: ```shell - apt update && apt install curl gpg -y + curl https://codeberg.org/api/packages/yataro/debian/repository.key | sudo tee /etc/apt/keyrings/sourcegit.asc + echo "deb [signed-by=/etc/apt/keyrings/sourcegit.asc] https://codeberg.org/api/packages/yataro/debian generic main" | sudo tee /etc/apt/sources.list.d/sourcegit.list + sudo apt update + sudo apt install sourcegit ``` - Install the registry signing key: + + `rpm` how to: ```shell - curl -fsSL "https://packages.buildkite.com/sourcegit/sourcegit-deb/gpgkey" | gpg --dearmor -o /etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg + curl https://codeberg.org/api/packages/yataro/rpm.repo | sed -e 's/gpgcheck=1/gpgcheck=0/' > sourcegit.repo + + # Fedora 41 and newer + sudo dnf config-manager addrepo --from-repofile=./sourcegit.repo + # Fedora 40 and earlier + sudo dnf config-manager --add-repo ./sourcegit.repo + + sudo dnf install sourcegit ``` - Configure the source: - ```shell - echo -e "deb [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main\ndeb-src [signed-by=/etc/apt/keyrings/sourcegit_sourcegit-deb-archive-keyring.gpg] https://packages.buildkite.com/sourcegit/sourcegit-deb/any/ any main" > /etc/apt/sources.list.d/buildkite-sourcegit-sourcegit-deb.list - ``` - Update your local repository and install the package: - ```shell - apt update && apt install sourcegit - ``` -* For RHEL/Fedora based distributions, you can add the `sourcegit` repository by following: - Configure the source: - ```shell - sudo sh -c 'echo -e "[sourcegit-rpm]\nname=sourcegit-rpm\nbaseurl=https://packages.buildkite.com/sourcegit/sourcegit-rpm/rpm_any/rpm_any/\$basearch\nenabled=1\nrepo_gpgcheck=1\ngpgcheck=0\ngpgkey=https://packages.buildkite.com/sourcegit/sourcegit-rpm/gpgkey\npriority=1"' > /etc/yum.repos.d/sourcegit-rpm.repo - ``` - Install the package with this command: - ```shell - sudo dnf install -y sourcegit - ``` -* `Appimage` files can be found on [AppimageHub](https://appimage.github.io/SourceGit/) -* `xdg-open` must be installed to support open native file manager. -* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your linux. + + If your distribution isn't using `dnf`, please refer to the documentation of your distribution on how to add an `rpm` repository. +* `AppImage` files can be found on [AppImage hub](https://appimage.github.io/SourceGit/), `xdg-open` (`xdg-utils`) must be installed to support open native file manager. +* Make sure [git-credential-manager](https://github.com/git-ecosystem/git-credential-manager/releases) is installed on your Linux. * Maybe you need to set environment variable `AVALONIA_SCREEN_SCALE_FACTORS`. See https://github.com/AvaloniaUI/Avalonia/wiki/Configuring-X11-per-monitor-DPI. -* If you can NOT type accented characters, such as `ê`, `ó`, try to set the environment variable `AVALONIA_IM_MODULE` to `none`. +* If you can NOT type accented characters, such as `ê`, `ó`, try to set the environment variable `AVALONIA_IM_MODULE` to `none`. ## OpenAI diff --git a/SourceGit.sln b/SourceGit.sln index 88730204..cf761abd 100644 --- a/SourceGit.sln +++ b/SourceGit.sln @@ -18,7 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ .github\workflows\package.yml = .github\workflows\package.yml .github\workflows\release.yml = .github\workflows\release.yml .github\workflows\localization-check.yml = .github\workflows\localization-check.yml - .github\workflows\publish-packages.yml = .github\workflows\publish-packages.yml EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{49A7C2D6-558C-4FAA-8F5D-EEE81497AED7}" diff --git a/TRANSLATION.md b/TRANSLATION.md index 30b181ca..45b0e171 100644 --- a/TRANSLATION.md +++ b/TRANSLATION.md @@ -1,40 +1,46 @@ -### de_DE.axaml: 99.86% +### de_DE.axaml: 97.55%
Missing Keys -- Text.Preference.General.DateFormat +- Text.Configure.IssueTracker.AddSampleGiteeIssue +- Text.Configure.IssueTracker.AddSampleGiteePullRequest +- Text.Preferences.General.DateFormat +- Text.Preferences.Git.SSLVerify +- Text.Repository.HistoriesLayout +- Text.Repository.HistoriesLayout.Horizontal +- Text.Repository.HistoriesLayout.Vertical +- Text.Repository.HistoriesOrder +- Text.Repository.OnlyHighlightCurrentBranchInHistories +- Text.Repository.Tags.OrderByCreatorDate +- Text.Repository.Tags.OrderByNameAsc +- Text.Repository.Tags.OrderByNameDes +- Text.Repository.Tags.Sort +- Text.Repository.UseRelativeTimeInHistories +- Text.SetUpstream +- Text.SetUpstream.Local +- Text.SetUpstream.Unset +- Text.SetUpstream.Upstream
-### es_ES.axaml: 99.86% +### es_ES.axaml: 100.00%
Missing Keys -- Text.Preference.General.DateFormat +
-### fr_FR.axaml: 94.87% +### fr_FR.axaml: 94.69%
Missing Keys -- Text.BranchCM.MergeMultiBranches -- Text.CherryPick.AppendSourceToMessage -- Text.CherryPick.Mainline.Tips -- Text.CommitCM.CherryPickMultiple -- Text.CommitCM.Merge -- Text.CommitCM.MergeMultiple -- Text.CommitDetail.Files.Search -- Text.Diff.UseBlockNavigation -- Text.Fetch.Force -- Text.FileCM.ResolveUsing -- Text.Hotkeys.Global.Clone - Text.InProgress.CherryPick.Head - Text.InProgress.Merge.Operating - Text.InProgress.Rebase.StoppedAt @@ -44,27 +50,40 @@ - Text.MergeMultiple.CommitChanges - Text.MergeMultiple.Strategy - Text.MergeMultiple.Targets -- Text.Preference.Appearance.FontSize -- Text.Preference.Appearance.FontSize.Default -- Text.Preference.Appearance.FontSize.Editor -- Text.Preference.General.DateFormat -- Text.Preference.General.ShowChildren +- Text.Preferences.Appearance.FontSize +- Text.Preferences.Appearance.FontSize.Default +- Text.Preferences.Appearance.FontSize.Editor +- Text.Preferences.General.DateFormat +- Text.Preferences.General.ShowChildren +- Text.Preferences.Git.SSLVerify - Text.Repository.CustomActions - Text.Repository.FilterCommits - Text.Repository.FilterCommits.Default - Text.Repository.FilterCommits.Exclude - Text.Repository.FilterCommits.Include +- Text.Repository.HistoriesLayout +- Text.Repository.HistoriesLayout.Horizontal +- Text.Repository.HistoriesLayout.Vertical - Text.Repository.HistoriesOrder - Text.Repository.HistoriesOrder.ByDate - Text.Repository.HistoriesOrder.Topo - Text.Repository.Skip +- Text.Repository.Tags.OrderByCreatorDate +- Text.Repository.Tags.OrderByNameAsc +- Text.Repository.Tags.OrderByNameDes +- Text.Repository.Tags.Sort +- Text.Repository.UseRelativeTimeInHistories - Text.ScanRepositories +- Text.SetUpstream +- Text.SetUpstream.Local +- Text.SetUpstream.Unset +- Text.SetUpstream.Upstream - Text.SHALinkCM.NavigateTo - Text.WorkingCopy.CommitToEdit
-### it_IT.axaml: 95.42% +### it_IT.axaml: 93.33%
@@ -75,6 +94,8 @@ - Text.CommitCM.MergeMultiple - Text.CommitDetail.Files.Search - Text.CommitDetail.Info.Children +- Text.Configure.IssueTracker.AddSampleGiteeIssue +- Text.Configure.IssueTracker.AddSampleGiteePullRequest - Text.Configure.IssueTracker.AddSampleGitLabMergeRequest - Text.Configure.OpenAI.Preferred - Text.Configure.OpenAI.Preferred.Tip @@ -90,23 +111,37 @@ - Text.MergeMultiple.CommitChanges - Text.MergeMultiple.Strategy - Text.MergeMultiple.Targets -- Text.Preference.General.DateFormat -- Text.Preference.General.ShowChildren +- Text.Preferences.General.DateFormat +- Text.Preferences.General.ShowChildren +- Text.Preferences.Git.SSLVerify - Text.Repository.FilterCommits - Text.Repository.FilterCommits.Default - Text.Repository.FilterCommits.Exclude - Text.Repository.FilterCommits.Include +- Text.Repository.HistoriesLayout +- Text.Repository.HistoriesLayout.Horizontal +- Text.Repository.HistoriesLayout.Vertical - Text.Repository.HistoriesOrder - Text.Repository.HistoriesOrder.ByDate - Text.Repository.HistoriesOrder.Topo +- Text.Repository.OnlyHighlightCurrentBranchInHistories - Text.Repository.Skip +- Text.Repository.Tags.OrderByCreatorDate +- Text.Repository.Tags.OrderByNameAsc +- Text.Repository.Tags.OrderByNameDes +- Text.Repository.Tags.Sort +- Text.Repository.UseRelativeTimeInHistories +- Text.SetUpstream +- Text.SetUpstream.Local +- Text.SetUpstream.Unset +- Text.SetUpstream.Upstream - Text.SHALinkCM.CopySHA - Text.SHALinkCM.NavigateTo - Text.WorkingCopy.CommitToEdit
-### pt_BR.axaml: 96.67% +### pt_BR.axaml: 94.42%
@@ -117,6 +152,8 @@ - Text.CommitCM.MergeMultiple - Text.CommitDetail.Files.Search - Text.CommitDetail.Info.Children +- Text.Configure.IssueTracker.AddSampleGiteeIssue +- Text.Configure.IssueTracker.AddSampleGiteePullRequest - Text.Diff.UseBlockNavigation - Text.Fetch.Force - Text.FileCM.ResolveUsing @@ -130,10 +167,25 @@ - Text.MergeMultiple.CommitChanges - Text.MergeMultiple.Strategy - Text.MergeMultiple.Targets -- Text.Preference.General.DateFormat -- Text.Preference.General.ShowChildren +- Text.Preferences.General.DateFormat +- Text.Preferences.General.ShowChildren +- Text.Preferences.Git.SSLVerify - Text.Repository.FilterCommits +- Text.Repository.HistoriesLayout +- Text.Repository.HistoriesLayout.Horizontal +- Text.Repository.HistoriesLayout.Vertical +- Text.Repository.HistoriesOrder +- Text.Repository.OnlyHighlightCurrentBranchInHistories - Text.Repository.Skip +- Text.Repository.Tags.OrderByCreatorDate +- Text.Repository.Tags.OrderByNameAsc +- Text.Repository.Tags.OrderByNameDes +- Text.Repository.Tags.Sort +- Text.Repository.UseRelativeTimeInHistories +- Text.SetUpstream +- Text.SetUpstream.Local +- Text.SetUpstream.Unset +- Text.SetUpstream.Upstream - Text.SHALinkCM.NavigateTo - Text.WorkingCopy.CommitToEdit diff --git a/VERSION b/VERSION index d612525a..2d67d4ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2025.01 \ No newline at end of file +2025.02 \ No newline at end of file diff --git a/build/resources/deb/DEBIAN/control b/build/resources/deb/DEBIAN/control index 7cfed330..f553db8b 100755 --- a/build/resources/deb/DEBIAN/control +++ b/build/resources/deb/DEBIAN/control @@ -1,7 +1,7 @@ Package: sourcegit Version: 8.23 Priority: optional -Depends: libx11-6, libice6, libsm6 +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 Maintainer: longshuang@msn.cn Description: Open-source & Free Git GUI Client diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index bc10ca48..2a684837 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -8,6 +8,7 @@ Source: https://github.com/sourcegit-scm/sourcegit/archive/refs/tags/v%_version. Requires: libX11.so.6()(%{__isa_bits}bit) Requires: libSM.so.6()(%{__isa_bits}bit) Requires: libicu +Requires: xdg-utils %define _build_id_links none diff --git a/src/App.Commands.cs b/src/App.Commands.cs index 18016a1c..85a75829 100644 --- a/src/App.Commands.cs +++ b/src/App.Commands.cs @@ -29,20 +29,30 @@ namespace SourceGit { get { - #if DISABLE_UPDATE_DETECTION +#if DISABLE_UPDATE_DETECTION return false; - #else +#else return true; - #endif +#endif } } - public static readonly Command OpenPreferenceCommand = new Command(_ => OpenDialog(new Views.Preference())); + public static readonly Command OpenPreferencesCommand = new Command(_ => OpenDialog(new Views.Preferences())); public static readonly Command OpenHotkeysCommand = new Command(_ => OpenDialog(new Views.Hotkeys())); public static readonly Command OpenAppDataDirCommand = new Command(_ => Native.OS.OpenInFileManager(Native.OS.DataDir)); public static readonly Command OpenAboutCommand = new Command(_ => OpenDialog(new Views.About())); - public static readonly Command CheckForUpdateCommand = new Command(_ => Check4Update(true)); + public static readonly Command CheckForUpdateCommand = new Command(_ => (Current as App)?.Check4Update(true)); public static readonly Command QuitCommand = new Command(_ => Quit(0)); - public static readonly Command CopyTextBlockCommand = new Command(p => CopyTextBlock(p as TextBlock)); + public static readonly Command CopyTextBlockCommand = new Command(p => + { + var textBlock = p as TextBlock; + if (textBlock == null) + return; + + if (textBlock.Inlines is { Count: > 0 } inlines) + CopyText(inlines.Text); + else if (!string.IsNullOrEmpty(textBlock.Text)) + CopyText(textBlock.Text); + }); } } diff --git a/src/App.JsonCodeGen.cs b/src/App.JsonCodeGen.cs index 70567af5..f37e269c 100644 --- a/src/App.JsonCodeGen.cs +++ b/src/App.JsonCodeGen.cs @@ -51,6 +51,6 @@ namespace SourceGit [JsonSerializable(typeof(Models.ThemeOverrides))] [JsonSerializable(typeof(Models.Version))] [JsonSerializable(typeof(Models.RepositorySettings))] - [JsonSerializable(typeof(ViewModels.Preference))] + [JsonSerializable(typeof(ViewModels.Preferences))] internal partial class JsonCodeGen : JsonSerializerContext { } } diff --git a/src/App.axaml b/src/App.axaml index 55aacb89..76d4baa8 100644 --- a/src/App.axaml +++ b/src/App.axaml @@ -35,7 +35,7 @@ - + diff --git a/src/App.axaml.cs b/src/App.axaml.cs index 3d1547c9..cca9f2ea 100644 --- a/src/App.axaml.cs +++ b/src/App.axaml.cs @@ -22,6 +22,7 @@ namespace SourceGit { public partial class App : Application { + #region App Entry Point [STAThread] public static void Main(string[] args) { @@ -40,9 +41,9 @@ namespace SourceGit try { - if (TryLaunchedAsRebaseTodoEditor(args, out int exitTodo)) + if (TryLaunchAsRebaseTodoEditor(args, out int exitTodo)) Environment.Exit(exitTodo); - else if (TryLaunchedAsRebaseMessageEditor(args, out int exitMessage)) + else if (TryLaunchAsRebaseMessageEditor(args, out int exitMessage)) Environment.Exit(exitMessage); else BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); @@ -74,35 +75,9 @@ namespace SourceGit Native.OS.SetupApp(builder); return builder; } + #endregion - public override void Initialize() - { - AvaloniaXamlLoader.Load(this); - - var pref = ViewModels.Preference.Instance; - pref.PropertyChanged += (_, _) => pref.Save(); - - SetLocale(pref.Locale); - SetTheme(pref.Theme, pref.ThemeOverrides); - SetFonts(pref.DefaultFontFamily, pref.MonospaceFontFamily, pref.OnlyUseMonoFontInEditor); - } - - public override void OnFrameworkInitializationCompleted() - { - if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) - { - BindingPlugins.DataValidators.RemoveAt(0); - - if (TryLaunchedAsCoreEditor(desktop)) - return; - - if (TryLaunchedAsAskpass(desktop)) - return; - - TryLaunchedAsNormal(desktop); - } - } - + #region Utility Functions public static void OpenDialog(Window window) { if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) @@ -304,21 +279,6 @@ namespace SourceGit return Current is App app ? app._launcher : null; } - public static ViewModels.Repository FindOpenedRepository(string repoPath) - { - if (Current is App app && app._launcher != null) - { - foreach (var page in app._launcher.Pages) - { - var id = page.Node.Id.Replace("\\", "/"); - if (id == repoPath && page.Data is ViewModels.Repository repo) - return repo; - } - } - - return null; - } - public static void Quit(int exitCode) { if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) @@ -331,18 +291,38 @@ namespace SourceGit Environment.Exit(exitCode); } } + #endregion - private static void CopyTextBlock(TextBlock textBlock) + #region Overrides + public override void Initialize() { - if (textBlock == null) - return; + AvaloniaXamlLoader.Load(this); - if (textBlock.Inlines is { Count: > 0 } inlines) - CopyText(inlines.Text); - else if (!string.IsNullOrEmpty(textBlock.Text)) - CopyText(textBlock.Text); + var pref = ViewModels.Preferences.Instance; + pref.PropertyChanged += (_, _) => pref.Save(); + + SetLocale(pref.Locale); + SetTheme(pref.Theme, pref.ThemeOverrides); + SetFonts(pref.DefaultFontFamily, pref.MonospaceFontFamily, pref.OnlyUseMonoFontInEditor); } + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + BindingPlugins.DataValidators.RemoveAt(0); + + if (TryLaunchAsCoreEditor(desktop)) + return; + + if (TryLaunchAsAskpass(desktop)) + return; + + TryLaunchAsNormal(desktop); + } + } + #endregion + private static void LogException(Exception ex) { if (ex == null) @@ -369,56 +349,7 @@ namespace SourceGit File.WriteAllText(file, builder.ToString()); } - private static void Check4Update(bool manually = false) - { - Task.Run(async () => - { - try - { - // Fetch lastest release information. - var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(5) }; - var data = await client.GetStringAsync("https://sourcegit-scm.github.io/data/version.json"); - - // Parse json into Models.Version. - var ver = JsonSerializer.Deserialize(data, JsonCodeGen.Default.Version); - if (ver == null) - return; - - // Check if already up-to-date. - if (!ver.IsNewVersion) - { - if (manually) - ShowSelfUpdateResult(new Models.AlreadyUpToDate()); - return; - } - - // Should not check ignored tag if this is called manually. - if (!manually) - { - var pref = ViewModels.Preference.Instance; - if (ver.TagName == pref.IgnoreUpdateTag) - return; - } - - ShowSelfUpdateResult(ver); - } - catch (Exception e) - { - if (manually) - ShowSelfUpdateResult(e); - } - }); - } - - private static void ShowSelfUpdateResult(object data) - { - Dispatcher.UIThread.Post(() => - { - OpenDialog(new Views.SelfUpdate() { DataContext = new ViewModels.SelfUpdate() { Data = data } }); - }); - } - - private static bool TryLaunchedAsRebaseTodoEditor(string[] args, out int exitCode) + private static bool TryLaunchAsRebaseTodoEditor(string[] args, out int exitCode) { exitCode = -1; @@ -471,7 +402,7 @@ namespace SourceGit return true; } - private static bool TryLaunchedAsRebaseMessageEditor(string[] args, out int exitCode) + private static bool TryLaunchAsRebaseMessageEditor(string[] args, out int exitCode) { exitCode = -1; @@ -505,7 +436,7 @@ namespace SourceGit return true; } - private bool TryLaunchedAsCoreEditor(IClassicDesktopStyleApplicationLifetime desktop) + private bool TryLaunchAsCoreEditor(IClassicDesktopStyleApplicationLifetime desktop) { var args = desktop.Args; if (args == null || args.Length <= 1 || !args[0].Equals("--core-editor", StringComparison.Ordinal)) @@ -520,7 +451,7 @@ namespace SourceGit return true; } - private bool TryLaunchedAsAskpass(IClassicDesktopStyleApplicationLifetime desktop) + private bool TryLaunchAsAskpass(IClassicDesktopStyleApplicationLifetime desktop) { var launchAsAskpass = Environment.GetEnvironmentVariable("SOURCEGIT_LAUNCH_AS_ASKPASS"); if (launchAsAskpass is not "TRUE") @@ -536,7 +467,7 @@ namespace SourceGit return false; } - private void TryLaunchedAsNormal(IClassicDesktopStyleApplicationLifetime desktop) + private void TryLaunchAsNormal(IClassicDesktopStyleApplicationLifetime desktop) { Native.OS.SetupEnternalTools(); Models.AvatarManager.Instance.Start(); @@ -548,11 +479,64 @@ namespace SourceGit _launcher = new ViewModels.Launcher(startupRepo); desktop.MainWindow = new Views.Launcher() { DataContext = _launcher }; - #if !DISABLE_UPDATE_DETECTION - var pref = ViewModels.Preference.Instance; +#if !DISABLE_UPDATE_DETECTION + var pref = ViewModels.Preferences.Instance; if (pref.ShouldCheck4UpdateOnStartup()) Check4Update(); - #endif +#endif + } + + private void Check4Update(bool manually = false) + { + Task.Run(async () => + { + try + { + // Fetch latest release information. + var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(5) }; + var data = await client.GetStringAsync("https://sourcegit-scm.github.io/data/version.json"); + + // Parse JSON into Models.Version. + var ver = JsonSerializer.Deserialize(data, JsonCodeGen.Default.Version); + if (ver == null) + return; + + // Check if already up-to-date. + if (!ver.IsNewVersion) + { + if (manually) + ShowSelfUpdateResult(new Models.AlreadyUpToDate()); + return; + } + + // Should not check ignored tag if this is called manually. + if (!manually) + { + var pref = ViewModels.Preferences.Instance; + if (ver.TagName == pref.IgnoreUpdateTag) + return; + } + + ShowSelfUpdateResult(ver); + } + catch (Exception e) + { + if (manually) + ShowSelfUpdateResult(e); + } + }); + } + + private void ShowSelfUpdateResult(object data) + { + Dispatcher.UIThread.Post(() => + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) + { + var dialog = new Views.SelfUpdate() { DataContext = new ViewModels.SelfUpdate() { Data = data } }; + dialog.ShowDialog(owner); + } + }); } private ViewModels.Launcher _launcher = null; diff --git a/src/Commands/Add.cs b/src/Commands/Add.cs index c3d1d3e6..e1b55b68 100644 --- a/src/Commands/Add.cs +++ b/src/Commands/Add.cs @@ -27,5 +27,12 @@ namespace SourceGit.Commands } Args = builder.ToString(); } + + public Add(string repo, string pathspecFromFile) + { + WorkingDirectory = repo; + Context = repo; + Args = $"add --pathspec-from-file=\"{pathspecFromFile}\""; + } } } diff --git a/src/Commands/IsBareRepository.cs b/src/Commands/IsBareRepository.cs new file mode 100644 index 00000000..f92d0888 --- /dev/null +++ b/src/Commands/IsBareRepository.cs @@ -0,0 +1,24 @@ +using System.IO; + +namespace SourceGit.Commands +{ + public class IsBareRepository : Command + { + public IsBareRepository(string path) + { + WorkingDirectory = path; + Args = "rev-parse --is-bare-repository"; + } + + public bool Result() + { + if (!Directory.Exists(Path.Combine(WorkingDirectory, "refs")) || + !Directory.Exists(Path.Combine(WorkingDirectory, "objects")) || + !File.Exists(Path.Combine(WorkingDirectory, "HEAD"))) + return false; + + var rs = ReadToEnd(); + return rs.IsSuccess && rs.StdOut.Trim() == "true"; + } + } +} diff --git a/src/Commands/QueryTags.cs b/src/Commands/QueryTags.cs index 3aa20dc2..73f63d8b 100644 --- a/src/Commands/QueryTags.cs +++ b/src/Commands/QueryTags.cs @@ -11,7 +11,7 @@ namespace SourceGit.Commands Context = repo; WorkingDirectory = repo; - Args = $"tag -l --sort=-creatordate --format=\"{_boundary}%(refname)%00%(objectname)%00%(*objectname)%00%(contents:subject)%0a%0a%(contents:body)\""; + Args = $"tag -l --format=\"{_boundary}%(refname)%00%(objectname)%00%(*objectname)%00%(creatordate:unix)%00%(contents:subject)%0a%0a%(contents:body)\""; } public List Result() @@ -25,14 +25,15 @@ namespace SourceGit.Commands foreach (var record in records) { var subs = record.Split('\0', StringSplitOptions.None); - if (subs.Length != 4) + if (subs.Length != 5) continue; - var message = subs[3].Trim(); + var message = subs[4].Trim(); tags.Add(new Models.Tag() { Name = subs[0].Substring(10), SHA = string.IsNullOrEmpty(subs[2]) ? subs[1] : subs[2], + CreatorDate = ulong.Parse(subs[3]), Message = string.IsNullOrEmpty(message) ? null : message, }); } diff --git a/src/Commands/Stash.cs b/src/Commands/Stash.cs index 77f1af53..40c917dd 100644 --- a/src/Commands/Stash.cs +++ b/src/Commands/Stash.cs @@ -17,47 +17,48 @@ namespace SourceGit.Commands return Exec(); } - public bool Push(List changes, string message, bool onlyStaged, bool keepIndex) + public bool Push(string message, List changes, bool keepIndex) { var builder = new StringBuilder(); builder.Append("stash push "); - if (onlyStaged) - builder.Append("--staged "); if (keepIndex) builder.Append("--keep-index "); builder.Append("-m \""); builder.Append(message); builder.Append("\" -- "); - if (onlyStaged) - { - foreach (var c in changes) - builder.Append($"\"{c.Path}\" "); - } - else - { - var needAdd = new List(); - foreach (var c in changes) - { - builder.Append($"\"{c.Path}\" "); + foreach (var c in changes) + builder.Append($"\"{c.Path}\" "); - if (c.WorkTree == Models.ChangeState.Added || c.WorkTree == Models.ChangeState.Untracked) - { - needAdd.Add(c); - if (needAdd.Count > 10) - { - new Add(WorkingDirectory, needAdd).Exec(); - needAdd.Clear(); - } - } - } - if (needAdd.Count > 0) - { - new Add(WorkingDirectory, needAdd).Exec(); - needAdd.Clear(); - } - } + Args = builder.ToString(); + return Exec(); + } + public bool Push(string message, string pathspecFromFile, bool keepIndex) + { + var builder = new StringBuilder(); + builder.Append("stash push --pathspec-from-file=\""); + builder.Append(pathspecFromFile); + builder.Append("\" "); + if (keepIndex) + builder.Append("--keep-index "); + builder.Append("-m \""); + builder.Append(message); + builder.Append("\""); + + Args = builder.ToString(); + return Exec(); + } + + public bool PushOnlyStaged(string message, bool keepIndex) + { + var builder = new StringBuilder(); + builder.Append("stash push --staged "); + if (keepIndex) + builder.Append("--keep-index "); + builder.Append("-m \""); + builder.Append(message); + builder.Append("\""); Args = builder.ToString(); return Exec(); } diff --git a/src/Commands/Version.cs b/src/Commands/Version.cs deleted file mode 100644 index ed7c6892..00000000 --- a/src/Commands/Version.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace SourceGit.Commands -{ - public class Version : Command - { - public Version() - { - Args = "--version"; - RaiseError = false; - } - - public string Query() - { - var rs = ReadToEnd(); - if (!rs.IsSuccess || string.IsNullOrWhiteSpace(rs.StdOut)) - return string.Empty; - return rs.StdOut.Trim().Substring("git version ".Length); - } - } -} diff --git a/src/Converters/IntConverters.cs b/src/Converters/IntConverters.cs index 17a88da2..f21c5d24 100644 --- a/src/Converters/IntConverters.cs +++ b/src/Converters/IntConverters.cs @@ -23,10 +23,10 @@ namespace SourceGit.Converters new FuncValueConverter(v => v != 1); public static readonly FuncValueConverter IsSubjectLengthBad = - new FuncValueConverter(v => v > ViewModels.Preference.Instance.SubjectGuideLength); + new FuncValueConverter(v => v > ViewModels.Preferences.Instance.SubjectGuideLength); public static readonly FuncValueConverter IsSubjectLengthGood = - new FuncValueConverter(v => v <= ViewModels.Preference.Instance.SubjectGuideLength); + new FuncValueConverter(v => v <= ViewModels.Preferences.Instance.SubjectGuideLength); public static readonly FuncValueConverter ToTreeMargin = new FuncValueConverter(v => new Thickness(v * 16, 0, 0, 0)); diff --git a/src/Converters/StringConverters.cs b/src/Converters/StringConverters.cs index 585e0f02..e6f4237c 100644 --- a/src/Converters/StringConverters.cs +++ b/src/Converters/StringConverters.cs @@ -1,13 +1,12 @@ using System; using System.Globalization; -using System.Text.RegularExpressions; using Avalonia.Data.Converters; using Avalonia.Styling; namespace SourceGit.Converters { - public static partial class StringConverters + public static class StringConverters { public class ToLocaleConverter : IValueConverter { @@ -68,22 +67,6 @@ namespace SourceGit.Converters public static readonly FuncValueConverter ToShortSHA = new FuncValueConverter(v => v == null ? string.Empty : (v.Length > 10 ? v.Substring(0, 10) : v)); - public static readonly FuncValueConverter UnderRecommendGitVersion = - new(v => - { - var match = REG_GIT_VERSION().Match(v ?? ""); - if (match.Success) - { - var major = int.Parse(match.Groups[1].Value); - var minor = int.Parse(match.Groups[2].Value); - var build = int.Parse(match.Groups[3].Value); - - return new Version(major, minor, build) < MINIMAL_GIT_VERSION; - } - - return true; - }); - public static readonly FuncValueConverter TrimRefsPrefix = new FuncValueConverter(v => { @@ -95,10 +78,5 @@ namespace SourceGit.Converters return v.Substring(13); return v; }); - - [GeneratedRegex(@"^[\s\w]*(\d+)\.(\d+)[\.\-](\d+).*$")] - private static partial Regex REG_GIT_VERSION(); - - private static readonly Version MINIMAL_GIT_VERSION = new Version(2, 23, 0); } } diff --git a/src/Models/CommitGraph.cs b/src/Models/CommitGraph.cs index 31f5a40e..77209751 100644 --- a/src/Models/CommitGraph.cs +++ b/src/Models/CommitGraph.cs @@ -25,10 +25,11 @@ namespace SourceGit.Models s_penCount = colors.Count; } - public class Path(int color) + public class Path(int color, bool isMerged) { public List Points { get; } = []; public int Color { get; } = color; + public bool IsMerged { get; } = isMerged; } public class Link @@ -37,6 +38,7 @@ namespace SourceGit.Models public Point Control; public Point End; public int Color; + public bool IsMerged; } public enum DotType @@ -51,6 +53,7 @@ namespace SourceGit.Models public DotType Type; public Point Center; public int Color; + public bool IsMerged; } public List Paths { get; } = []; @@ -68,7 +71,7 @@ namespace SourceGit.Models var unsolved = new List(); var ended = new List(); var offsetY = -halfHeight; - var colorIdx = 0; + var colorPicker = new ColorPicker(); foreach (var commit in commits) { @@ -108,7 +111,6 @@ namespace SourceGit.Models } isMerged = isMerged || l.IsMerged; - major.IsMerged = isMerged; } else { @@ -119,28 +121,35 @@ namespace SourceGit.Models // Remove ended curves from unsolved foreach (var l in ended) + { + colorPicker.Recycle(l.Path.Color); unsolved.Remove(l); + } ended.Clear(); - // Create new curve for branch head + // If no path found, create new curve for branch head + // Otherwise, create new curve for new merged commit if (major == null) { offsetX += unitWidth; if (commit.Parents.Count > 0) { - major = new PathHelper(commit.Parents[0], isMerged, colorIdx, new Point(offsetX, offsetY)); + major = new PathHelper(commit.Parents[0], isMerged, colorPicker.Next(), new Point(offsetX, offsetY)); unsolved.Add(major); temp.Paths.Add(major.Path); } - - colorIdx = (colorIdx + 1) % s_penCount; + } + else if (isMerged && !major.IsMerged && commit.Parents.Count > 0) + { + major.ReplaceMerged(); + temp.Paths.Add(major.Path); } // Calculate link position of this commit. var position = new Point(major?.LastX ?? offsetX, offsetY); var dotColor = major?.Path.Color ?? 0; - var anchor = new Dot() { Center = position, Color = dotColor }; + var anchor = new Dot() { Center = position, Color = dotColor, IsMerged = isMerged }; if (commit.IsCurrentHead) anchor.Type = DotType.Head; else if (commit.Parents.Count > 1) @@ -158,16 +167,20 @@ namespace SourceGit.Models var parent = unsolved.Find(x => x.Next.Equals(parentHash, StringComparison.Ordinal)); if (parent != null) { - // Try to change the merge state of linked graph - if (isMerged) - parent.IsMerged = true; + if (isMerged && !parent.IsMerged) + { + parent.Goto(parent.LastX, offsetY + halfHeight, halfHeight); + parent.ReplaceMerged(); + temp.Paths.Add(parent.Path); + } temp.Links.Add(new Link { Start = position, End = new Point(parent.LastX, offsetY + halfHeight), Control = new Point(parent.LastX, position.Y), - Color = parent.Path.Color + Color = parent.Path.Color, + IsMerged = isMerged, }); } else @@ -175,10 +188,9 @@ namespace SourceGit.Models offsetX += unitWidth; // Create new curve for parent commit that not includes before - var l = new PathHelper(parentHash, isMerged, colorIdx, position, new Point(offsetX, position.Y + halfHeight)); + var l = new PathHelper(parentHash, isMerged, colorPicker.Next(), position, new Point(offsetX, position.Y + halfHeight)); unsolved.Add(l); temp.Paths.Add(l.Path); - colorIdx = (colorIdx + 1) % s_penCount; } } } @@ -205,32 +217,53 @@ namespace SourceGit.Models return temp; } + private class ColorPicker + { + public int Next() + { + if (_colorsQueue.Count == 0) + { + for (var i = 0; i < s_penCount; i++) + _colorsQueue.Enqueue(i); + } + + return _colorsQueue.Dequeue(); + } + + public void Recycle(int idx) + { + if (!_colorsQueue.Contains(idx)) + _colorsQueue.Enqueue(idx); + } + + private Queue _colorsQueue = new Queue(); + } + private class PathHelper { - public Path Path { get; } + public Path Path { get; private set; } public string Next { get; set; } - public bool IsMerged { get; set; } public double LastX { get; private set; } + public bool IsMerged => Path.IsMerged; + public PathHelper(string next, bool isMerged, int color, Point start) { Next = next; - IsMerged = isMerged; LastX = start.X; _lastY = start.Y; - Path = new Path(color); + Path = new Path(color, isMerged); Path.Points.Add(start); } public PathHelper(string next, bool isMerged, int color, Point start, Point to) { Next = next; - IsMerged = isMerged; LastX = to.X; _lastY = to.Y; - Path = new Path(color); + Path = new Path(color, isMerged); Path.Points.Add(start); Path.Points.Add(to); } @@ -310,6 +343,19 @@ namespace SourceGit.Models _lastY = y; } + /// + /// End the current path and create a new from the end. + /// + public void ReplaceMerged() + { + var color = Path.Color; + Add(LastX, _lastY); + + Path = new Path(color, true); + Path.Points.Add(new Point(LastX, _lastY)); + _endY = 0; + } + private void Add(double x, double y) { if (_endY < y) @@ -327,7 +373,6 @@ namespace SourceGit.Models private static readonly List s_defaultPenColors = [ Colors.Orange, Colors.ForestGreen, - Colors.Gray, Colors.Turquoise, Colors.Olive, Colors.Magenta, diff --git a/src/Models/GitVersions.cs b/src/Models/GitVersions.cs new file mode 100644 index 00000000..394a9518 --- /dev/null +++ b/src/Models/GitVersions.cs @@ -0,0 +1,25 @@ +namespace SourceGit.Models +{ + public static class GitVersions + { + /// + /// The minimal version of Git that required by this app. + /// + public static readonly System.Version MINIMAL = new System.Version(2, 23, 0); + + /// + /// The minimal version of Git that supports the `add` command with the `--pathspec-from-file` option. + /// + public static readonly System.Version ADD_WITH_PATHSPECFILE = new System.Version(2, 25, 0); + + /// + /// The minimal version of Git that supports the `stash` command with the `--pathspec-from-file` option. + /// + public static readonly System.Version STASH_WITH_PATHSPECFILE = new System.Version(2, 26, 0); + + /// + /// The minimal version of Git that supports the `stash` command with the `--staged` option. + /// + public static readonly System.Version STASH_ONLY_STAGED = new System.Version(2, 35, 0); + } +} diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index 4673f66a..1d0b3c10 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -32,6 +32,18 @@ namespace SourceGit.Models set; } = false; + public bool OnlyHighlighCurrentBranchInHistories + { + get; + set; + } = false; + + public TagSortMode TagSortMode + { + get; + set; + } = TagSortMode.CreatorDate; + public bool IncludeUntrackedInLocalChanges { get; @@ -444,65 +456,13 @@ namespace SourceGit.Models CommitMessages.Insert(0, message); } - public IssueTrackerRule AddNewIssueTracker() + public IssueTrackerRule AddIssueTracker(string name, string regex, string url) { var rule = new IssueTrackerRule() { - Name = "New Issue Tracker", - RegexString = "#(\\d+)", - URLTemplate = "https://xxx/$1", - }; - - IssueTrackerRules.Add(rule); - return rule; - } - - public IssueTrackerRule AddGithubIssueTracker(string repoURL) - { - var rule = new IssueTrackerRule() - { - Name = "Github ISSUE", - RegexString = "#(\\d+)", - URLTemplate = string.IsNullOrEmpty(repoURL) ? "https://github.com/username/repository/issues/$1" : $"{repoURL}/issues/$1", - }; - - IssueTrackerRules.Add(rule); - return rule; - } - - public IssueTrackerRule AddJiraIssueTracker() - { - var rule = new IssueTrackerRule() - { - Name = "Jira Tracker", - RegexString = "PROJ-(\\d+)", - URLTemplate = "https://jira.yourcompany.com/browse/PROJ-$1", - }; - - IssueTrackerRules.Add(rule); - return rule; - } - - public IssueTrackerRule AddGitLabIssueTracker(string repoURL) - { - var rule = new IssueTrackerRule() - { - Name = "GitLab ISSUE", - RegexString = "#(\\d+)", - URLTemplate = string.IsNullOrEmpty(repoURL) ? "https://gitlab.com/username/repository/-/issues/$1" : $"{repoURL}/-/issues/$1", - }; - - IssueTrackerRules.Add(rule); - return rule; - } - - public IssueTrackerRule AddGitLabMergeRequestTracker(string repoURL) - { - var rule = new IssueTrackerRule() - { - Name = "GitLab MR", - RegexString = "!(\\d+)", - URLTemplate = string.IsNullOrEmpty(repoURL) ? "https://gitlab.com/username/repository/-/merge_requests/$1" : $"{repoURL}/-/merge_requests/$1", + Name = name, + RegexString = regex, + URLTemplate = url, }; IssueTrackerRules.Add(rule); diff --git a/src/Models/Tag.cs b/src/Models/Tag.cs index 2e8f2c8e..51681d93 100644 --- a/src/Models/Tag.cs +++ b/src/Models/Tag.cs @@ -2,10 +2,18 @@ namespace SourceGit.Models { + public enum TagSortMode + { + CreatorDate = 0, + NameInAscending, + NameInDescending, + } + public class Tag : ObservableObject { public string Name { get; set; } = string.Empty; public string SHA { get; set; } = string.Empty; + public ulong CreatorDate { get; set; } = 0; public string Message { get; set; } = string.Empty; public FilterMode FilterMode diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index 710b307d..c63f0e55 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -174,7 +174,7 @@ namespace SourceGit.Models { _updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime(); - lock (_submodules) + lock (_lockSubmodule) { if (_submodules.Count > 0) _updateSubmodules = DateTime.Now.AddSeconds(1).ToFileTime(); @@ -195,7 +195,7 @@ namespace SourceGit.Models if (name == ".git" || name.StartsWith(".git/", StringComparison.Ordinal)) return; - lock (_submodules) + lock (_lockSubmodule) { foreach (var submodule in _submodules) { diff --git a/src/Native/MacOS.cs b/src/Native/MacOS.cs index 5721fe87..c9e6abad 100644 --- a/src/Native/MacOS.cs +++ b/src/Native/MacOS.cs @@ -26,10 +26,11 @@ namespace SourceGit.Native public string FindGitExecutable() { var gitPathVariants = new List() { - "/usr/bin/git", "/usr/local/bin/git", "/opt/homebrew/bin/git", "/opt/homebrew/opt/git/bin/git" + "/usr/bin/git", "/usr/local/bin/git", "/opt/homebrew/bin/git", "/opt/homebrew/opt/git/bin/git" }; foreach (var path in gitPathVariants) - if (File.Exists(path)) return path; + if (File.Exists(path)) + return path; return string.Empty; } diff --git a/src/Native/OS.cs b/src/Native/OS.cs index c8c9e92d..177bbf9f 100644 --- a/src/Native/OS.cs +++ b/src/Native/OS.cs @@ -2,12 +2,14 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Text; +using System.Text.RegularExpressions; using Avalonia; namespace SourceGit.Native { - public static class OS + public static partial class OS { public interface IBackend { @@ -23,11 +25,51 @@ namespace SourceGit.Native void OpenWithDefaultEditor(string file); } - public static string DataDir { get; private set; } = string.Empty; - public static string GitExecutable { get; set; } = string.Empty; - public static string ShellOrTerminal { get; set; } = string.Empty; - public static List ExternalTools { get; set; } = []; - public static string CustomPathEnv { get; set; } = string.Empty; + public static string DataDir { + get; + private set; + } = string.Empty; + + public static string CustomPathEnv + { + get; + set; + } = string.Empty; + + public static string GitExecutable + { + get => _gitExecutable; + set + { + if (_gitExecutable != value) + { + _gitExecutable = value; + UpdateGitVersion(); + } + } + } + + public static string GitVersionString + { + get; + private set; + } = string.Empty; + + public static Version GitVersion + { + get; + private set; + } = new Version(0, 0, 0); + + public static string ShellOrTerminal { + get; + set; + } = string.Empty; + + public static List ExternalTools { + get; + set; + } = []; static OS() { @@ -123,6 +165,59 @@ namespace SourceGit.Native _backend.OpenWithDefaultEditor(file); } + private static void UpdateGitVersion() + { + if (string.IsNullOrEmpty(_gitExecutable) || !File.Exists(_gitExecutable)) + { + GitVersionString = string.Empty; + GitVersion = new Version(0, 0, 0); + return; + } + + var start = new ProcessStartInfo(); + start.FileName = _gitExecutable; + start.Arguments = "--version"; + start.UseShellExecute = false; + start.CreateNoWindow = true; + start.RedirectStandardOutput = true; + start.RedirectStandardError = true; + start.StandardOutputEncoding = Encoding.UTF8; + start.StandardErrorEncoding = Encoding.UTF8; + + var proc = new Process() { StartInfo = start }; + try + { + proc.Start(); + + var rs = proc.StandardOutput.ReadToEnd(); + proc.WaitForExit(); + if (proc.ExitCode == 0 && !string.IsNullOrWhiteSpace(rs)) + { + GitVersionString = rs.Trim(); + + var match = REG_GIT_VERSION().Match(GitVersionString); + if (match.Success) + { + var major = int.Parse(match.Groups[1].Value); + var minor = int.Parse(match.Groups[2].Value); + var build = int.Parse(match.Groups[3].Value); + GitVersion = new Version(major, minor, build); + GitVersionString = GitVersionString.Substring(11).Trim(); + } + } + } + catch + { + // Ignore errors + } + + proc.Close(); + } + + [GeneratedRegex(@"^git version[\s\w]*(\d+)\.(\d+)[\.\-](\d+).*$")] + private static partial Regex REG_GIT_VERSION(); + private static IBackend _backend = null; + private static string _gitExecutable = string.Empty; } } diff --git a/src/Native/Windows.cs b/src/Native/Windows.cs index 48fbb287..10f2970a 100644 --- a/src/Native/Windows.cs +++ b/src/Native/Windows.cs @@ -26,9 +26,21 @@ namespace SourceGit.Native internal string szCSDVersion; } - [DllImport("ntdll")] + [StructLayout(LayoutKind.Sequential)] + internal struct MARGINS + { + public int cxLeftWidth; + public int cxRightWidth; + public int cyTopHeight; + public int cyBottomHeight; + } + + [DllImport("ntdll.dll")] private static extern int RtlGetVersion(ref RTL_OSVERSIONINFOEX lpVersionInformation); + [DllImport("dwmapi.dll")] + private static extern int DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS margins); + [DllImport("shlwapi.dll", CharSet = CharSet.Unicode, SetLastError = false)] private static extern bool PathFindOnPath([In, Out] StringBuilder pszFile, [In] string[] ppszOtherDirs); @@ -202,10 +214,12 @@ namespace SourceGit.Native private void FixWindowFrameOnWin10(Window w) { - if (w.WindowState == WindowState.Maximized || w.WindowState == WindowState.FullScreen) - w.SystemDecorations = SystemDecorations.Full; - else if (w.WindowState == WindowState.Normal) - w.SystemDecorations = SystemDecorations.BorderOnly; + var platformHandle = w.TryGetPlatformHandle(); + if (platformHandle == null) + return; + + var margins = new MARGINS { cxLeftWidth = 1, cxRightWidth = 1, cyTopHeight = 1, cyBottomHeight = 1 }; + DwmExtendFrameIntoClientArea(platformHandle.Handle, ref margins); } #region EXTERNAL_EDITOR_FINDER diff --git a/src/Resources/Icons.axaml b/src/Resources/Icons.axaml index 3eeb4b41..c0c9d8ff 100644 --- a/src/Resources/Icons.axaml +++ b/src/Resources/Icons.axaml @@ -7,7 +7,6 @@ M832 64H192c-18 0-32 14-32 32v832c0 18 14 32 32 32h640c18 0 32-14 32-32V96c0-18-14-32-32-32zM736 596 624 502 506 596V131h230v318z M757 226a143 143 0 00-55 276 96 96 0 01-88 59h-191a187 187 0 00-96 27V312a143 143 0 10-96 0v399a143 143 0 10103 2 96 96 0 0188-59h191a191 191 0 00187-151 143 143 0 00-43-279zM280 130a48 48 0 110 96 48 48 0 010-96zm0 764a48 48 0 110-96 48 48 0 010 96zM757 417a48 48 0 110-96 48 48 0 010 96z M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z - M378 116l265 0 0 47-265 0 0-47ZM888 116 748 116l0 47 124 0c18 0 33 15 33 33l0 93L115 290l0-93c0-18 15-33 33-33l124 0 0-47L132 116c-35 0-64 29-64 64l0 714c0 35 29 64 64 64l757 0c35 0 64-29 64-64l-0-714C952 145 924 116 888 116zM905 337l0 540c0 18-15 33-33 33L148 910c-18 0-33-15-33-33L115 337 905 337zM301 65l47 0 0 170-47 0 0-170ZM673 65l47 0 0 170-47 0 0-170ZM358 548l0 231 53 0L411 459l-35 0-3 4c-18 26-41 49-70 68l-4 3 0 54 13-8C331 569 346 559 358 548zM618 727c-10 6-24 8-42 5-16-3-28-18-35-46l-2-9-48 13 2 8c6 30 18 52 36 65 17 13 36 20 55 21 3 0 7 0 10 0 15 0 28-2 40-7 14-6 27-13 37-23 10-10 18-22 23-37 5-14 8-28 8-42 1-14-1-27-4-39l-0-0c-3-12-8-24-15-36-7-13-19-23-35-30-15-7-31-11-47-11-11-0-23 1-36 5 4-15 8-32 11-52l114 0 0-49L536 464l-1 7c-25 116-32 145-33 150l-3 10 46 5 3-4c8-11 18-18 31-21 13-3 25-3 35-0 10 3 18 9 24 18 7 9 10 20 11 34 1 14-2 26-6 37C636 711 629 720 618 727z M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z M747 467c29 0 56 4 82 12v-363c0-47-38-84-84-84H125c-47 0-84 38-84 84v707c0 47 38 84 84 84h375a287 287 0 01-43-152c0-160 129-289 289-289zm-531-250h438c19 0 34 15 34 34s-15 34-34 34H216c-19 0-34-15-34-34s15-34 34-34zm0 179h263c19 0 34 15 34 34s-15 34-34 34H216c-19 0-34-15-34-34s15-34 34-34zm131 247h-131c-19 0-34-15-34-34s15-34 34-34h131c19 0 34 15 34 34s-15 34-34 34zM747 521c-130 0-236 106-236 236S617 992 747 992s236-106 236-236S877 521 747 521zm11 386v-65h-130c-12 0-22-10-22-22s10-22 22-22h260l-130 108zm108-192H606l130-108v65h130c12 0 22 10 22 22s-10 22-22 22z M529 511c115 0 212 79 239 185h224a62 62 0 017 123l-7 0-224 0a247 247 0 01-479 0H65a62 62 0 01-7-123l7-0h224a247 247 0 01239-185zm0 124a124 124 0 100 247 124 124 0 000-247zm0-618c32 0 58 24 61 55l0 7V206c89 11 165 45 225 103a74 74 0 0122 45l0 9v87a62 62 0 01-123 7l-0-7v-65l-6-4c-43-33-97-51-163-53l-17-0c-74 0-133 18-180 54l-6 4v65a62 62 0 01-55 61l-7 0a62 62 0 01-61-55l-0-7V362c0-20 8-39 23-53 60-58 135-92 224-103V79c0-34 28-62 62-62z @@ -63,9 +62,9 @@ M412 66C326 132 271 233 271 347c0 17 1 34 4 50-41-48-98-79-162-83a444 444 0 00-46 196c0 207 142 382 337 439h2c19 0 34 15 34 33 0 11-6 21-14 26l1 14C183 973 0 763 0 511 0 272 166 70 393 7A35 35 0 01414 0c19 0 34 15 34 33a33 33 0 01-36 33zm200 893c86-66 141-168 141-282 0-17-1-34-4-50 41 48 98 79 162 83a444 444 0 0046-196c0-207-142-382-337-439h-2a33 33 0 01-34-33c0-11 6-21 14-26L596 0C841 51 1024 261 1024 513c0 239-166 441-393 504A35 35 0 01610 1024a33 33 0 01-34-33 33 33 0 0136-33zM512 704a192 192 0 110-384 192 192 0 010 384z M512 64A447 447 0 0064 512c0 248 200 448 448 448s448-200 448-448S760 64 512 64zM218 295h31c54 0 105 19 145 55 13 12 13 31 3 43a35 35 0 01-22 10 36 36 0 01-21-7 155 155 0 00-103-39h-31a32 32 0 01-31-31c0-18 13-31 30-31zm31 433h-31a32 32 0 01-31-31c0-16 13-31 31-31h31A154 154 0 00403 512 217 217 0 01620 295h75l-93-67a33 33 0 01-7-43 33 33 0 0143-7l205 148-205 148a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67H620a154 154 0 00-154 154c0 122-97 220-217 220zm390 118a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67h-75c-52 0-103-19-143-54-12-12-13-31-1-43a30 30 0 0142-3 151 151 0 00102 39h75L602 599a33 33 0 01-7-43 33 33 0 0143-7l205 148-203 151z M922 39H102A65 65 0 0039 106v609a65 65 0 0063 68h94v168a34 34 0 0019 31 30 30 0 0012 3 30 30 0 0022-10l182-192H922a65 65 0 0063-68V106A65 65 0 00922 39zM288 378h479a34 34 0 010 68H288a34 34 0 010-68zm0-135h479a34 34 0 010 68H288a34 34 0 010-68zm0 270h310a34 34 0 010 68H288a34 34 0 010-68z - M875 117H149C109 117 75 151 75 192v640c0 41 34 75 75 75h725c41 0 75-34 75-75V192c0-41-34-75-75-75zM139 832V192c0-6 4-11 11-11h331v661H149c-6 0-11-4-11-11zm747 0c0 6-4 11-11 11H544v-661H875c6 0 11 4 11 11v640z - M875 117H149C109 117 75 151 75 192v640c0 41 34 75 75 75h725c41 0 75-34 75-75V192c0-41-34-75-75-75zm-725 64h725c6 0 11 4 11 11v288h-747V192c0-6 4-11 11-11zm725 661H149c-6 0-11-4-11-11V544h747V832c0 6-4 11-11 11z + M875 117H149C109 117 75 151 75 192v640c0 41 34 75 75 75h725c41 0 75-34 75-75V192c0-41-34-75-75-75zM139 832V192c0-6 4-11 11-11h331v661H149c-6 0-11-4-11-11zm747 0c0 6-4 11-11 11H544v-661H875c6 0 11 4 11 11v640z M40 9 15 23 15 31 9 28 9 20 34 5 24 0 0 14 0 34 25 48 25 28 49 14zM26 29 26 48 49 34 49 15z + M892 251c-5-11-18-18-30-18H162c-12 0-23 7-30 18-5 11-5 26 2 35l179 265v320c0 56 44 102 99 102h200c55 0 99-46 99-102v-320l179-266c9-11 9-24 4-34zm-345 540c0 18-14 35-34 35-18 0-34-14-34-35v-157c0-18 14-34 34-34 18 0 34 14 34 34v157zM512 205c18 0 34-14 34-35V87c0-20-16-35-34-35s-34 14-34 35v84c1 20 16 34 34 34zM272 179c5 18 23 30 40 24 17-6 28-24 23-42l-25-51c-5-18-23-30-40-24s-28 24-23 42L272 179zM777 127c5-18-6-36-23-42-17-6-35 5-40 24l-25 51c-5 18 6 37 23 42 17 6 35-5 40-24l25-52z M416 192m32 0 448 0q32 0 32 32l0 0q0 32-32 32l-448 0q-32 0-32-32l0 0q0-32 32-32ZM416 448m32 0 448 0q32 0 32 32l0 0q0 32-32 32l-448 0q-32 0-32-32l0 0q0-32 32-32ZM416 704m32 0 448 0q32 0 32 32l0 0q0 32-32 32l-448 0q-32 0-32-32l0 0q0-32 32-32ZM96 320l128-192 128 192h-256zM96 640l128 192 128-192h-256zM190 320h64v320H190z M408 232C408 210 426 192 448 192h416a40 40 0 110 80H448a40 40 0 01-40-40zM408 512c0-22 18-40 40-40h416a40 40 0 110 80H448A40 40 0 01408 512zM448 752A40 40 0 00448 832h416a40 40 0 100-80H448zM32 480l132 0 0-128 64 0 0 128 132 0 0 64-132 0 0 128-64 0 0-128-132 0Z M408 232C408 210 426 192 448 192h416a40 40 0 110 80H448a40 40 0 01-40-40zM408 512c0-22 18-40 40-40h416a40 40 0 110 80H448A40 40 0 01408 512zM448 752A40 40 0 00448 832h416a40 40 0 100-80H448zM32 480l328 0 0 64-328 0Z @@ -77,6 +76,7 @@ M192 192m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM192 512m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM192 832m-64 0a64 64 0 1 0 128 0 64 64 0 1 0-128 0ZM864 160H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 480H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32zM864 800H352c-17.7 0-32 14.3-32 32s14.3 32 32 32h512c17.7 0 32-14.3 32-32s-14.3-32-32-32z M824 645V307c0-56-46-102-102-102h-102V102l-154 154 154 154V307h102v338c-46 20-82 67-82 123 0 72 61 133 133 133 72 0 133-61 133-133 0-56-36-102-82-123zm-51 195c-41 0-72-31-72-72s31-72 72-72c41 0 72 31 72 72s-31 72-72 72zM384 256c0-72-61-133-133-133-72 0-133 61-133 133 0 56 36 102 82 123v266C154 666 118 712 118 768c0 72 61 133 133 133 72 0 133-61 133-133 0-56-36-102-82-123V379C348 358 384 312 384 256zM323 768c0 41-31 72-72 72-41 0-72-31-72-72s31-72 72-72c41 0 72 31 72 72zM251 328c-41 0-72-31-72-72s31-72 72-72c41 0 72 31 72 72s-31 72-72 72z M896 64H128C96 64 64 96 64 128v768c0 32 32 64 64 64h768c32 0 64-32 64-64V128c0-32-32-64-64-64z m-64 736c0 16-17 32-32 32H224c-18 0-32-12-32-32V224c0-16 16-32 32-32h576c15 0 32 16 32 32v576zM512 384c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z + M0 512M1024 512M512 0M512 1024M813 448c-46 0-83 37-83 83 0 46 37 83 83 83 46 0 83-37 83-83 0-46-37-83-83-83zM211 448C165 448 128 485 128 531c0 46 37 83 83 83 46 0 83-37 83-83 0-46-37-83-83-83zM512 448c-46 0-83 37-83 83 0 46 37 83 83 83 46 0 83-37 83-83C595 485 558 448 512 448z M299 811 299 725 384 725 384 811 299 811M469 811 469 725 555 725 555 811 469 811M640 811 640 725 725 725 725 811 640 811M299 640 299 555 384 555 384 640 299 640M469 640 469 555 555 555 555 640 469 640M640 640 640 555 725 555 725 640 640 640M299 469 299 384 384 384 384 469 299 469M469 469 469 384 555 384 555 469 469 469M640 469 640 384 725 384 725 469 640 469M299 299 299 213 384 213 384 299 299 299M469 299 469 213 555 213 555 299 469 299M640 299 640 213 725 213 725 299 640 299Z M64 363l0 204 265 0L329 460c0-11 6-18 14-20C349 437 355 437 362 441c93 60 226 149 226 149 33 22 34 60 0 82 0 0-133 89-226 149-14 9-32-3-32-18l-1-110L64 693l0 117c0 41 34 75 75 75l746 0c41 0 75-34 75-74L960 364c0-0 0-1 0-1L64 363zM64 214l0 75 650 0-33-80c-16-38-62-69-103-69l-440 0C97 139 64 173 64 214z M683 409v204L1024 308 683 0v191c-413 0-427 526-427 526c117-229 203-307 427-307zm85 492H102V327h153s38-63 114-122H51c-28 0-51 27-51 61v697c0 34 23 61 51 61h768c28 0 51-27 51-61V614l-102 100v187z @@ -87,7 +87,7 @@ M432 0h160c27 0 48 21 48 48v336h175c36 0 53 43 28 68L539 757c-15 15-40 15-55 0L180 452c-25-25-7-68 28-68H384V48c0-27 21-48 48-48zm592 752v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h293l98 98c40 40 105 40 145 0l98-98H976c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z M592 768h-160c-27 0-48-21-48-48V384h-175c-36 0-53-43-28-68L485 11c15-15 40-15 55 0l304 304c25 25 7 68-28 68H640v336c0 27-21 48-48 48zm432-16v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h272v16c0 62 50 112 112 112h160c62 0 112-50 112-112v-16h272c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z M277 85a149 149 0 00-43 292v230a32 32 0 0064 0V555h267A160 160 0 00725 395v-12a149 149 0 10-64-5v17a96 96 0 01-96 96H299V383A149 149 0 00277 85zM228 720a32 32 0 00-37-52 150 150 0 00-53 68 32 32 0 1060 23 85 85 0 0130-39zm136-52a32 32 0 00-37 52 86 86 0 0130 39 32 32 0 1060-23 149 149 0 00-53-68zM204 833a32 32 0 10-55 32 149 149 0 0063 58 32 32 0 0028-57 85 85 0 01-36-33zm202 32a32 32 0 00-55-32 85 85 0 01-36 33 32 32 0 0028 57 149 149 0 0063-58z - M854 234a171 171 0 00-171 171v51c13-5 28-7 43-7h35a136 136 0 01136 136v93a198 198 0 01-198 198 101 101 0 01-101-101V405a256 256 0 01256-256h21a21 21 0 0121 21v43a21 21 0 01-21 21h-21zM213 456c13-5 28-7 43-7h35a136 136 0 01136 136v93a198 198 0 01-198 198 101 101 0 01-101-101V405a256 256 0 01256-256h21a21 21 0 0121 21v43a21 21 0 01-21 21h-21a171 171 0 00-171 171v51z + M467 556c0-0 0-1 0-1C467 555 467 556 467 556zM467 556c0-0 0-0 0-0C467 556 467 556 467 556zM467 556c-0 0-0 0-0 0C467 557 467 557 467 556zM468 549C468 532 468 541 468 549L468 549zM468 549c0 1-0 1-0 2C468 551 468 550 468 549zM468 552c-0 1-0 2-0 3C467 554 468 553 468 552zM736 549C736 532 736 541 736 549L736 549zM289 378l0 179 89 0c-1 80-89 89-89 89l45 45c0 0 129-15 134-134L467 378 289 378zM959 244l0 536c0 99-80 179-179 179L244 959c-99 0-179-80-179-179L65 244c0-99 80-179 179-179l536 0C879 65 959 145 959 244zM869 289c0-74-60-134-134-134L289 155c-74 0-134 60-134 134l0 447c0 74 60 134 134 134l447 0c74 0 134-60 134-134L869 289zM557 557l89 0c-1 80-89 89-89 89l45 45c0 0 129-15 134-134L735 378 557 378 557 557z m224 154a166 166 0 00-166 166v192a166 166 0 00166 166h64v-76h-64a90 90 0 01-90-90v-192a90 90 0 0190-90h320a90 90 0 0190 90v192a90 90 0 01-90 90h-128v77h128a166 166 0 00166-167v-192a166 166 0 00-166-166h-320zm166 390a90 90 0 0190-90h128v-76h-128a166 166 0 00-166 166v192a166 166 0 00166 166h320a166 166 0 00166-166v-192a166 166 0 00-166-166h-64v77h64a90 90 0 0190 90v192a90 90 0 01-90 90h-320a90 90 0 01-90-90v-192z M512 128M706 302a289 289 0 00-173 44 27 27 0 1029 46 234 234 0 01125-36c23 0 45 3 66 9 93 28 161 114 161 215C914 704 813 805 687 805H337C211 805 110 704 110 580c0-96 61-178 147-210C282 263 379 183 495 183a245 245 0 01210 119z M364 512h67v108h108v67h-108v108h-67v-108h-108v-67h108v-108zm298-64A107 107 0 01768 555C768 614 720 660 660 660h-108v-54h-108v-108h-94v108h-94c4-21 22-47 44-51l-1-12a75 75 0 0171-75a128 128 0 01239-7a106 106 0 0153-14z diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index ff8a1d97..96dced8d 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -67,8 +67,7 @@ Push ${0}$ Rebase ${0}$ auf ${1}$... Benenne ${0}$ um... - Setze verfolgten Branch - Upstream Verfolgung aufheben + Setze verfolgten Branch... Branch Vergleich Bytes ABBRECHEN @@ -351,7 +350,6 @@ Verfolge alle '{0}' Dateien Verfolge alle *{0} Dateien Verlauf - Wechsle zwischen horizontalem und vertikalem Layout AUTOR AUTOR ZEITPUNKT GRAPH & COMMIT-NACHRICHT @@ -369,7 +367,7 @@ Zum vorherigen Tab wechseln Zum nächsten Tab wechseln Neuen Tab erstellen - Einstellungen öffnen + Einstellungen öffnen REPOSITORY Gestagte Änderungen committen Gestagte Änderungen committen und pushen @@ -443,58 +441,58 @@ Vor {0} Monaten Leztes Jahr Vor {0} Jahren - Einstellungen - OPEN AI - Analysierung des Diff Befehl - API Schlüssel - Generiere Nachricht Befehl - Name - Server - Modell - DARSTELLUNG - Standardschriftart - Schriftgröße - Standard - Texteditor - Monospace-Schriftart - Verwende die Monospace-Schriftart nur im Texteditor - Design - Design-Anpassungen - Fixe Tab-Breite in Titelleiste - Verwende nativen Fensterrahmen - DIFF/MERGE TOOL - Installationspfad - Installationspfad zum Diff/Merge Tool - Tool - ALLGEMEIN - Beim Starten nach Updates suchen - Sprache - Commit-Historie - Zeige Autor Zeitpunkt anstatt Commit Zeitpunkt - Zeige Nachfolger in den Commit Details - Längenvorgabe für Commit-Nachrichten - GIT - Aktiviere Auto-CRLF - Klon Standardordner - Benutzer Email - Globale Git Benutzer Email - Installationspfad - 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 - Benutzer Signierungsschlüssel - GPG Benutzer Signierungsschlüssel - EINBINDUNGEN - SHELL/TERMINAL - Shell/Terminal - Pfad + Einstellungen + OPEN AI + Analysierung des Diff Befehl + API Schlüssel + Generiere Nachricht Befehl + Name + Server + Modell + DARSTELLUNG + Standardschriftart + Schriftgröße + Standard + Texteditor + Monospace-Schriftart + Verwende die Monospace-Schriftart nur im Texteditor + Design + Design-Anpassungen + Fixe Tab-Breite in Titelleiste + Verwende nativen Fensterrahmen + DIFF/MERGE TOOL + Installationspfad + Installationspfad zum Diff/Merge Tool + Tool + ALLGEMEIN + Beim Starten nach Updates suchen + Sprache + Commit-Historie + Zeige Autor Zeitpunkt anstatt Commit Zeitpunkt + Zeige Nachfolger in den Commit Details + Längenvorgabe für Commit-Nachrichten + GIT + Aktiviere Auto-CRLF + Klon Standardordner + Benutzer Email + Globale Git Benutzer Email + Installationspfad + 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 + Benutzer Signierungsschlüssel + GPG Benutzer Signierungsschlüssel + EINBINDUNGEN + SHELL/TERMINAL + Shell/Terminal + Pfad Remote löschen Ziel: Worktrees löschen @@ -565,7 +563,6 @@ Aufheben Im Graph ausblenden Im Graph filtern - Sortierungsmodus wechseln Commit Zeitpunkt (--date-order) Topologie (--topo-order) LOKALE BRANCHES diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index f47454aa..1b0059a5 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -64,8 +64,7 @@ Push ${0}$ Rebase ${0}$ on ${1}$... Rename ${0}$... - Set Tracking Branch - Unset Upstream + Set Tracking Branch... Branch Compare Bytes CANCEL @@ -162,10 +161,12 @@ Enable --prune on fetch Enable --signoff for commit ISSUE TRACKER + Add Sample Gitee Issue Rule + Add Sample Gitee Pull Request Rule Add Sample Github Rule - Add Sample Jira Rule Add Sample GitLab Issue Rule Add Sample GitLab Merge Request Rule + Add Sample Jira Rule New Rule Issue Regex Expression: Rule Name: @@ -261,7 +262,7 @@ All local changes in working copy. Changes: Include ignored files - Total {0} changes will be discard + {0} changes will be discarded You can't undo this action!!! Bookmark: New Name: @@ -348,7 +349,6 @@ Track files named '{0}' Track all *{0} files HISTORY - Switch Horizontal/Vertical Layout AUTHOR AUTHOR TIME GRAPH & SUBJECT @@ -366,7 +366,7 @@ Go to previous page Go to next page Create new page - Open preference dialog + Open Preferences dialog REPOSITORY Commit staged changes Commit and push staged changes @@ -419,7 +419,7 @@ Move Repository Node Select parent node for: Name: - Git has NOT been configured. Please to go [Preference] and configure it first. + Git has NOT been configured. Please to go [Preferences] and configure it first. Open Data Storage Directory Open with... Optional. @@ -440,65 +440,66 @@ {0} months ago Last year {0} years ago - Preference - AI - Analyze Diff Prompt - API Key - Generate Subject Prompt - Model - Name - Server - APPEARANCE - Default Font - Font Size - Default - Editor - Monospace Font - Only use monospace font in text editor - Theme - Theme Overrides - Use fixed tab width in titlebar - Use native window frame - DIFF/MERGE TOOL - Install Path - Input path for diff/merge tool - Tool - GENERAL - Check for updates on startup - Date Format - Language - History Commits - Show author time instead of commit time in graph - Show children in the commit details - Subject Guide Length - GIT - Enable Auto CRLF - Default Clone Dir - User Email - Global git user email - Install Path - User Name - Global git user name - Git version - Git (>= 2.23.0) is required by this app - GPG SIGNING - Commit GPG signing - Tag GPG signing - GPG Format - Program Install Path - Input path for installed gpg program - User Signing Key - User's gpg signing key - INTEGRATION - SHELL/TERMINAL - Shell/Terminal - Path + Preferences + AI + Analyze Diff Prompt + API Key + Generate Subject Prompt + Model + Name + Server + APPEARANCE + Default Font + Font Size + Default + Editor + Monospace Font + Only use monospace font in text editor + Theme + Theme Overrides + Use fixed tab width in titlebar + Use native window frame + DIFF/MERGE TOOL + Install Path + Input path for diff/merge tool + Tool + GENERAL + Check for updates on startup + Date Format + Language + History Commits + Show author time instead of commit time in graph + Show children in the commit details + Subject Guide Length + GIT + Enable Auto CRLF + Default Clone Dir + User Email + Global git user email + Install Path + Enable HTTP SSL Verify + User Name + Global git user name + Git version + Git (>= 2.23.0) is required by this app + GPG SIGNING + Commit GPG signing + Tag GPG signing + GPG Format + Program Install Path + Input path for installed gpg program + User Signing Key + User's gpg signing key + INTEGRATION + SHELL/TERMINAL + Shell/Terminal + Path Prune Remote Target: Prune Worktrees Prune worktree information in `$GIT_DIR/worktrees` Pull - Branch: + Remote Branch: Fetch all branches Into: Local Changes: @@ -563,13 +564,17 @@ Unset Hide in commit graph Filter in commit graph - Switch Order Mode + LAYOUT + Horizontal + Vertical + COMMITS ORDER Commit Date (--date-order) Topologically (--topo-order) LOCAL BRANCHES Navigate to HEAD Enable '--first-parent' Option Create Branch + Only highlight current branch in graph Open in {0} Open in External Tools Refresh @@ -589,7 +594,12 @@ UPDATE SUBMODULE TAGS NEW TAG + By Creator Date + By Name (Ascending) + By Name (Descending) + Sort Open in Terminal + Use relative time in histories WORKTREES ADD WORKTREE PRUNE @@ -617,6 +627,10 @@ Skip This Version Software Update There are currently no updates available. + Set Tracking Branch + Branch: + Unset upstream + Upstream: Copy SHA Go to Squash Commits diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 0853b896..7f6bad97 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -67,8 +67,7 @@ Push ${0}$ Rebase ${0}$ en ${1}$... Renombrar ${0}$... - Establecer Rama de Seguimiento - Desestablecer Upstream + Establecer Rama de Seguimiento... Comparar Ramas Bytes CANCELAR @@ -165,6 +164,8 @@ Habilitar --prune para fetch Habilitar --signoff para commit SEGUIMIENTO DE INCIDENCIAS + 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 Incidencias de GitLab @@ -351,7 +352,6 @@ Seguir archivos llamados '{0}' Seguir todos los archivos *{0} Historias - Cambiar a Disposición Horizontal/Vertical AUTOR HORA DEL AUTOR GRÁFICO & ASUNTO @@ -369,7 +369,7 @@ Ir a la página anterior Ir a la siguiente página Crear nueva página - Abrir diálogo de preferencias + Abrir diálogo de preferencias REPOSITORIO Commit cambios staged Commit y push cambios staged @@ -443,65 +443,67 @@ Hace {0} meses Último año Hace {0} años - Preferencias - Opciones Avanzadas - OPEN AI - Analizar Diff Prompt - Clave API - Generar Subject Prompt - Modelo - Nombre - Servidor - APARIENCIA - Fuente por defecto - Tamaño de fuente - Por defecto - Editor - Fuente Monospace - Usar solo fuente monospace en el editor de texto - Tema - Sobreescritura de temas - Usar ancho de pestaña fijo en la barra de título - Usar marco de ventana nativo - HERRAMIENTA DIFF/MERGE - Ruta de instalación - Introducir ruta para la herramienta diff/merge - Herramienta - GENERAL - Buscar actualizaciones al iniciar - Idioma - 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 - Longitud de la guía del asunto - GIT - Habilitar Auto CRLF - Directorio de clonado por defecto - Email de usuario - Email global del usuario git - Ruta de instalación - 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 - Clave de firma del usuario - Clave de firma gpg del usuario - INTEGRACIÓN - SHELL/TERMINAL - Shell/Terminal - Ruta + Preferencias + Opciones Avanzadas + OPEN AI + Analizar Diff Prompt + Clave API + Generar Subject Prompt + Modelo + Nombre + Servidor + APARIENCIA + Fuente por defecto + Tamaño de fuente + Por defecto + Editor + Fuente Monospace + Usar solo fuente monospace en el editor de texto + Tema + Sobreescritura de temas + Usar ancho de pestaña fijo en la barra de título + Usar marco de ventana nativo + HERRAMIENTA DIFF/MERGE + Ruta de instalación + Introducir ruta para la herramienta diff/merge + Herramienta + GENERAL + Buscar actualizaciones al iniciar + Formato de Fecha + Idioma + 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 + Longitud de la guía del asunto + GIT + Habilitar Auto CRLF + Directorio de clonado por defecto + Email de usuario + Email global del usuario git + 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 + Clave de firma del usuario + Clave de firma gpg del usuario + INTEGRACIÓN + SHELL/TERMINAL + Shell/Terminal + Ruta Podar Remoto Destino: Podar Worktrees Podar información de worktree en `$GIT_DIR/worktrees` Pull - Rama: + Rama Remota: Fetch todas las ramas En: Cambios Locales: @@ -566,13 +568,17 @@ Desestablecer Ocultar en el Gráfico de Commits Filtrar en el Gráfico de Commits - Cambiar Modo de Ordenación + DISPOSICIÓN + Horizontal + Vertical + ORDEN DE COMMITS Fecha de Commit (--date-order) Topológicamente (--topo-order) RAMAS LOCALES Navegar a HEAD Habilitar Opción '--first-parent' Crear Rama + Resaltar solo la rama actual en el gráfico Abrir en {0} Abrir en Herramientas Externas Refrescar @@ -592,7 +598,12 @@ ACTUALIZAR SUBMÓDULO ETIQUETAS NUEVA ETIQUETA + Por Fecha de Creación + Por Nombre (Ascendiente) + Por Nombre (Descendiente) + Sort Abrir en Terminal + Usar tiempo relativo en las historias WORKTREES AÑADIR WORKTREE PRUNE @@ -620,6 +631,10 @@ Omitir Esta Versión Actualización de Software Actualmente no hay actualizaciones disponibles. + Establecer Rama de Seguimiento + Rama: + Desestablecer upstream + Upstream: Copiar SHA Ir a Squash Commits diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 32c043d3..1bfd5284 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -61,13 +61,13 @@ Fetch ${0}$ vers ${1}$... Git Flow - Terminer ${0}$ Fusionner ${0}$ dans ${1}$... + Fusionner les {0} branches sélectionnées dans celle en cours Tirer ${0}$ Tirer ${0}$ dans ${1}$... Pousser ${0}$ Rebaser ${0}$ sur ${1}$... Renommer ${0}$... - Définir la branche de suivi - Ne plus suivre la branche distante + Définir la branche de suivi... Comparer les branches Octets ANNULER @@ -88,9 +88,11 @@ Ne rien faire Mettre en stash et réappliquer Cherry-Pick de ce commit + Ajouter la source au message de commit Commit : Commit tous les changements Ligne principale : + Habituellement, on ne peut pas cherry-pick un commit car on ne sait pas quel côté devrait être considéré comme principal. Cette option permet de rejouer les changements relatifs au parent spécifié. Cherry Pick Supprimer les stashes Vous essayez de supprimer tous les stashes. Êtes-vous sûr de vouloir continuer ? @@ -105,12 +107,15 @@ Éditeur Récupérer ce commit Cherry-Pick ce commit + Cherry-Pick ... Comparer avec HEAD Comparer avec le worktree Copier les informations Copier le SHA Action personnalisée Rebase interactif de ${0}$ ici + Fusionner dans ${0}$ + Fusionner ... Rebaser ${0}$ ici Réinitialiser ${0}$ ici Annuler le commit @@ -122,6 +127,7 @@ Rechercher les changements... FICHIERS Fichier LFS + Rechercher des fichiers... Sous-module INFORMATIONS AUTEUR @@ -159,6 +165,8 @@ Activer --prune pour fetch Activer --signoff pour commit SUIVI DES PROBLÈMES + 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 pour Incidents GitLab @@ -248,6 +256,7 @@ Coloration syntaxique Retour à la ligne Ouvrir dans l'outil de fusion + Activer la navigation par blocs Voir toutes les lignes Réduit le nombre de ligne visibles Augmente le nombre de ligne visibles @@ -269,6 +278,7 @@ Fast-Forward (sans récupération) Fetch Fetch toutes les branches distantes + Outrepasser les vérifications de refs Fetch sans les tags Remote : Récupérer les changements distants @@ -277,6 +287,7 @@ Rejeter {0} fichiers... Rejeter les changements dans les lignes sélectionnées Ouvrir l'outil de fusion externe + Résoudre en utilisant ${0}$ Enregistrer en tant que patch... Indexer Indexer {0} fichiers @@ -330,7 +341,7 @@ Verrous LFS Déverouiller Forcer le déverouillage - Prune + Elaguer Lancer `git lfs prune` pour supprimer les anciens fichier LFS du stockage local Pull Pull les objets LFS @@ -342,7 +353,6 @@ Suivre les fichiers appelés '{0}' Suivre tous les fichiers *{0} Historique - Basculer entre dispositions Horizontal/Vertical AUTEUR HEURE DE L'AUTEUR GRAPHE & SUJET @@ -355,11 +365,12 @@ Référence des raccourcis clavier GLOBAL 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 Créer une nouvelle page - Ouvrir le dialogue des préférences + Ouvrir le dialogue des préférences DÉPÔT Commit les changements de l'index Commit et pousser les changements de l'index @@ -424,62 +435,62 @@ il y a {0} mois L'an dernier il y a {0} ans - Préférences - IA - Analyser Diff Prompt - Clé d'API - Générer le sujet de Prompt - Modèle - Nom - Serveur - APPARENCE - Police par défaut - Taille de police par défaut - Taille de police de l'éditeur - Police monospace - N'utiliser que des polices monospace pour l'éditeur de texte - Thème - Dérogations de thème - Utiliser des onglets de taille fixe dans la barre de titre - Utiliser un cadre de fenêtre natif - OUTIL DIFF/MERGE - Chemin d'installation - Saisir le chemin d'installation de l'outil diff/merge - Outil - GÉNÉRAL - Vérifier les mises à jour au démarrage - Language - Historique de commits - Afficher l'heure de l'auteur au lieu de l'heure de validation dans le graphique - Guide de longueur du sujet - GIT - Activer auto CRLF - Répertoire de clônage par défaut - E-mail utilsateur - E-mail utilsateur global - Chemin d'installation - 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 - Clé de signature de l'utilisateur - Clé de signature GPG de l'utilisateur - INTEGRATION - SHELL/TERMINAL - Shell/Terminal - Chemin + Préférences + IA + Analyser Diff Prompt + Clé d'API + Générer le sujet de Prompt + Modèle + Nom + Serveur + APPARENCE + Police par défaut + Taille de police par défaut + Taille de police de l'éditeur + Police monospace + N'utiliser que des polices monospace pour l'éditeur de texte + Thème + Dérogations de thème + Utiliser des onglets de taille fixe dans la barre de titre + Utiliser un cadre de fenêtre natif + OUTIL DIFF/MERGE + Chemin d'installation + Saisir le chemin d'installation de l'outil diff/merge + Outil + GÉNÉRAL + Vérifier les mises à jour au démarrage + Language + Historique de commits + Afficher l'heure de l'auteur au lieu de l'heure de validation dans le graphique + Guide de longueur du sujet + GIT + Activer auto CRLF + Répertoire de clônage par défaut + E-mail utilsateur + E-mail utilsateur global + Chemin d'installation + 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 + Clé de signature de l'utilisateur + Clé de signature GPG de l'utilisateur + INTEGRATION + SHELL/TERMINAL + Shell/Terminal + Chemin Élaguer une branche distant Cible : Élaguer les Worktrees Élaguer les information de worktree dans `$GIT_DIR/worktrees` Pull - Branche : + Branche distante : Fetch toutes les branches Dans : Changements locaux : @@ -520,7 +531,7 @@ Editer... Fetch Ouvrir dans le navigateur - Prune + Elaguer Confirmer la suppression du Worktree Activer l'option `--force` Cible : @@ -530,7 +541,7 @@ Branche : ABORT Fetch automatique des changements depuis les dépôts... - Nettoyage(GC & Prune) + Nettoyage(GC & Elaguage) Lancer `git gc` pour ce repository. Tout effacer Configurer ce repository @@ -543,6 +554,7 @@ Naviguer vers le HEAD Activer l'option '--first-parent' Créer une branche + Mettre la branche courante en surbrillance dans le graph Ouvrir dans {0} Ouvrir dans un outil externe Rafraîchir @@ -564,7 +576,7 @@ Ouvrir dans un terminal WORKTREES AJOUTER WORKTREE - PRUNE + ELAGUER URL du repository Git Reset branche actuelle à la révision Reset Mode: diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index 18754c8e..e63a4737 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -66,8 +66,7 @@ Invia ${0}$ Riallinea ${0}$ su ${1}$... Rinomina ${0}$... - Imposta Branch di Tracciamento - Rimuovi Tracciamento + Imposta Branch di Tracciamento... Confronto Branch Byte ANNULLA @@ -344,7 +343,6 @@ Traccia file con nome '{0}' Traccia tutti i file *{0} Storico - Passa Layout Orizzontale/Verticale AUTORE ORA AUTORE GRAFICO & OGGETTO @@ -362,7 +360,7 @@ Vai alla pagina precedente Vai alla pagina successiva Crea una nuova pagina - Apri la finestra di preferenze + Apri la finestra di preferenze REPOSITORY Conferma le modifiche in fase Conferma e invia le modifiche in fase @@ -427,63 +425,63 @@ {0} mesi fa L'anno scorso {0} anni fa - Preferenze - AI - Analizza il Prompt Differenza - Chiave API - Genera Prompt Soggetto - Modello - Nome - Server - ASPETTO - Font Predefinito - Font Size - Dimensione Font Predefinita - Dimensione Font Editor - Font Monospaziato - Usa solo font monospaziato nell'editor - Tema - Sostituzioni Tema - Usa larghezza fissa per i tab nella barra del titolo - Usa cornice finestra nativa - STRUMENTO DI DIFFERENZA/UNIONE - Percorso Installazione - Inserisci il percorso per lo strumento di differenza/unione - Strumento - GENERALE - Controlla aggiornamenti all'avvio - Lingua - Numero massimo di commit nella cronologia - Mostra l'orario dell'autore anziché quello del commit nel grafico - Lunghezza Guida Soggetto - GIT - Abilita Auto CRLF - Cartella predefinita per cloni - Email Utente - Email globale utente Git - Percorso Installazione - Nome Utente - Nome globale utente Git - Versione di Git - Git (>= 2.23.0) è richiesto da questa applicazione - FIRMA GPG - Firma GPG per commit - Firma GPG per tag - Formato GPG - Percorso Programma Installato - Inserisci il percorso per il programma GPG installato - Chiave Firma Utente - Chiave GPG dell'utente per la firma - INTEGRAZIONE - SHELL/TERMINALE - Shell/Terminale - Percorso + Preferenze + AI + Analizza il Prompt Differenza + Chiave API + Genera Prompt Soggetto + Modello + Nome + Server + ASPETTO + Font Predefinito + Font Size + Dimensione Font Predefinita + Dimensione Font Editor + Font Monospaziato + Usa solo font monospaziato nell'editor + Tema + Sostituzioni Tema + Usa larghezza fissa per i tab nella barra del titolo + Usa cornice finestra nativa + STRUMENTO DI DIFFERENZA/UNIONE + Percorso Installazione + Inserisci il percorso per lo strumento di differenza/unione + Strumento + GENERALE + Controlla aggiornamenti all'avvio + Lingua + Numero massimo di commit nella cronologia + Mostra l'orario dell'autore anziché quello del commit nel grafico + Lunghezza Guida Soggetto + GIT + Abilita Auto CRLF + Cartella predefinita per cloni + Email Utente + Email globale utente Git + Percorso Installazione + Nome Utente + Nome globale utente Git + Versione di Git + Git (>= 2.23.0) è richiesto da questa applicazione + FIRMA GPG + Firma GPG per commit + Firma GPG per tag + Formato GPG + Percorso Programma Installato + Inserisci il percorso per il programma GPG installato + Chiave Firma Utente + Chiave GPG dell'utente per la firma + INTEGRAZIONE + SHELL/TERMINALE + Shell/Terminale + Percorso Potatura Remota Destinazione: Potatura Worktrees Potatura delle informazioni di worktree in `$GIT_DIR/worktrees` Pull - Branch: + Branch Remoto: Recupera tutti i branch In: Modifiche Locali: diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index d72dd370..5d29caca 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -91,8 +91,7 @@ Subir ${0}$ Rebase ${0}$ em ${1}$... Renomear ${0}$... - Definir Branch de Rastreamento - Remover Upstream + Definir Branch de Rastreamento... Comparação de Branches Bytes CANCELAR @@ -368,7 +367,6 @@ Rastrear arquivos nomeados '{0}' Rastrear todos os arquivos *{0} Históricos - Alternar Layout Horizontal/Vertical AUTOR DATA DO AUTOR GRÁFICO & ASSUNTO @@ -385,7 +383,7 @@ Ir para a página anterior Ir para a próxima página Criar nova página - Abrir diálogo de preferências + Abrir diálogo de preferências REPOSITÓRIO Commitar mudanças preparadas Commitar e enviar mudanças preparadas @@ -450,63 +448,63 @@ {0} meses atrás Ano passado {0} anos atrás - Preferências - INTELIGÊNCIA ARTIFICIAL - Prompt para Analisar Diff - Chave da API - Prompt para Gerar Título - Modelo - Nome - Servidor - APARÊNCIA - Fonte Padrão - Tamanho da Fonte - Padrão - Editor - Fonte Monoespaçada - Usar fonte monoespaçada apenas no editor de texto - Tema - Substituições de Tema - Usar largura fixa de aba na barra de título - Usar moldura de janela nativa - FERRAMENTA DE DIFF/MERGE - Caminho de Instalação - Insira o caminho para a ferramenta de diff/merge - Ferramenta - GERAL - Verificar atualizações na inicialização - Idioma - Commits do Histórico - Exibir data do autor em vez da data do commit no gráfico - Comprimento do Guia de Assunto - GIT - Habilitar Auto CRLF - Diretório de Clone Padrão - Email do Usuário - Email global do usuário git - 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 - Chave de Assinatura do Usuário - Chave de assinatura gpg do usuário - INTEGRAÇÃO - SHELL/TERMINAL - Shell/Terminal - Caminho + Preferências + INTELIGÊNCIA ARTIFICIAL + Prompt para Analisar Diff + Chave da API + Prompt para Gerar Título + Modelo + Nome + Servidor + APARÊNCIA + Fonte Padrão + Tamanho da Fonte + Padrão + Editor + Fonte Monoespaçada + Usar fonte monoespaçada apenas no editor de texto + Tema + Substituições de Tema + Usar largura fixa de aba na barra de título + Usar moldura de janela nativa + FERRAMENTA DE DIFF/MERGE + Caminho de Instalação + Insira o caminho para a ferramenta de diff/merge + Ferramenta + GERAL + Verificar atualizações na inicialização + Idioma + Commits do Histórico + Exibir data do autor em vez da data do commit no gráfico + Comprimento do Guia de Assunto + GIT + Habilitar Auto CRLF + Diretório de Clone Padrão + Email do Usuário + Email global do usuário git + 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 + Chave de Assinatura do Usuário + Chave de assinatura gpg do usuário + INTEGRAÇÃO + SHELL/TERMINAL + Shell/Terminal + Caminho Prunar Remoto Alvo: Podar Worktrees Podar informações de worktree em `$GIT_DIR/worktrees` Puxar - Branch: + Branch Remoto: Buscar todos os branches Para: Alterações Locais: @@ -570,7 +568,6 @@ Desfazer Esconder no gráfico de commit Incluir no gráfico de commit - Alternar Modo de Ordenação Data do Commit (--date-order) Topologicamente (--topo-order) BRANCHES LOCAIS diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 45d89035..725f378c 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -67,8 +67,7 @@ Выложить ${0}$ Переместить ${0}$ на ${1}$... Переименовать ${0}$... - Отслеживать ветку - Отключить основной поток + Отслеживать ветку... Сравнение веток Байты ОТМЕНА @@ -79,8 +78,8 @@ Показывать в виде списка файлов и каталогов Показывать в виде списка путей Показывать в виде дерева файловой системы - Проверить ветку - Проверить ревизию + Переключить ветку + Переключение ревизии Предупреждение: После переключения ревизии ваша Голова (HEAD) будет отсоединена Ревизия: Ветка: @@ -91,9 +90,9 @@ Частичный выбор Добавить источник для ревизии сообщения Ревизия(и): - Фиксировать все изменения. + Ревизия всех изменений. Основной: - Обычно вы не можете выделить слияние, потому что не знаете, какую сторону слияния следует считать основной. Эта опция позволяет отобразить изменение относительно указанного родительского элемента. + Обычно вы не можете выделить слияние, потому что не знаете, какую сторону слияния следует считать основной. Эта опция позволяет отобразить изменения относительно указанного родительского элемента. Очистить отложенные Вы пытаетесь очистить все отложенные. Вы уверены, что хотите продолжить? Клонировать внешний репозиторий @@ -165,6 +164,8 @@ Внешний репозиторий по умолчанию Разрешить '--prune' при скачивании ОТСЛЕЖИВАНИЕ ПРОБЛЕМ + Добавить пример правила для тем в Gitee + Добавить пример правила запроса скачивания из Gitee Добавить пример правила для Git Добавить пример правила Jira Добавить пример правила выдачи GitLab @@ -204,7 +205,7 @@ Ничего не делать Отложить и применить повторно Имя новой ветки: - Ввести имя ветки. + Введите имя ветки. Создать локальную ветку Создать метку... Новая метка у: @@ -259,13 +260,13 @@ Показывать все строки Уменьшить количество видимых строк Увеличить количество видимых строк - ВЫБРАТЬ ФАЙЛ ДЛЯ ПРОСМОТРА ИЗМЕНЕНИЙ + ВЫБЕРИТЕ ФАЙЛ ДЛЯ ПРОСМОТРА ИЗМЕНЕНИЙ Открыть в инструменте слияния Отклонить изменения Все локальные изменения в рабочей копии. Изменения: Включить игнорируемые файлы - Всего {0} изменений будут отменены + {0} изменений будут отменены Вы не можете отменить это действие!!! Закладка: Новое имя: @@ -352,7 +353,6 @@ Отслеживать файлы с именем «{0}» Отслеживать все *{0} файлов Истории - Переключение горизонтального/вертикального расположения АВТОР ВРЕМЯ АВТОРА ГРАФ И СУБЪЕКТ @@ -370,7 +370,7 @@ Перейти на предыдущую вкладку Перейти на следующую вкладку Создать новую вкладку - Открыть диалоговое окно настроек + Открыть диалоговое окно настроек РЕПОЗИТОРИЙ Зафиксировать подготовленные изменения Зафиксировать и выложить подготовленные изменения @@ -378,7 +378,7 @@ Создать новую ветку на основе выбранной ветки Отклонить выбранные изменения Извлечение, запускается сразу - Режим доски (по-умолчанию) + Режим доски (по умолчанию) Принудительно перезагрузить репозиторий Забрать, запускается сразу Выложить, запускается сразу @@ -442,67 +442,68 @@ {0} дней назад Последний месяц {0} месяцев назад - В пролому году + В прошлом году {0} лет назад - Параметры - ОТКРЫТЬ ИИ - Ключ API - Запрос на анализ различий - Произвести запрос на тему - Модель - Имя: - Сервер - ВИД - Шрифт по умолчанию - Размер шрифта - По умолчанию - Редактор - Моноширный шрифт - В текстовом редакторе используется только моноширный шрифт - Тема - Переопределение темы - Использовать фиксированную ширину табуляции в строке заголовка. - Использовать системное окно - ИНСТРУМЕНТ РАЗЛИЧИЙ/СЛИЯНИЯ - Путь установки - Введите путь для инструмента различия/слияния - Инструмент - ОСНОВНЫЕ - Проверить обновления при старте - Формат даты - Язык - Максимальная длина истории - Показывать время автора вместо времени ревизии на графике - Показать наследника в деталях комментария - Длина темы ревизии - GIT - Включить автозавершение CRLF - Каталог клонирования по умолчанию - Электроная почта пользователя - Общая электроная почта пользователя git - Путь установки - Имя пользователя - Общее имя пользователя git - Версия Git - Для работы программы требуется версия Git (>= 2.23.0) - GPG ПОДПИСЬ - GPG подпись ревизии - GPG подпись метки - Формат GPG - Путь установки программы - Введите путь для установленной программы GPG - Ключ подписи пользователя - Ключ GPG подписи пользователя - ВНЕДРЕНИЕ - ОБОЛОЧКА/ТЕРМИНАЛ - Оболочка/Терминал - Путь + Параметры + ОТКРЫТЬ ИИ + Ключ API + Запрос на анализ различий + Произвести запрос на тему + Модель + Имя: + Сервер + ВИД + Шрифт по умолчанию + Размер шрифта + По умолчанию + Редактор + Моноширный шрифт + В текстовом редакторе используется только моноширный шрифт + Тема + Переопределение темы + Использовать фиксированную ширину табуляции в строке заголовка. + Использовать системное окно + ИНСТРУМЕНТ РАЗЛИЧИЙ/СЛИЯНИЯ + Путь установки + Введите путь для инструмента различия/слияния + Инструмент + ОСНОВНЫЕ + Проверить обновления при старте + Формат даты + Язык + Максимальная длина истории + Показывать время автора вместо времени ревизии на графике + Показать наследника в деталях комментария + Длина темы ревизии + GIT + Включить автозавершение CRLF + Каталог клонирования по умолчанию + Электроная почта пользователя + Общая электроная почта пользователя git + Путь установки + Разрешить верификацию HTTP SSL + Имя пользователя + Общее имя пользователя git + Версия Git + Для работы программы требуется версия Git (>= 2.23.0) + GPG ПОДПИСЬ + GPG подпись ревизии + GPG подпись метки + Формат GPG + Путь установки программы + Введите путь для установленной программы GPG + Ключ подписи пользователя + Ключ GPG подписи пользователя + ВНЕДРЕНИЕ + ОБОЛОЧКА/ТЕРМИНАЛ + Оболочка/Терминал + Путь Удалить внешний репозиторий Цель: Удалить рабочий каталог Информация об обрезке рабочего каталога в «$GIT_DIR/worktrees» Забрать - Ветка: + Ветка внешнего репозитория: Извлечь все ветки В: Локальные изменения: @@ -568,13 +569,17 @@ Скрыть в графе ревизии Фильтр в графе ревизии ОТФИЛЬТРОВАНО: - Переключить режим запроса + РАСПОЛОЖЕНИЕ + Горизонтально + Вертикально + ЗАПРОС РЕВИЗИЙ Дата ревизии (--date-order) Топологически (--topo-order) ЛОКАЛЬНЫЕ ВЕТКИ Навигация по ГОЛОВЕ (HEAD) Включить опцию --first-parent Создать ветку + Выделять только текущую ветку на графике Открыть в {0} Открыть в расширенном инструменте Обновить @@ -594,7 +599,12 @@ ОБНОВИТЬ ПОДМОДУЛЬ МЕТКИ НОВАЯ МЕТКА + По дате создания + По имени (по возрастанию) + По имени (по убыванию) + Сортировать Открыть в терминале + Использовать относительное время в историях РАБОЧИЕ КАТАЛОГИ ДОБАВИТЬ РАБОЧИЙ КАТАЛОГ ОБРЕЗАТЬ @@ -607,8 +617,8 @@ Отменить ревизию Ревизия: Отмена ревизии - Переформулировать сообщение ревизии - Использовать «Shift+Enter» для ввода новой строки. «Enter» - это горячая клавиша кнопки OK + Изменить комментарий ревизии + Используйте «Shift+Enter» для ввода новой строки. «Enter» - это горячая клавиша кнопки «OK» Запуск. Подождите пожалуйста... СОХРАНИТЬ Сохранить как... @@ -624,6 +634,10 @@ Пропустить эту версию Обновление ПО В настоящее время обновления недоступны. + Отслеживать ветку + Ветка: + Снять основную ветку + Основная ветка: Втиснуть ревизии В: Приватный ключ SSH: @@ -725,4 +739,4 @@ Заблокировать Удалить Разблокировать - \ No newline at end of file + diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index 5780f140..81d0d80f 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -67,8 +67,7 @@ 推送(push)${0}$ 变基(rebase) ${0}$ 分支至 ${1}$... 重命名 ${0}$... - 切换上游分支 - 取消追踪 + 切换上游分支 ... 分支比较 字节 取 消 @@ -165,10 +164,12 @@ 提交信息追加署名 (--signoff) 拉取更新时启用修剪(--prune) ISSUE追踪 + 新增匹配Gitee议题规则 + 新增匹配Gitee合并请求规则 新增匹配Github Issue规则 - 新增匹配Jira规则 新增匹配GitLab议题规则 新增匹配GitLab合并请求规则 + 新增匹配Jira规则 新增自定义规则 匹配ISSUE的正则表达式 : 规则名 : @@ -351,7 +352,6 @@ 跟踪名为'{0}'的文件 跟踪所有 *{0} 文件 历史记录 - 切换横向/纵向显示 作者 修改时间 路线图与主题 @@ -369,7 +369,7 @@ 切换到上一个页面 切换到下一个页面 新建页面 - 打开偏好设置面板 + 打开偏好设置面板 仓库页面快捷键 提交暂存区更改 提交暂存区更改并推送 @@ -443,60 +443,61 @@ {0}个月前 一年前 {0}年前 - 偏好设置 - AI - Analyze Diff Prompt - API密钥 - Generate Subject Prompt - 模型 - 配置名称 - 服务地址 - 外观配置 - 缺省字体 - 字体大小 - 默认 - 代码编辑器 - 代码字体大小 - 等宽字体 - 仅在文本编辑器中使用等宽字体 - 主题 - 主题自定义 - 主标签使用固定宽度 - 使用系统默认窗体样式 - 对比/合并工具 - 安装路径 - 填写工具可执行文件所在位置 - 工具 - 通用配置 - 启动时检测软件更新 - 日期时间格式 - 显示语言 - 最大历史提交数 - 在提交路线图中显示修改时间而非提交时间 - 在提交详情页中显示子提交列表 - SUBJECT字数检测 - GIT配置 - 自动换行转换 - 默认克隆路径 - 邮箱 - 默认GIT用户邮箱 - 安装路径 - 用户名 - 默认GIT用户名 - Git 版本 - 本软件要求GIT最低版本为2.23.0 - GPG签名 - 启用提交签名 - 启用标签签名 - 签名格式 - 签名程序位置 - 签名程序所在路径 - 用户签名KEY - 输入签名提交所使用的KEY - 第三方工具集成 - 终端/SHELL - 终端/SHELL - 安装路径 + 偏好设置 + AI + Analyze Diff Prompt + API密钥 + Generate Subject Prompt + 模型 + 配置名称 + 服务地址 + 外观配置 + 缺省字体 + 字体大小 + 默认 + 代码编辑器 + 代码字体大小 + 等宽字体 + 仅在文本编辑器中使用等宽字体 + 主题 + 主题自定义 + 主标签使用固定宽度 + 使用系统默认窗体样式 + 对比/合并工具 + 安装路径 + 填写工具可执行文件所在位置 + 工具 + 通用配置 + 启动时检测软件更新 + 日期时间格式 + 显示语言 + 最大历史提交数 + 在提交路线图中显示修改时间而非提交时间 + 在提交详情页中显示子提交列表 + SUBJECT字数检测 + GIT配置 + 自动换行转换 + 默认克隆路径 + 邮箱 + 默认GIT用户邮箱 + 安装路径 + 启用HTTP SSL验证 + 用户名 + 默认GIT用户名 + Git 版本 + 本软件要求GIT最低版本为2.23.0 + GPG签名 + 启用提交签名 + 启用标签签名 + 签名格式 + 签名程序位置 + 签名程序所在路径 + 用户签名KEY + 输入签名提交所使用的KEY + 第三方工具集成 + 终端/SHELL + 终端/SHELL + 安装路径 清理远程已删除分支 目标 : 清理工作树 @@ -567,13 +568,17 @@ 不指定 在提交列表中隐藏 使用其对提交列表过滤 - 切换排序模式 + 布局方式 + 水平排布 + 竖直排布 + 提交列表排序规则 按提交时间 (--date-order) 按拓扑排序 (--topo-order) 本地分支 定位HEAD 启用 --first-parent 过滤选项 新建分支 + 提交路线图中仅高亮显示当前分支 在 {0} 中打开 使用外部工具打开 重新加载 @@ -593,7 +598,12 @@ 更新子模块 标签列表 新建标签 + 按创建时间 + 按名称(升序) + 按名称(降序) + 排序 在终端中打开 + 在提交列表中使用相对时间 工作树列表 新增工作树 清理 @@ -621,6 +631,10 @@ 忽略此版本 软件更新 当前已是最新版本。 + 切换上游分支 + 本地分支 : + 取消追踪 + 上游分支 : 复制提交指纹 跳转到提交 压缩为单个提交 diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 4704b8f0..4fb4f375 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -67,8 +67,7 @@ 推送 (push) ${0}$ 重定基底 (rebase) ${0}$ 分支至 ${1}$... 重新命名 ${0}$... - 切換上游分支 - 取消設定上游分支 + 切換上游分支... 分支比較 位元組 取 消 @@ -165,10 +164,12 @@ 提交訊息追加署名 (--signoff) 拉取變更時進行清理 (--prune) Issue 追蹤 + 新增符合 Gitee 議題規則 + 新增符合 Gitee 合併請求規則 新增符合 GitHub Issue 規則 - 新增符合 Jira 規則 新增符合 GitLab 議題規則 新增符合 GitLab 合併請求規則 + 新增符合 Jira 規則 新增自訂規則 符合 Issue 的正規表達式: 規則名稱: @@ -351,7 +352,6 @@ 追蹤名稱為「{0}」的檔案 追蹤所有 *{0} 檔案 歷史記錄 - 切換橫向/縱向顯示 作者 修改時間 路線圖與訊息標題 @@ -369,7 +369,7 @@ 切換到上一個頁面 切換到下一個頁面 新增頁面 - 開啟偏好設定面板 + 開啟偏好設定面板 存放庫頁面快速鍵 提交暫存區變更 提交暫存區變更並推送 @@ -443,59 +443,60 @@ {0} 個月前 一年前 {0} 年前 - 偏好設定 - AI - 伺服器 - API 金鑰 - 模型 - 名稱 - 分析變更差異提示詞 - 產生提交訊息提示詞 - 外觀設定 - 預設字型 - 字型大小 - 預設 - 程式碼 - 等寬字型 - 僅在文字編輯器中使用等寬字型 - 佈景主題 - 自訂主題 - 使用固定寬度的分頁標籤 - 使用系統原生預設視窗樣式 - 對比/合併工具 - 安裝路徑 - 填寫可執行檔案所在路徑 - 工具 - 一般設定 - 啟動時檢查軟體更新 - 日期時間格式 - 顯示語言 - 最大歷史提交數 - 在提交路線圖中顯示修改時間而非提交時間 - 在提交詳細資訊中顯示後續提交 - 提交標題字數偵測 - Git 設定 - 自動換行轉換 - 預設複製 (clone) 路徑 - 電子郵件 - 預設 Git 使用者電子郵件 - 安裝路徑 - 使用者名稱 - 預設 Git 使用者名稱 - Git 版本 - 本軟體要求 Git 最低版本為 2.23.0 - GPG 簽章 - 啟用提交簽章 - 啟用標籤簽章 - GPG 簽章格式 - 可執行檔案路徑 - 填寫 gpg.exe 所在路徑 - 使用者簽章金鑰 - 填寫簽章提交所使用的金鑰 - 第三方工具整合 - 終端機/Shell - 終端機/Shell - 安裝路徑 + 偏好設定 + AI + 伺服器 + API 金鑰 + 模型 + 名稱 + 分析變更差異提示詞 + 產生提交訊息提示詞 + 外觀設定 + 預設字型 + 字型大小 + 預設 + 程式碼 + 等寬字型 + 僅在文字編輯器中使用等寬字型 + 佈景主題 + 自訂主題 + 使用固定寬度的分頁標籤 + 使用系統原生預設視窗樣式 + 對比/合併工具 + 安裝路徑 + 填寫可執行檔案所在路徑 + 工具 + 一般設定 + 啟動時檢查軟體更新 + 日期時間格式 + 顯示語言 + 最大歷史提交數 + 在提交路線圖中顯示修改時間而非提交時間 + 在提交詳細資訊中顯示後續提交 + 提交標題字數偵測 + Git 設定 + 自動換行轉換 + 預設複製 (clone) 路徑 + 電子郵件 + 預設 Git 使用者電子郵件 + 安裝路徑 + 啟用 HTTP SSL 驗證 + 使用者名稱 + 預設 Git 使用者名稱 + Git 版本 + 本軟體要求 Git 最低版本為 2.23.0 + GPG 簽章 + 啟用提交簽章 + 啟用標籤簽章 + GPG 簽章格式 + 可執行檔案路徑 + 填寫 gpg.exe 所在路徑 + 使用者簽章金鑰 + 填寫簽章提交所使用的金鑰 + 第三方工具整合 + 終端機/Shell + 終端機/Shell + 安裝路徑 清理遠端已刪除分支 目標: 清理工作區 @@ -566,13 +567,17 @@ 取消指定 在提交列表中隱藏 以其篩選提交列表 - 切換排序方式 + 佈局方式 + 橫向顯示 + 縱向顯示 + 提交顯示順序 依提交時間排序 (--date-order) 依拓撲排序 (--topo-order) 本機分支 回到 HEAD 啟用 [--first-parent] 選項 新增分支 + 提交圖表中僅高亮顯示目前分支 在 {0} 中開啟 使用外部工具開啟 重新載入 @@ -592,7 +597,12 @@ 更新子模組 標籤列表 新增標籤 + 依建立時間 + 依名稱升序 + 依名稱降序 + 排序 在終端機中開啟 + 在提交清單中使用相對時間 工作區列表 新增工作區 清理 @@ -620,6 +630,10 @@ 忽略此版本 軟體更新 目前已是最新版本。 + 切換上游分支 + 本機分支: + 取消設定上游分支 + 上游分支: 複製提交編號 前往此提交 壓縮為單個提交 diff --git a/src/Resources/Styles.axaml b/src/Resources/Styles.axaml index 28eabbab..6335c635 100644 --- a/src/Resources/Styles.axaml +++ b/src/Resources/Styles.axaml @@ -159,7 +159,7 @@ - - - - - - - - -