DescriptionTranslate: adopt html lang attribute if valid value is provided
Language decision is made by heuristics using Content-Language and CLD
determined language. This change adds html lang attribute, e.g.,
<html lang="ja">, as a third hint for language decision.
Content-Language is often invalid due to invalid server configuration.
On the other hand, lang attribute is provided by pages, or authoring
tools or authors themselves. As a result, they are more reliable than
Content-Language. With this change, language decision uses html lang
attribute instead of Content-Language if valid value is provided.
Other dicision process is not changed at all.
BUG=222073
TEST=unit_tests, browser_tests
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201856
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202427
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202531
Patch Set 1 #
Total comments: 4
Patch Set 2 : (rebase) #Patch Set 3 : review #Patch Set 4 : nits #Patch Set 5 : (rebase) #Patch Set 6 : fix #Patch Set 7 : fix #Patch Set 8 : fix WindowOpenClose crash #
Messages
Total messages: 15 (0 generated)
|