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

Update install button label #16284

Merged
merged 5 commits into from
Dec 18, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ export class InstallPythonControllerCommands implements IExtensionSyncActivation
// when this command is installed, user will have to manually install python and rerun the cell
private async installPythonViaKernelPicker(): Promise<void> {
sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'displayed' });
const buttons = this.installedOnceBefore ? [Common.install, Common.reload] : [Common.install];
const buttons = this.installedOnceBefore
? [Common.downloadAndInstall, Common.reload]
: [Common.downloadAndInstall];
const selection = await window.showErrorMessage(DataScience.pythonNotInstalled, { modal: true }, ...buttons);

if (selection === Common.install) {
if (selection === Common.downloadAndInstall) {
this.installedOnceBefore = true;
sendTelemetryEvent(Telemetry.PythonNotInstalled, undefined, { action: 'download' });
// Activate the python extension command to show how to install python
Expand Down
1 change: 1 addition & 0 deletions src/platform/common/utils/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export namespace Common {
export const refresh = l10n.t('Refresh');
export const refreshing = l10n.t('Refreshing...');
export const install = l10n.t('Install');
export const downloadAndInstall = l10n.t('Download and Install');
export const loadingExtension = l10n.t('Jupyter Extension loading...');
export const handleExtensionActivationError = l10n.t(
"Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information."
Expand Down
Loading