5228af67e1
Different Intl features (DateTimeFormat, NumberFormat, etc) have different lists of locales supported. Previously, the default locale was set to "und", as opposed to what was detected from the surrounding system, if any of these features was missing data. With this patch, only that feature is set to "und". In this way, the data quality should be just as good as if there were no fallback logic, but at the same time, resolvedOptions().locale should show the locale actually in effect. R=adamk,jshin BUG=v8:6288 Change-Id: I62b083a1dde2465cb1541cb18ecc7e59f9097bc0 Reviewed-on: https://chromium-review.googlesource.com/492886 Commit-Queue: Daniel Ehrenberg <littledan@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#45109}
14 lines
478 B
JavaScript
14 lines
478 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Environment Variables: LC_ALL=pt-BR.UTF8
|
|
|
|
// The data files packaged with d8 currently have Brazillian Portugese
|
|
// DateTimeFormat but not Collation
|
|
|
|
if (this.Intl) {
|
|
assertEquals('und', Intl.Collator().resolvedOptions().locale);
|
|
assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale);
|
|
}
|