• Jungshik Shin's avatar
    Fix the fast path for locale canonicalization · 919270e0
    Jungshik Shin authored
    Not all 2 or 3 letter language codes are canonical. Some of them need
    to be canonicalized.
    
    Specifically, exclude {jw,ji,iw,in} and all three-letter codes from the
    fast path except for 'fil'.
    
    {jw,ji,iw,in} are deprecated ISO 639 codes for
    {Javanese, Yiddish, Hebrew, Indonesian}. They should be
    canonicalized to {jv,yi,he,id}. So, do not return early
    in the fast path, but pass it down to the full canonicalization.
    
    In addition, there are 70+ deprecated 3-letter codes that need to be
    replaced by their modern equivalents. Instead of checking and replacing
    in v8, just pass them to ICU to handle.
    
    Along with the following ICU change, two more tests will pass.
    
      https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1026797
    
    These two tests still fail because of the disagreement between ICU and the test
    expectations about 5 grandfathered tags with no preferred value (e.g.
    i-default, zh-min, cel-gaulish).
    
      'intl402/Intl/getCanonicalLocales/canonicalized-tags'
      'intl402/Intl/getCanonicalLocales/preferred-grandfathered'
    
    Bug: v8:5693, v8:7669
    Test: test262/intl402/language-tags-canonicalized.js
    Test: test262/intl402/Intl/preferred-variants.js
    Test: intl/general/language_tags_with_preferred_values.js
    Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
    Change-Id: Ide7e9c90ac046859604c7b71c641f84ce9c64be5
    Reviewed-on: https://chromium-review.googlesource.com/1023379Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Jungshik Shin <jshin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52823}
    919270e0
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...