Skip to content

Commit 704f3bf

Browse files
committed
Merge pull request #8193 from Microsoft/noErrorOnFailedResourceLookup
Fix #8130: Do not fail if the resources for the specified locale does not exisit
2 parents 1ac2539 + c53612d commit 704f3bf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/compiler/tsc.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ namespace ts {
4444
const territory = matchResult[3];
4545

4646
// First try the entire locale, then fall back to just language if that's all we have.
47-
if (!trySetLanguageAndTerritory(language, territory, errors) &&
48-
!trySetLanguageAndTerritory(language, undefined, errors)) {
49-
50-
errors.push(createCompilerDiagnostic(Diagnostics.Unsupported_locale_0, locale));
51-
return false;
47+
// Either ways do not fail, and fallback to the English diagnostic strings.
48+
if (!trySetLanguageAndTerritory(language, territory, errors)) {
49+
trySetLanguageAndTerritory(language, undefined, errors);
5250
}
5351

5452
return true;

0 commit comments

Comments
 (0)