From 16a6de281c18c765fd9ce42f8265ba71a842e50e Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 25 Aug 2015 14:41:43 -0700 Subject: [PATCH] Update error message --- .../diagnosticInformationMap.generated.ts | 3 +-- src/compiler/diagnosticMessages.json | 19 ++++++------------- src/compiler/tsc.ts | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/compiler/diagnosticInformationMap.generated.ts b/src/compiler/diagnosticInformationMap.generated.ts index 811f7162b36..799adac319c 100644 --- a/src/compiler/diagnosticInformationMap.generated.ts +++ b/src/compiler/diagnosticInformationMap.generated.ts @@ -511,7 +511,7 @@ namespace ts { Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." }, Option_0_cannot_be_specified_without_specifying_option_1: { code: 5052, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified without specifying option '{1}'." }, Option_0_cannot_be_specified_with_option_1: { code: 5053, category: DiagnosticCategory.Error, key: "Option '{0}' cannot be specified with option '{1}'." }, - You_already_have_a_tsconfig_json_file_defined: { code: 5054, category: DiagnosticCategory.Error, key: "You already have a tsconfig.json file defined." }, + A_tsconfig_json_file_is_already_defined_at_Colon_0: { code: 5053, category: DiagnosticCategory.Error, key: "A 'tsconfig.json' file is already defined at: '{0}'." }, Concatenate_and_emit_output_to_single_file: { code: 6001, category: DiagnosticCategory.Message, key: "Concatenate and emit output to single file." }, Generates_corresponding_d_ts_file: { code: 6002, category: DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." }, Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." }, @@ -569,7 +569,6 @@ namespace ts { Specifies_module_resolution_strategy_Colon_node_Node_or_classic_TypeScript_pre_1_6: { code: 6069, category: DiagnosticCategory.Message, key: "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) ." }, Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: { code: 6070, category: DiagnosticCategory.Message, key: "Initializes a TypeScript project and creates a tsconfig.json file." }, Successfully_created_a_tsconfig_json_file: { code: 6071, category: DiagnosticCategory.Message, key: "Successfully created a tsconfig.json file." }, - Variable_0_implicitly_has_an_1_type: { code: 7005, category: DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, Parameter_0_implicitly_has_an_1_type: { code: 7006, category: DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, Member_0_implicitly_has_an_1_type: { code: 7008, category: DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f8a87acd153..132ce78a563 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2033,15 +2033,11 @@ "category": "Error", "code": 5053 }, -<<<<<<< HEAD - -======= - "You already have a tsconfig.json file defined.": { + "A 'tsconfig.json' file is already defined at: '{0}'.": { "category": "Error", - "code": 5052 + "code": 5053 }, ->>>>>>> 1670ce9664ed914ba2cd7c172caf8fe905261a81 "Concatenate and emit output to single file.": { "category": "Message", "code": 6001 @@ -2258,21 +2254,18 @@ "category": "Message", "code": 6068 }, -<<<<<<< HEAD "Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6) .": { "category": "Message", "code": 6069 }, -======= "Initializes a TypeScript project and creates a tsconfig.json file.": { - "category": "Message", - "code": 6069 - }, - "Successfully created a tsconfig.json file.": { "category": "Message", "code": 6070 }, ->>>>>>> 1670ce9664ed914ba2cd7c172caf8fe905261a81 + "Successfully created a tsconfig.json file.": { + "category": "Message", + "code": 6071 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 536b184589d..df193f4129b 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -162,7 +162,7 @@ namespace ts { if (commandLine.options.init) { let file = combinePaths(sys.getCurrentDirectory(), 'tsconfig.json'); if (sys.fileExists(file)) { - reportDiagnostic(createCompilerDiagnostic(Diagnostics.You_already_have_a_tsconfig_json_file_defined)); + reportDiagnostic(createCompilerDiagnostic(Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file)); } else { let compilerOptions = extend(commandLine.options, defaultInitCompilerOptions);