Skip to content

Commit d2db7fa

Browse files
FrankYFTangV8 LUCI CQ
authored andcommitted
[Intl] Fix nb / no fallback
ICU 69 moved content of nb resources to no and let nb fallback to no. This break our original design of checking locale availability. Hard wire to check on no if nb fail for now until we come out with a better fix. Bug: chromium:1215606 Change-Id: I831529d29590cc643ee0109fb2ce8948dac75613 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068010 Commit-Queue: Frank Tang <ftang@chromium.org> Reviewed-by: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#76044}
1 parent 06697f7 commit d2db7fa

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/objects/intl-objects.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,14 @@ std::set<std::string> Intl::BuildLocaleSet(
574574
for (const std::string& locale : icu_available_locales) {
575575
if (path != nullptr || validate_key != nullptr) {
576576
if (!ValidateResource(icu::Locale(locale.c_str()), path, validate_key)) {
577-
continue;
577+
// FIXME(chromium:1215606) Find a beter fix for nb->no fallback
578+
if (locale != "nb") {
579+
continue;
580+
}
581+
// Try no for nb
582+
if (!ValidateResource(icu::Locale("no"), path, validate_key)) {
583+
continue;
584+
}
578585
}
579586
}
580587
locales.insert(locale);

0 commit comments

Comments
 (0)