@@ -80,11 +80,15 @@ const UIStrings = {
8080 /**
8181 *@description Text in Navigator View of the Sources panel
8282 */
83- areYouSureYouWantToExcludeThis : 'Are you sure you want to exclude this folder?' ,
83+ excludeThisFolder : 'Exclude this folder?' ,
84+ /**
85+ *@description Text in a dialog which appears when users click on 'Exclude from Workspace' menu item
86+ */
87+ folderWillNotBeShown : 'This folder and its contents will not be shown in workspace.' ,
8488 /**
8589 *@description Text in Navigator View of the Sources panel
8690 */
87- areYouSureYouWantToDeleteThis : 'Are you sure you want to delete this file?' ,
91+ deleteThisFile : 'Delete this file?' ,
8892 /**
8993 *@description A context menu item in the Navigator View of the Sources panel
9094 */
@@ -104,9 +108,9 @@ const UIStrings = {
104108 /**
105109 *@description Text in Navigator View of the Sources panel
106110 */
107- areYouSureYouWantToDeleteFolder : 'Are you sure you want to delete this folder and its contents?' ,
111+ deleteFolder : 'Delete this folder and its contents?' ,
108112 /**
109- *@description Text in Navigator View of the Sources panel. A confirmation message on action to delete a folder.
113+ *@description Text in Navigator View of the Sources panel. A confirmation message on action to delete a folder or file .
110114 */
111115 actionCannotBeUndone : 'This action cannot be undone.' ,
112116 /**
@@ -974,7 +978,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
974978 private async handleContextMenuExclude (
975979 project : Workspace . Workspace . Project , path : Platform . DevToolsPath . EncodedPathString ) : Promise < void > {
976980 const shouldExclude = await UI . UIUtils . ConfirmDialog . show (
977- i18nString ( UIStrings . areYouSureYouWantToExcludeThis ) , undefined , undefined ,
981+ i18nString ( UIStrings . folderWillNotBeShown ) , i18nString ( UIStrings . excludeThisFolder ) , undefined ,
978982 { jslogContext : 'exclude-folder-confirmation' } ) ;
979983 if ( shouldExclude ) {
980984 UI . UIUtils . startBatchUpdate ( ) ;
@@ -986,7 +990,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
986990
987991 private async handleContextMenuDelete ( uiSourceCode : Workspace . UISourceCode . UISourceCode ) : Promise < void > {
988992 const shouldDelete = await UI . UIUtils . ConfirmDialog . show (
989- i18nString ( UIStrings . areYouSureYouWantToDeleteThis ) , undefined , undefined ,
993+ i18nString ( UIStrings . actionCannotBeUndone ) , i18nString ( UIStrings . deleteThisFile ) , undefined ,
990994 { jslogContext : 'delete-file-confirmation' } ) ;
991995 if ( shouldDelete ) {
992996 uiSourceCode . project ( ) . deleteFile ( uiSourceCode ) ;
@@ -1015,10 +1019,9 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
10151019 }
10161020
10171021 private async handleDeleteFolder ( node : NavigatorTreeNode ) : Promise < void > {
1018- const warningMsg =
1019- `${ i18nString ( UIStrings . areYouSureYouWantToDeleteFolder ) } \n${ i18nString ( UIStrings . actionCannotBeUndone ) } ` ;
10201022 const shouldRemove = await UI . UIUtils . ConfirmDialog . show (
1021- warningMsg , undefined , undefined , { jslogContext : 'delete-folder-confirmation' } ) ;
1023+ i18nString ( UIStrings . actionCannotBeUndone ) , i18nString ( UIStrings . deleteFolder ) , undefined ,
1024+ { jslogContext : 'delete-folder-confirmation' } ) ;
10221025 if ( shouldRemove ) {
10231026 Host . userMetrics . actionTaken ( Host . UserMetrics . Action . OverrideTabDeleteFolderContextMenu ) ;
10241027 const topNode = this . findTopNonMergedNode ( node ) ;
0 commit comments