5
5
namespace ts . refactor . extractSymbol {
6
6
const extractSymbol : Refactor = {
7
7
name : "Extract Symbol" ,
8
- description : Diagnostics . Extract_symbol . message ,
8
+ description : getLocaleSpecificMessage ( Diagnostics . Extract_symbol ) ,
9
9
getAvailableActions,
10
10
getEditsForAction,
11
11
} ;
@@ -43,7 +43,7 @@ namespace ts.refactor.extractSymbol {
43
43
// Don't issue refactorings with duplicated names.
44
44
// Scopes come back in "innermost first" order, so extractions will
45
45
// preferentially go into nearer scopes
46
- const description = formatStringFromArgs ( Diagnostics . Extract_to_0_in_1 . message , [ functionExtraction . description , functionExtraction . scopeDescription ] ) ;
46
+ const description = formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Extract_to_0_in_1 ) , [ functionExtraction . description , functionExtraction . scopeDescription ] ) ;
47
47
if ( ! usedFunctionNames . has ( description ) ) {
48
48
usedFunctionNames . set ( description , true ) ;
49
49
functionActions . push ( {
@@ -58,7 +58,7 @@ namespace ts.refactor.extractSymbol {
58
58
// Don't issue refactorings with duplicated names.
59
59
// Scopes come back in "innermost first" order, so extractions will
60
60
// preferentially go into nearer scopes
61
- const description = formatStringFromArgs ( Diagnostics . Extract_to_0_in_1 . message , [ constantExtraction . description , constantExtraction . scopeDescription ] ) ;
61
+ const description = formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . Extract_to_0_in_1 ) , [ constantExtraction . description , constantExtraction . scopeDescription ] ) ;
62
62
if ( ! usedConstantNames . has ( description ) ) {
63
63
usedConstantNames . set ( description , true ) ;
64
64
constantActions . push ( {
@@ -78,15 +78,15 @@ namespace ts.refactor.extractSymbol {
78
78
if ( functionActions . length ) {
79
79
infos . push ( {
80
80
name : extractSymbol . name ,
81
- description : Diagnostics . Extract_function . message ,
81
+ description : getLocaleSpecificMessage ( Diagnostics . Extract_function ) ,
82
82
actions : functionActions
83
83
} ) ;
84
84
}
85
85
86
86
if ( constantActions . length ) {
87
87
infos . push ( {
88
88
name : extractSymbol . name ,
89
- description : Diagnostics . Extract_constant . message ,
89
+ description : getLocaleSpecificMessage ( Diagnostics . Extract_constant ) ,
90
90
actions : constantActions
91
91
} ) ;
92
92
}
@@ -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
- ? Diagnostics . enclosing_scope . message
560
+ ? getLocaleSpecificMessage ( Diagnostics . enclosing_scope )
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
- : formatStringFromArgs ( Diagnostics . _0_scope . message , [ scope . externalModuleIndicator ? "module" : "global" ] ) ;
633
+ : formatStringFromArgs ( getLocaleSpecificMessage ( Diagnostics . _0_scope ) , [ scope . externalModuleIndicator ? "module" : "global" ] ) ;
634
634
}
635
635
636
636
function getUniqueName ( baseName : string , fileText : string ) : string {
0 commit comments