Skip to content

Commit bcdfdd2

Browse files
committed
Call getLocaleSpecificMessage
1 parent 559689f commit bcdfdd2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/services/refactors/extractSymbol.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace ts.refactor.extractSymbol {
66
const extractSymbol: Refactor = {
77
name: "Extract Symbol",
8-
description: Diagnostics.Extract_symbol.message,
8+
description: getLocaleSpecificMessage(Diagnostics.Extract_symbol),
99
getAvailableActions,
1010
getEditsForAction,
1111
};
@@ -43,7 +43,7 @@ namespace ts.refactor.extractSymbol {
4343
// Don't issue refactorings with duplicated names.
4444
// Scopes come back in "innermost first" order, so extractions will
4545
// 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]);
4747
if (!usedFunctionNames.has(description)) {
4848
usedFunctionNames.set(description, true);
4949
functionActions.push({
@@ -58,7 +58,7 @@ namespace ts.refactor.extractSymbol {
5858
// Don't issue refactorings with duplicated names.
5959
// Scopes come back in "innermost first" order, so extractions will
6060
// 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]);
6262
if (!usedConstantNames.has(description)) {
6363
usedConstantNames.set(description, true);
6464
constantActions.push({
@@ -78,15 +78,15 @@ namespace ts.refactor.extractSymbol {
7878
if (functionActions.length) {
7979
infos.push({
8080
name: extractSymbol.name,
81-
description: Diagnostics.Extract_function.message,
81+
description: getLocaleSpecificMessage(Diagnostics.Extract_function),
8282
actions: functionActions
8383
});
8484
}
8585

8686
if (constantActions.length) {
8787
infos.push({
8888
name: extractSymbol.name,
89-
description: Diagnostics.Extract_constant.message,
89+
description: getLocaleSpecificMessage(Diagnostics.Extract_constant),
9090
actions: constantActions
9191
});
9292
}
@@ -557,7 +557,7 @@ namespace ts.refactor.extractSymbol {
557557
description: getDescriptionForConstantInScope(scope),
558558
errors: constantErrorsPerScope[i],
559559
scopeDescription: (i === 0 && !isClassLike(scope))
560-
? Diagnostics.enclosing_scope.message
560+
? getLocaleSpecificMessage(Diagnostics.enclosing_scope)
561561
: scopeDescription,
562562
},
563563
};
@@ -630,7 +630,7 @@ namespace ts.refactor.extractSymbol {
630630
function getDescriptionForModuleLikeDeclaration(scope: SourceFile | ModuleBlock): string {
631631
return scope.kind === SyntaxKind.ModuleBlock
632632
? `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"]);
634634
}
635635

636636
function getUniqueName(baseName: string, fileText: string): string {

0 commit comments

Comments
 (0)