File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 3733
3733
"Extract constant" : {
3734
3734
"category" : " Message" ,
3735
3735
"code" : 95006
3736
+ },
3737
+
3738
+ "enclosing scope" : {
3739
+ "category" : " Message" ,
3740
+ "code" : 95007
3741
+ },
3742
+
3743
+ "{0} scope" : {
3744
+ "category" : " Message" ,
3745
+ "code" : 95008
3736
3746
}
3737
3747
}
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ namespace ts.refactor.extractSymbol {
557
557
description : getDescriptionForConstantInScope ( scope ) ,
558
558
errors : constantErrorsPerScope [ i ] ,
559
559
scopeDescription : ( i === 0 && ! isClassLike ( scope ) )
560
- ? "enclosing scope" // Like "global scope" and "module scope", this is not localized.
560
+ ? Diagnostics . enclosing_scope . message
561
561
: scopeDescription ,
562
562
} ,
563
563
} ;
@@ -630,7 +630,7 @@ namespace ts.refactor.extractSymbol {
630
630
function getDescriptionForModuleLikeDeclaration ( scope : SourceFile | ModuleBlock ) : string {
631
631
return scope . kind === SyntaxKind . ModuleBlock
632
632
? `namespace '${ scope . parent . name . getText ( ) } '`
633
- : scope . externalModuleIndicator ? "module scope " : "global scope" ;
633
+ : formatStringFromArgs ( Diagnostics . _0_scope . message , [ scope . externalModuleIndicator ? "module" : "global" ] ) ;
634
634
}
635
635
636
636
function getUniqueName ( baseName : string , fileText : string ) : string {
You can’t perform that action at this time.
0 commit comments