Skip to content

Commit 1a1a7fd

Browse files
pralkarzKartik Raj
andauthored
Change title of file explorer dialog when browsing for an interpreter (microsoft#13036)
* Update @types/vscode * Add a `title` parameter to the "open" dialog box - Gets the localized title via `localize.ts`. * Update the appropriate unit test * Add a news entry * Add an appropriate entry to `package.nls.json` * Update news/1 Enhancements/12959.md Co-authored-by: Kartik Raj <karraj@microsoft.com>
1 parent e2161a8 commit 1a1a7fd

File tree

7 files changed

+14
-8
lines changed

7 files changed

+14
-8
lines changed

news/1 Enhancements/12959.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The file explorer dialog now has an appropriate title when browsing for an interpreter. (thanks [ziebam](https://github.com/ziebam))

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3379,7 +3379,7 @@
33793379
"@types/tmp": "0.0.33",
33803380
"@types/untildify": "^3.0.0",
33813381
"@types/uuid": "^3.4.3",
3382-
"@types/vscode": "^1.46.0",
3382+
"@types/vscode": "^1.47.0",
33833383
"@types/webpack-bundle-analyzer": "^2.13.0",
33843384
"@types/winreg": "^1.2.30",
33853385
"@types/ws": "^6.0.1",

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
"InterpreterQuickPickList.enterPath.placeholder": "Enter path to a Python interpreter.",
180180
"InterpreterQuickPickList.browsePath.label": "Find...",
181181
"InterpreterQuickPickList.browsePath.detail": "Browse your file system to find a Python interpreter.",
182+
"InterpreterQuickPickList.browsePath.title": "Select Python interpreter",
182183
"diagnostics.upgradeCodeRunner": "Please update the Code Runner extension for it to be compatible with the Python extension.",
183184
"Common.bannerLabelYes": "Yes",
184185
"Common.bannerLabelNo": "No",

src/client/common/utils/localize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ export namespace InterpreterQuickPickList {
187187
'InterpreterQuickPickList.browsePath.detail',
188188
'Browse your file system to find a Python interpreter.'
189189
),
190-
openButtonLabel: localize('python.command.python.setInterpreter.title', 'Select Interpreter')
190+
openButtonLabel: localize('python.command.python.setInterpreter.title', 'Select Interpreter'),
191+
title: localize('InterpreterQuickPickList.browsePath.title', 'Select Python interpreter')
191192
};
192193
}
193194
export namespace ExtensionChannels {

src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ export class SetInterpreterCommand extends BaseInterpreterSelectorCommand {
112112
const uris = await this.applicationShell.showOpenDialog({
113113
filters: this.platformService.isWindows ? filtersObject : undefined,
114114
openLabel: InterpreterQuickPickList.browsePath.openButtonLabel(),
115-
canSelectMany: false
115+
canSelectMany: false,
116+
title: InterpreterQuickPickList.browsePath.title()
116117
});
117118
if (uris && uris.length > 0) {
118119
state.path = uris[0].fsPath;

src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ suite('Set Interpreter Command', () => {
244244
const expectedParams = {
245245
filters: filtersObject,
246246
openLabel: InterpreterQuickPickList.browsePath.openButtonLabel(),
247-
canSelectMany: false
247+
canSelectMany: false,
248+
title: InterpreterQuickPickList.browsePath.title()
248249
};
249250
const multiStepInput = TypeMoq.Mock.ofType<IMultiStepInput<InterpreterStateArgs>>();
250251
multiStepInput
@@ -268,7 +269,8 @@ suite('Set Interpreter Command', () => {
268269
const expectedParams = {
269270
filters: undefined,
270271
openLabel: InterpreterQuickPickList.browsePath.openButtonLabel(),
271-
canSelectMany: false
272+
canSelectMany: false,
273+
title: InterpreterQuickPickList.browsePath.title()
272274
};
273275
multiStepInput
274276
.setup((i) => i.showQuickPick(TypeMoq.It.isAny()))

0 commit comments

Comments
 (0)