Skip to content

Commit 41d9e35

Browse files
authored
PR -> pull request in user facing strings (#7692)
1 parent b54edf5 commit 41d9e35

11 files changed

Lines changed: 34 additions & 34 deletions

package.nls.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
"Do not translate what's inside of the '${..}'. It is an internal syntax for the extension"
5858
]
5959
},
60-
"githubPullRequests.pushBranch.description": "Push the \"from\" branch when creating a PR and the \"from\" branch is not available on the remote.",
61-
"githubPullRequests.pushBranch.prompt": "Prompt to push the branch when creating a PR and the \"from\" branch is not available on the remote.",
62-
"githubPullRequests.pushBranch.always": "Always push the branch when creating a PR and the \"from\" branch is not available on the remote.",
63-
"githubPullRequests.pullBranch.description": "Pull changes from the remote when a PR branch is checked out locally. Changes are detected when the PR is manually refreshed and during periodic background updates.",
64-
"githubPullRequests.pullBranch.prompt": "Prompt to pull a PR branch when changes are detected in the PR.",
65-
"githubPullRequests.pullBranch.never": "Never pull a PR branch when changes are detected in the PR.",
66-
"githubPullRequests.pullBranch.always": "Always pull a PR branch when changes are detected in the PR. When `\"git.autoStash\": true` this will instead `prompt` to prevent unexpected file changes.",
60+
"githubPullRequests.pushBranch.description": "Push the \"from\" branch when creating a pull request and the \"from\" branch is not available on the remote.",
61+
"githubPullRequests.pushBranch.prompt": "Prompt to push the branch when creating a pull request and the \"from\" branch is not available on the remote.",
62+
"githubPullRequests.pushBranch.always": "Always push the branch when creating a pull request and the \"from\" branch is not available on the remote.",
63+
"githubPullRequests.pullBranch.description": "Pull changes from the remote when a pull request branch is checked out locally. Changes are detected when the pull request is manually refreshed and during periodic background updates.",
64+
"githubPullRequests.pullBranch.prompt": "Prompt to pull a pull request branch when changes are detected in the pull request.",
65+
"githubPullRequests.pullBranch.never": "Never pull a pull request branch when changes are detected in the pull request.",
66+
"githubPullRequests.pullBranch.always": "Always pull a pull request branch when changes are detected in the pull request. When `\"git.autoStash\": true` this will instead `prompt` to prevent unexpected file changes.",
6767
"githubPullRequests.allowFetch.description": "Allows `git fetch` to be run for checked-out pull request branches when checking for updates to the pull request.",
6868
"githubPullRequests.ignoredPullRequestBranches.description": "Prevents branches that are associated with a pull request from being automatically detected. This will prevent review mode from being entered on these branches.",
6969
"githubPullRequests.ignoredPullRequestBranches.items": "Branch name",
@@ -396,8 +396,8 @@
396396
"{Locked='](command:workbench.action.chat.open?%7B%22query%22%3A%22%23copilotCodingAgent%20%22%2C%22isPartialQuery%22%3Atrue%7D)'}"
397397
]
398398
},
399-
"languageModelTools.github-pull-request_issue_fetch.displayName": "Get a GitHub Issue or PR",
400-
"languageModelTools.github-pull-request_issue_summarize.displayName": "Summarize a GitHub Issue or PR",
399+
"languageModelTools.github-pull-request_issue_fetch.displayName": "Get a GitHub Issue or pull request",
400+
"languageModelTools.github-pull-request_issue_summarize.displayName": "Summarize a GitHub Issue or pull request",
401401
"languageModelTools.github-pull-request_notification_fetch.displayName": "Get a GitHub Notification",
402402
"languageModelTools.github-pull-request_notification_summarize.displayName": "Summarize a GitHub Notification",
403403
"languageModelTools.github-pull-request_suggest-fix.displayName": "Suggest a Fix for a GitHub Issue",

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ export function registerCommands(
672672
await vscode.window.withProgress(
673673
{
674674
location: vscode.ProgressLocation.Notification,
675-
title: vscode.l10n.t('Applying changes from PR #{0}', pullRequest.number.toString()),
675+
title: vscode.l10n.t('Applying changes from pull request #{0}', pullRequest.number.toString()),
676676
cancellable: false
677677
},
678678
async (task) => {

src/github/activityBarViewProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
446446
this._replyMessage(message, result);
447447
})
448448
.catch(e => {
449-
vscode.window.showErrorMessage(vscode.l10n.t('Unable to set PR ready for review. {0}', formatError(e)));
449+
vscode.window.showErrorMessage(vscode.l10n.t('Unable to set pull request ready for review. {0}', formatError(e)));
450450
this._throwError(message, '');
451451
});
452452
}
@@ -473,7 +473,7 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
473473
vscode.commands.executeCommand('pr.refreshList');
474474

