From 2eaec9f41d0071f05f6ab846a21c72712bff6247 Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Thu, 21 Oct 2021 17:10:47 -0400 Subject: [PATCH] Use correct string when checking "browse" option (#17432) (#17440) * Correct browse string match * Deduping const --- extensions/sql-database-projects/src/common/constants.ts | 3 +-- .../src/dialogs/publishDatabaseQuickpick.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/sql-database-projects/src/common/constants.ts b/extensions/sql-database-projects/src/common/constants.ts index a706d7dcdd..8229ec044c 100644 --- a/extensions/sql-database-projects/src/common/constants.ts +++ b/extensions/sql-database-projects/src/common/constants.ts @@ -115,8 +115,7 @@ export const defaultUser = localize('default', "default"); export const selectProfileToUse = localize('selectProfileToUse', "Select publish profile to load"); export const selectProfile = localize('selectProfile', "Select Profile"); export const dontUseProfile = localize('dontUseProfile', "Don't use profile"); -export const browseForProfile = localize('browseForProfile', "Browse for profile"); -export const browseForProfileWithIcon = `$(folder) ${browseForProfile}`; +export const browseForProfileWithIcon = `$(folder) ${localize('browseForProfile', "Browse for profile")}`; export const chooseAction = localize('chooseAction', "Choose action"); export const chooseSqlcmdVarsToModify = localize('chooseSqlcmdVarsToModify', "Choose SQLCMD variables to modify"); export const enterNewValueForVar = (varName: string) => localize('enterNewValueForVar', "Enter new value for variable '{0}'", varName); diff --git a/extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts b/extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts index afa46ef63d..8a739edad9 100644 --- a/extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts +++ b/extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts @@ -31,7 +31,7 @@ export async function getPublishDatabaseSettings(project: Project, promptForConn reject(); }); quickPick.onDidChangeSelection(async items => { - if (items[0].label === constants.browseForProfile) { + if (items[0].label === constants.browseForProfileWithIcon) { const locations = await promptForPublishProfile(project.projectFolderPath); if (!locations) { // Clear items so that this event will trigger again if they select the same item