Fix #8130: Do not fail if the resources for the specified locale does not exisit
This commit is contained in:
parent
edc3ed37ca
commit
9cc9a99f4f
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue