From 9cc9a99f4f80b65f836ca7c16c62d3cca0537a64 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 19 Apr 2016 14:00:14 -0700 Subject: [PATCH 1/2] Fix #8130: Do not fail if the resources for the specified locale does not exisit --- src/compiler/tsc.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index c2199cf7345..cada0c3daf8 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -44,11 +44,9 @@ namespace ts { const territory = matchResult[3]; // First try the entire locale, then fall back to just language if that's all we have. - if (!trySetLanguageAndTerritory(language, territory, errors) && - !trySetLanguageAndTerritory(language, undefined, errors)) { - - errors.push(createCompilerDiagnostic(Diagnostics.Unsupported_locale_0, locale)); - return false; + // Either ways do not fail, and fallback to the English diagnostic strings. + if (!trySetLanguageAndTerritory(language, territory, errors)) { + trySetLanguageAndTerritory(language, undefined, errors) } return true; From c53612dfb6320ae57ec14a45bef25a8ed17d7a96 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Tue, 19 Apr 2016 14:23:38 -0700 Subject: [PATCH 2/2] Add missing semicolon --- src/compiler/tsc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index cada0c3daf8..2e40cfdc53c 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -46,7 +46,7 @@ namespace ts { // First try the entire locale, then fall back to just language if that's all we have. // Either ways do not fail, and fallback to the English diagnostic strings. if (!trySetLanguageAndTerritory(language, territory, errors)) { - trySetLanguageAndTerritory(language, undefined, errors) + trySetLanguageAndTerritory(language, undefined, errors); } return true;