Skip to content

Commit b441dd2

Browse files
Copilotalexr00
andcommitted
Fix localization message and use formatError utility
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 415d0bc commit b441dd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/github/folderRepositoryManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ export class FolderRepositoryManager extends Disposable {
24982498
const resetToRemote = vscode.l10n.t('Reset to Remote');
24992499
const cancel = vscode.l10n.t('Cancel');
25002500
const result = await vscode.window.showWarningMessage(
2501-
vscode.l10n.t('The pull request branch has diverged from the remote (you have {0} local commit(s), remote has {1} new commit(s)).\n\nThis usually happens when the remote branch has been force-pushed or rebased. You can reset your local branch to match the remote (this will discard your {0} local commit(s)), or cancel and resolve manually.', branch.ahead, branch.behind),
2501+
vscode.l10n.t('The pull request branch has diverged from the remote (you have {0} local commit(s), remote has {1} new commit(s)).\n\nThis usually happens when the remote branch has been force-pushed or rebased. You can reset your local branch to match the remote (this will discard your local changes), or cancel and resolve manually.', branch.ahead, branch.behind),
25022502
{ modal: true },
25032503
resetToRemote,
25042504
cancel
@@ -2561,7 +2561,7 @@ export class FolderRepositoryManager extends Disposable {
25612561
}
25622562
}
25632563

2564-
vscode.window.showErrorMessage(vscode.l10n.t('Failed to reset branch to remote: {0}', e?.message || String(e)));
2564+
vscode.window.showErrorMessage(vscode.l10n.t('Failed to reset branch to remote: {0}', formatError(e)));
25652565
}
25662566
}
25672567
// If cancel, do nothing

0 commit comments

Comments
 (0)