[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}
This commit is contained in:
parent
06697f7a82
commit
d2db7fa7f7
@ -574,7 +574,14 @@ std::set<std::string> Intl::BuildLocaleSet(
|
||||
for (const std::string& locale : icu_available_locales) {
|
||||
if (path != nullptr || validate_key != nullptr) {
|
||||
if (!ValidateResource(icu::Locale(locale.c_str()), path, validate_key)) {
|
||||
continue;
|
||||
// FIXME(chromium:1215606) Find a beter fix for nb->no fallback
|
||||
if (locale != "nb") {
|
||||
continue;
|
||||
}
|
||||
// Try no for nb
|
||||
if (!ValidateResource(icu::Locale("no"), path, validate_key)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
locales.insert(locale);
|
||||
|
Loading…
Reference in New Issue
Block a user