Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormCommit: Clearer button labels #10587

Merged
merged 4 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 13 additions & 18 deletions GitUI/CommandsDialogs/FormCommit.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion GitUI/CommandsDialogs/FormCommit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public sealed partial class FormCommit : GitModuleForm

private readonly TranslationString _commitAndPush = new("Commit && &push");

private readonly TranslationString _commitAndForcePush = new("Commit && force &push");

private readonly TranslationString _deleteFailed = new("Delete file failed");

private readonly TranslationString _deleteSelectedFiles =
Expand Down Expand Up @@ -3360,7 +3362,9 @@ private void stopTrackingThisFileToolStripMenuItem_Click(object sender, EventArg

private void SetCommitAndPushText()
{
CommitAndPush.Text = Reset.Enabled || Amend.Checked ? _commitAndPush.Text : TranslatedStrings.ButtonPush;
CommitAndPush.Text = Amend.Checked && AppSettings.CommitAndPushForcedWhenAmend ? _commitAndForcePush.Text
: Reset.Enabled || Amend.Checked ? _commitAndPush.Text
: TranslatedStrings.ButtonPush;
}

internal TestAccessor GetTestAccessor()
Expand Down
10 changes: 7 additions & 3 deletions GitUI/Translation/English.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -3387,7 +3387,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe):</source>
<target />
</trans-unit>
<trans-unit id="Amend.Text">
<source>&amp;Amend Commit</source>
<source>&amp;Amend commit</source>
<target />
</trans-unit>
<trans-unit id="Cancel.Text">
Expand All @@ -3407,7 +3407,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe):</source>
<target />
</trans-unit>
<trans-unit id="ResetAuthor.Text">
<source>R&amp;eset Author</source>
<source>R&amp;eset author</source>
<target />
</trans-unit>
<trans-unit id="ResetUnStaged.Text">
Expand All @@ -3428,7 +3428,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe):</source>
<target />
</trans-unit>
<trans-unit id="StashStaged.Text">
<source>S&amp;tash staged changes</source>
<source>Stas&amp;h staged changes</source>
<target />
</trans-unit>
<trans-unit id="_addSelectionToCommitMessage.Text">
Expand All @@ -3452,6 +3452,10 @@ Use this feature when a file is big and never change.
Git will never check if the file has changed that will improve status check performance.</source>
<target />
</trans-unit>
<trans-unit id="_commitAndForcePush.Text">
<source>Commit &amp;&amp; force &amp;push</source>
<target />
</trans-unit>
<trans-unit id="_commitAndPush.Text">
<source>Commit &amp;&amp; &amp;push</source>
<target />
Expand Down