From 358d243a460a0c04a06ad298a6346270fae3939e Mon Sep 17 00:00:00 2001 From: LE GARREC Vincent Date: Sun, 21 Mar 2021 18:10:18 +0100 Subject: [PATCH] #9013 Use Close in Clean working directory --- .../FormCleanupRepository.Designer.cs | 30 +++++++++---------- .../CommandsDialogs/FormCleanupRepository.cs | 2 +- .../RepoHosting/ForkAndCloneForm.Designer.cs | 26 ++++++++-------- .../FormManageWorktree.Designer.cs | 26 ++++++++-------- GitUI/TranslatedStrings.cs | 2 ++ GitUI/Translation/English.xlf | 16 +++------- 6 files changed, 48 insertions(+), 54 deletions(-) diff --git a/GitUI/CommandsDialogs/FormCleanupRepository.Designer.cs b/GitUI/CommandsDialogs/FormCleanupRepository.Designer.cs index 1d800d3dc52..06ddbcf390f 100644 --- a/GitUI/CommandsDialogs/FormCleanupRepository.Designer.cs +++ b/GitUI/CommandsDialogs/FormCleanupRepository.Designer.cs @@ -31,7 +31,7 @@ private void InitializeComponent() this.Preview = new System.Windows.Forms.Button(); this.AddPath = new System.Windows.Forms.Button(); this.Cleanup = new System.Windows.Forms.Button(); - this.Cancel = new System.Windows.Forms.Button(); + this._NO_TRANSLATE_Close = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.RemoveIgnored = new System.Windows.Forms.RadioButton(); this.RemoveNonIgnored = new System.Windows.Forms.RadioButton(); @@ -83,17 +83,17 @@ private void InitializeComponent() this.Cleanup.UseVisualStyleBackColor = true; this.Cleanup.Click += new System.EventHandler(this.Cleanup_Click); // - // Cancel + // _NO_TRANSLATE_Close // - this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.Cancel.Location = new System.Drawing.Point(302, 278); - this.Cancel.Name = "Cancel"; - this.Cancel.Size = new System.Drawing.Size(120, 25); - this.Cancel.TabIndex = 2; - this.Cancel.Text = "Cancel"; - this.Cancel.UseVisualStyleBackColor = true; - this.Cancel.Click += new System.EventHandler(this.Cancel_Click); + this._NO_TRANSLATE_Close.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this._NO_TRANSLATE_Close.DialogResult = System.Windows.Forms.DialogResult.OK; + this._NO_TRANSLATE_Close.Location = new System.Drawing.Point(302, 278); + this._NO_TRANSLATE_Close.Name = "Close"; + this._NO_TRANSLATE_Close.Size = new System.Drawing.Size(120, 25); + this._NO_TRANSLATE_Close.TabIndex = 2; + this._NO_TRANSLATE_Close.Text = TranslatedStrings.Close; + this._NO_TRANSLATE_Close.UseVisualStyleBackColor = true; + this._NO_TRANSLATE_Close.Click += new System.EventHandler(this.Close_Click); // // groupBox1 // @@ -212,7 +212,7 @@ private void InitializeComponent() this.AcceptButton = this.AddPath; this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.Cancel; + this.CancelButton = this._NO_TRANSLATE_Close; this.ClientSize = new System.Drawing.Size(434, 442); this.Controls.Add(this.labelPathHint); this.Controls.Add(this.textBoxPaths); @@ -221,7 +221,7 @@ private void InitializeComponent() this.Controls.Add(this.PreviewOutput); this.Controls.Add(this.RemoveDirectories); this.Controls.Add(this.groupBox1); - this.Controls.Add(this.Cancel); + this.Controls.Add(this._NO_TRANSLATE_Close); this.Controls.Add(this.Cleanup); this.Controls.Add(this.Preview); this.Controls.Add(this.AddPath); @@ -243,7 +243,7 @@ private void InitializeComponent() private System.Windows.Forms.Button Preview; private System.Windows.Forms.Button AddPath; private System.Windows.Forms.Button Cleanup; - private System.Windows.Forms.Button Cancel; + private System.Windows.Forms.Button _NO_TRANSLATE_Close; private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.RadioButton RemoveIgnored; private System.Windows.Forms.RadioButton RemoveNonIgnored; @@ -255,4 +255,4 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxPathFilter; private System.Windows.Forms.Label labelPathHint; } -} \ No newline at end of file +} diff --git a/GitUI/CommandsDialogs/FormCleanupRepository.cs b/GitUI/CommandsDialogs/FormCleanupRepository.cs index 25bd4ec45eb..01eba152e90 100644 --- a/GitUI/CommandsDialogs/FormCleanupRepository.cs +++ b/GitUI/CommandsDialogs/FormCleanupRepository.cs @@ -96,7 +96,7 @@ private CleanMode GetCleanMode() return string.Join(" ", textBoxPaths.Lines.Where(a => !string.IsNullOrEmpty(a)).Select(a => string.Format("\"{0}\"", a))); } - private void Cancel_Click(object sender, EventArgs e) + private void Close_Click(object sender, EventArgs e) { Close(); } diff --git a/GitUI/CommandsDialogs/RepoHosting/ForkAndCloneForm.Designer.cs b/GitUI/CommandsDialogs/RepoHosting/ForkAndCloneForm.Designer.cs index 1a5f64d0e48..f83230b773b 100644 --- a/GitUI/CommandsDialogs/RepoHosting/ForkAndCloneForm.Designer.cs +++ b/GitUI/CommandsDialogs/RepoHosting/ForkAndCloneForm.Designer.cs @@ -35,7 +35,7 @@ private void InitializeComponent() this.columnHeaderSearchOwner = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.columnHeaderSearchForks = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.cloneBtn = new System.Windows.Forms.Button(); - this.closeBtn = new System.Windows.Forms.Button(); + this._NO_TRANSLATE_closeBtn = new System.Windows.Forms.Button(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tabControl = new System.Windows.Forms.TabControl(); this.myReposPage = new System.Windows.Forms.TabPage(); @@ -130,16 +130,16 @@ private void InitializeComponent() this.cloneBtn.UseVisualStyleBackColor = true; this.cloneBtn.Click += new System.EventHandler(this._cloneBtn_Click); // - // closeBtn + // _NO_TRANSLATE_closeBtn // - this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.closeBtn.Location = new System.Drawing.Point(615, 3); - this.closeBtn.Name = "closeBtn"; - this.closeBtn.Size = new System.Drawing.Size(120, 30); - this.closeBtn.TabIndex = 1; - this.closeBtn.Text = "Close"; - this.closeBtn.UseVisualStyleBackColor = true; - this.closeBtn.Click += new System.EventHandler(this._closeBtn_Click); + this._NO_TRANSLATE_closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._NO_TRANSLATE_closeBtn.Location = new System.Drawing.Point(615, 3); + this._NO_TRANSLATE_closeBtn.Name = "closeBtn"; + this._NO_TRANSLATE_closeBtn.Size = new System.Drawing.Size(120, 30); + this._NO_TRANSLATE_closeBtn.TabIndex = 1; + this._NO_TRANSLATE_closeBtn.Text = TranslatedStrings.Close; + this._NO_TRANSLATE_closeBtn.UseVisualStyleBackColor = true; + this._NO_TRANSLATE_closeBtn.Click += new System.EventHandler(this._closeBtn_Click); // // tableLayoutPanel2 // @@ -549,7 +549,7 @@ private void InitializeComponent() // // flowLayoutPanel1 // - this.flowLayoutPanel1.Controls.Add(this.closeBtn); + this.flowLayoutPanel1.Controls.Add(this._NO_TRANSLATE_closeBtn); this.flowLayoutPanel1.Controls.Add(this.cloneBtn); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; @@ -590,7 +590,7 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Button cloneBtn; - private System.Windows.Forms.Button closeBtn; + private System.Windows.Forms.Button _NO_TRANSLATE_closeBtn; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TabControl tabControl; private System.Windows.Forms.TabPage myReposPage; @@ -634,4 +634,4 @@ private void InitializeComponent() private System.Windows.Forms.ColumnHeader columnHeaderSearchOwner; private System.Windows.Forms.ColumnHeader columnHeaderSearchForks; } -} \ No newline at end of file +} diff --git a/GitUI/CommandsDialogs/WorktreeDialog/FormManageWorktree.Designer.cs b/GitUI/CommandsDialogs/WorktreeDialog/FormManageWorktree.Designer.cs index b7a27273d9f..0284bfc28e5 100644 --- a/GitUI/CommandsDialogs/WorktreeDialog/FormManageWorktree.Designer.cs +++ b/GitUI/CommandsDialogs/WorktreeDialog/FormManageWorktree.Designer.cs @@ -39,7 +39,7 @@ private void InitializeComponent() this.IsDeleted = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.Open = new System.Windows.Forms.DataGridViewImageColumn(); this.Delete = new System.Windows.Forms.DataGridViewImageColumn(); - this.buttonClose = new System.Windows.Forms.Button(); + this._NO_TRANSLATE_Close = new System.Windows.Forms.Button(); this.buttonPruneWorktrees = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Worktrees)).BeginInit(); @@ -142,16 +142,16 @@ private void InitializeComponent() this.Delete.ReadOnly = true; this.Delete.Resizable = System.Windows.Forms.DataGridViewTriState.False; // - // buttonClose + // _NO_TRANSLATE_Close // - this.buttonClose.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.buttonClose.Location = new System.Drawing.Point(450, 262); - this.buttonClose.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size(178, 23); - this.buttonClose.TabIndex = 1; - this.buttonClose.Text = "Close"; - this.buttonClose.UseVisualStyleBackColor = true; - this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); + this._NO_TRANSLATE_Close.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this._NO_TRANSLATE_Close.Location = new System.Drawing.Point(450, 262); + this._NO_TRANSLATE_Close.Name = "Close"; + this._NO_TRANSLATE_Close.Size = new System.Drawing.Size(178, 23); + this._NO_TRANSLATE_Close.TabIndex = 1; + this._NO_TRANSLATE_Close.Text = TranslatedStrings.Close; + this._NO_TRANSLATE_Close.UseVisualStyleBackColor = true; + this._NO_TRANSLATE_Close.Click += new System.EventHandler(this.buttonClose_Click); // // buttonPruneWorktrees // @@ -170,7 +170,7 @@ private void InitializeComponent() this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.ClientSize = new System.Drawing.Size(832, 297); this.Controls.Add(this.buttonPruneWorktrees); - this.Controls.Add(this.buttonClose); + this.Controls.Add(this._NO_TRANSLATE_Close); this.Controls.Add(this.panel1); this.MaximizeBox = false; this.MinimizeBox = false; @@ -187,7 +187,7 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button buttonClose; + private System.Windows.Forms.Button _NO_TRANSLATE_Close; private System.Windows.Forms.DataGridView Worktrees; private System.Windows.Forms.Button buttonPruneWorktrees; private System.Windows.Forms.DataGridViewTextBoxColumn Path; @@ -198,4 +198,4 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewImageColumn Open; private System.Windows.Forms.DataGridViewImageColumn Delete; } -} \ No newline at end of file +} diff --git a/GitUI/TranslatedStrings.cs b/GitUI/TranslatedStrings.cs index 518e9dff7ec..84d82ee2380 100644 --- a/GitUI/TranslatedStrings.cs +++ b/GitUI/TranslatedStrings.cs @@ -12,6 +12,7 @@ internal sealed class TranslatedStrings : Translate private readonly TranslationString _no = new("No"); private readonly TranslationString _okText = new("OK"); private readonly TranslationString _cancelText = new("Cancel"); + private readonly TranslationString _closeText = new("Close"); private readonly TranslationString _buttonCheckoutBranch = new("Checkout branch"); private readonly TranslationString _buttonContinue = new("Continue"); @@ -126,6 +127,7 @@ public static void Reinitialize() public static string No => _instance.Value._no.Text; public static string OK => _instance.Value._okText.Text; public static string Cancel => _instance.Value._cancelText.Text; + public static string Close => _instance.Value._closeText.Text; public static string ButtonContinue => _instance.Value._buttonContinue.Text; public static string ButtonCheckoutBranch => _instance.Value._buttonCheckoutBranch.Text; diff --git a/GitUI/Translation/English.xlf b/GitUI/Translation/English.xlf index e7a12d21d90..f774f113721 100644 --- a/GitUI/Translation/English.xlf +++ b/GitUI/Translation/English.xlf @@ -1680,10 +1680,6 @@ You will have push access. {2} Clone - - Close - - # Forks @@ -3014,10 +3010,6 @@ revision: Add a path... - - Cancel - - Cleanup @@ -4967,10 +4959,6 @@ command "git help shortlog" Open a worktree - - Close - - Prune the deleted worktrees @@ -9589,6 +9577,10 @@ Select this commit to populate the full message. {0:Child|Children} + + Close + + Combined diff