Fix #19959 and #19958: Remove un-localizable messages (#20019)

* Fix #19959 and #19958: Remove un-localizable messages

* Update message

* Update diagnostic messages
This commit is contained in:
Mohamed Hegazy
2017-11-24 22:02:48 -08:00
committed by GitHub
parent 568e52d550
commit 6b3cfc7008
11 changed files with 12 additions and 26 deletions

View File

@@ -276,17 +276,11 @@ namespace ts.codefix {
}
});
const actionFormat = kind === ImportKind.Equals
? Diagnostics.Import_0_require_1
: kind === ImportKind.Namespace
? Diagnostics.Import_Asterisk_as_0_from_1
: Diagnostics.Import_0_from_1;
// if this file doesn't have any import statements, insert an import statement and then insert a new line
// between the only import statement and user code. Otherwise just insert the statement because chances
// are there are already a new line seperating code and import statements.
return createCodeAction(
actionFormat,
Diagnostics.Import_0_from_module_1,
[symbolName, moduleSpecifierWithoutQuotes],
changes,
"NewImport",