475475
if (!result.merged) {
476-
vscode.window.showErrorMessage(vscode.l10n.t('Merging PR failed: {0}', result?.message ?? ''));
476+
vscode.window.showErrorMessage(vscode.l10n.t('Merging pull request failed: {0}', result?.message ?? ''));
477477
}
478478

479479
this._replyMessage(message, {

src/github/copilotRemoteAgent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ export class CopilotRemoteAgentManager extends Disposable {
792792
const tooltip = await issueMarkdown(pullRequest, this.context, this.repositoriesManager);
793793
const timestampNumber = new Date(pullRequest.createdAt).getTime();
794794
const defaultBranch = await pullRequest.githubRepository.getDefaultBranch();
795-
const description = pullRequest.base.ref === defaultBranch ? `PR #${pullRequest.number}` : `PR #${pullRequest.number}${pullRequest.base.ref}`;
795+
const description = pullRequest.base.ref === defaultBranch ? `pull request #${pullRequest.number}` : `pull request #${pullRequest.number}${pullRequest.base.ref}`;
796796
return {
797797
id: `${pullRequest.number}`,
798798
label: pullRequest.title || `Session ${pullRequest.number}`,
@@ -828,7 +828,7 @@ export class CopilotRemoteAgentManager extends Disposable {
828828
const pullRequest = prAndStatus.item;
829829
const tooltip = await issueMarkdown(pullRequest, this.context, this.repositoriesManager);
830830
const defaultBranch = await pullRequest.githubRepository.getDefaultBranch();
831-
const description = pullRequest.base.ref === defaultBranch ? `PR #${pullRequest.number}` : `PR #${pullRequest.number}${pullRequest.base.ref}`;
831+
const description = pullRequest.base.ref === defaultBranch ? `pull request #${pullRequest.number}` : `pull request #${pullRequest.number}${pullRequest.base.ref}`;
832832
return {
833833
id: `${pullRequest.number}`,
834834
label: pullRequest.title || `Session ${pullRequest.number}`,

src/github/folderRepositoryManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,8 +1705,8 @@ export class FolderRepositoryManager extends Disposable {
17051705
if (workingDirectorySHA !== mergingPRSHA) {
17061706
// We are looking at different commit than what will be merged
17071707
const { ahead } = this.repository.state.HEAD!;
1708-
const pluralMessage = vscode.l10n.t('You have {0} unpushed commits on this PR branch.\n\nWould you like to proceed anyway?', ahead ?? 'unknown');
1709-
const singularMessage = vscode.l10n.t('You have 1 unpushed commit on this PR branch.\n\nWould you like to proceed anyway?');
1708+
const pluralMessage = vscode.l10n.t('You have {0} unpushed commits on this pull request branch.\n\nWould you like to proceed anyway?', ahead ?? 'unknown');
1709+
const singularMessage = vscode.l10n.t('You have 1 unpushed commit on this pull request branch.\n\nWould you like to proceed anyway?');
17101710
if (ahead &&
17111711
(await vscode.window.showWarningMessage(
17121712
ahead > 1 ? pluralMessage : singularMessage,
@@ -1725,7 +1725,7 @@ export class FolderRepositoryManager extends Disposable {
17251725
// We have made changes to the PR that are not committed
17261726
if (
17271727
(await vscode.window.showWarningMessage(
1728-
vscode.l10n.t('You have uncommitted changes on this PR branch.\n\n Would you like to proceed anyway?'),
1728+
vscode.l10n.t('You have uncommitted changes on this pull request branch.\n\n Would you like to proceed anyway?'),
17291729
{ modal: true },
17301730
vscode.l10n.t('Yes'),
17311731
)) === undefined

src/github/pullRequestModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ export class PullRequestModel extends IssueModel<PullRequest> implements IPullRe
332332
if (this.isActive) {
333333
localHead = repository.state.HEAD?.commit;
334334
remoteHead = (await this.githubRepository.getPullRequest(this.number))?.head?.sha;
335-
rejectMessage = vscode.l10n.t('The remote head of the PR branch has changed. Please pull the latest changes from the remote branch before approving.');
335+
rejectMessage = vscode.l10n.t('The remote head of the pull request branch has changed. Please pull the latest changes from the remote branch before approving.');
336336
} else {
337337
localHead = this.head?.sha;
338338
remoteHead = (await this.githubRepository.getPullRequest(this.number))?.head?.sha;
339-
rejectMessage = vscode.l10n.t('The remote head of the PR branch has changed. Please refresh the pull request before approving.');
339+
rejectMessage = vscode.l10n.t('The remote head of the pull request branch has changed. Please refresh the pull request before approving.');
340340
}
341341

342342
if (!remoteHead || remoteHead !== localHead) {

src/github/pullRequestOverview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
604604
vscode.commands.executeCommand('pr.refreshList');
605605

606606
if (!result.merged) {
607-
vscode.window.showErrorMessage(`Merging PR failed: ${result.message}`);
607+
vscode.window.showErrorMessage(`Merging pull request failed: ${result.message}`);
608608
}
609609

610610
const mergeResult: MergeResult = {
@@ -645,7 +645,7 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
645645
this._replyMessage(message, result);
646646
})
647647
.catch(e => {
648-
vscode.window.showErrorMessage(`Unable to set PR ready for review. ${formatError(e)}`);
648+
vscode.window.showErrorMessage(`Unable to set pull request ready for review. ${formatError(e)}`);
649649
this._throwError(message, '');
650650
});
651651
}

src/lm/tools/fetchIssueTool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ export class FetchIssueTool extends RepoToolBase<FetchIssueToolParameters> {
4444
async invoke(options: vscode.LanguageModelToolInvocationOptions<FetchIssueToolParameters>, _token: vscode.CancellationToken): Promise<vscode.LanguageModelToolResult> {
4545
const issueNumber = options.input.issueNumber;
4646
if (!issueNumber) {
47-
throw new Error('No issue/PR number provided.');
47+
throw new Error('No issue/pull-request number provided.');
4848
}
4949
const { owner, name, folderManager } = await this.getRepoInfo({ owner: options.input.repo?.owner, name: options.input.repo?.name });
5050
const issueOrPullRequest = await folderManager.resolveIssueOrPullRequest(owner, name, issueNumber);
5151
if (!issueOrPullRequest) {
52-
throw new Error(`No issue or PR found for ${owner}/${name}/${issueNumber}. Make sure the issue or PR exists.`);
52+
throw new Error(`No issue or pull request found for ${owner}/${name}/${issueNumber}. Make sure the issue or pull request exists.`);
5353
}
5454
const result: FetchIssueResult = {
5555
owner,

src/lm/tools/summarizeIssueTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Body: ${comment.body}
7373

7474
private summarizeInstructions(repo: string, owner: string): string {
7575
return `
76-
You are an AI assistant who is very proficient in summarizing issues and PRs.
76+
You are an AI assistant who is very proficient in summarizing issues and pull requests (PRs).
7777
You will be given information relative to an issue or PR : the title, the body and the comments. In the case of a PR you will also be given patches of the PR changes.
7878
Your task is to output a summary of all this information.
7979
Do not output code. When you try to summarize PR changes, summarize in a textual format.

src/view/treeNodes/fileChangeNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function openDiffCommand(
5757
return {
5858
command: 'vscode.diff',
5959
arguments: [parentURI, headURI, `${pathSegments[pathSegments.length - 1]} (Pull Request)`, opts],
60-
title: 'Open Changed File in PR',
60+
title: 'Open Changed File in pull request',
6161
};
6262
}
6363

0 commit comments

Comments
 (0)