Issue metadata
Sign in to add a comment
|
Accept-Language Headers Language Fix
Reported by
lquinn@blackberry.com,
Jun 27 2017
|
||||||||||||||||||||||||||||||||||||||||||||
Issue descriptionDevice name: BlackBerry KEYone From "Settings > About Chrome" Application version: 58.0.3029.83 Operating system: Android 7.1.1; BBB100-1 Build/NMF26F URLs (if applicable): https://pgl.yoyo.org/http/browser-headers.php Steps to reproduce: (1) In Android's Settings -> Language & input -> Languages, set "English (Canada)" as language #1 and "Français (Canada)" as language #2. (2) Observe the Accept-Language header sent by Chrome (for example, visit https://pgl.yoyo.org/http/browser-headers.php). (3) Visit various Web sites, such as https://mail.google.com. Expected result: (2) I would expect an Accept-Language header similar to "en-CA,en;q=0.8,fr-CA;q=0.6,fr;q=0.4". (3) I would expect English content from sites that support English. Actual result: (2) The Accept-Language header is "en-CA,fr-CA;q=0.8,fr;q=0.6,en-GB;q=0.4,en-US;q=0.2,en;q=0.2" (3) Some sites give English while others give French. The account login page for https://mail.google.com is in French. It seems wrong that Chrome's Accept-Language header prefers "fr" over "en" when the device language settings prefer English ahead of French.
,
Jun 29 2017
,
Jun 29 2017
,
Jun 30 2017
Assigning this to Claudio to make sure we handle this correctly in the settings refactoring.
,
Jun 30 2017
When I follow these steps, I get the following accept-language header(!):
en-AU,en;q=0.8,en-GB;q=0.6,en-US;q=0.4,da;q=0.2,zh-CN;q=0.2,zh;q=0.2,fr;q=0.2,es;q=0.2
The values in the intl.accept_languages preference are used ("en-AU,en,en-GB,en-US,da,zh-CN,zh,fr,es"). I have denied translation for a bunch of languages, and they have ended up in my accept languages. I don't think this is the correct behaviour.
,
Jul 6 2017
@Jon: the fact that denied languages show up in your accept languages is intentional and separate from the issue in this bug which is with regard to preferences of languages over locales. We should fix the behavior described by the reporter. With regard to the issue we describe, I think it's reasonable to accept that if you don't want a language translated, ever, that it should be in your language prefs. At least once we have settings on Android users will be able to see what we think their language prefs are and easily control them.
,
Aug 23 2017
Adding the label for all OS'es since this issue is not limited to Android.
,
Aug 25 2017
,
Aug 25 2017
,
Aug 25 2017
The fix we are going to introduce will add the base language after its corresponding language+region code. For more details, check the design doc: https://docs.google.com/document/d/10eGUww_2Ufv-YyGwnmr9ke_89Q6By_94v02FM_NTU24
,
Sep 1 2017
,
Sep 1 2017
,
Sep 1 2017
,
Sep 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/81326f93d7192cb2cc0d4b75c7e628474e60a9b8 commit 81326f93d7192cb2cc0d4b75c7e628474e60a9b8 Author: Claudio Magni <claudiomagni@chromium.org> Date: Fri Sep 01 05:21:18 2017 Fix the generation of Accept-Language headers. We add the base language to the Accept-Language headers, if a corresponding language+region code is present. This change wants to address a long-standing bug that occasionally makes websites return resources in a non-preferred language. See design doc: https://docs.google.com/document/d/10eGUww_2Ufv-YyGwnmr9ke_89Q6By_94v02FM_NTU24 Bug: 737232 Change-Id: I67bea7cb368c744330ec11773fe4a6a69c0e3959 Reviewed-on: https://chromium-review.googlesource.com/625496 Commit-Queue: Claudio M <claudiomagni@chromium.org> Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org> Cr-Commit-Position: refs/heads/master@{#499136} [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/about_flags.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/flag_descriptions.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/flag_descriptions.h [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/net/chrome_http_user_agent_settings.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/net/chrome_http_user_agent_settings.h [add] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/browser/net/chrome_http_user_agent_settings_unittest.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/common/chrome_features.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/common/chrome_features.h [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/chrome/test/BUILD.gn [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/net/http/http_util.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/net/http/http_util_unittest.cc [modify] https://crrev.com/81326f93d7192cb2cc0d4b75c7e628474e60a9b8/tools/metrics/histograms/enums.xml
,
Sep 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6ddc1c3486a8c1bf76b69268984bb05409a2fb31 commit 6ddc1c3486a8c1bf76b69268984bb05409a2fb31 Author: Claudio Magni <claudiomagni@chromium.org> Date: Sat Sep 02 05:51:43 2017 Change the new Accept-Language Headers logic to default-enabled. See design doc: https://docs.google.com/document/d/10eGUww_2Ufv-YyGwnmr9ke_89Q6By_94v02FM_NTU24 The main logic was introduced in https://chromium-review.googlesource.com/c/chromium/src/+/625496 Bug: 737232 Change-Id: I8f22cbba99a571edc1f95248ebb6ba8b5806d535 Reviewed-on: https://chromium-review.googlesource.com/647047 Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org> Commit-Queue: Claudio M <claudiomagni@chromium.org> Cr-Commit-Position: refs/heads/master@{#499388} [modify] https://crrev.com/6ddc1c3486a8c1bf76b69268984bb05409a2fb31/chrome/common/chrome_features.cc
,
Sep 4 2017
,
Sep 4 2017
,
Sep 4 2017
,
Sep 5 2017
Your change meets the bar and is auto-approved for M62. Please go ahead and merge the CL to branch 3202 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/92da6b3f73bea272a3031e789adac73fa4b57416 commit 92da6b3f73bea272a3031e789adac73fa4b57416 Author: Claudio Magni <claudiomagni@chromium.org> Date: Wed Sep 06 05:06:08 2017 Fix the generation of Accept-Language headers. We add the base language to the Accept-Language headers, if a corresponding language+region code is present. This change wants to address a long-standing bug that occasionally makes websites return resources in a non-preferred language. See design doc: https://docs.google.com/document/d/10eGUww_2Ufv-YyGwnmr9ke_89Q6By_94v02FM_NTU24 TBR=claudiomagni@chromium.org (cherry picked from commit 81326f93d7192cb2cc0d4b75c7e628474e60a9b8) Bug: 737232 Change-Id: I67bea7cb368c744330ec11773fe4a6a69c0e3959 Reviewed-on: https://chromium-review.googlesource.com/625496 Commit-Queue: Claudio M <claudiomagni@chromium.org> Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#499136} Reviewed-on: https://chromium-review.googlesource.com/651830 Reviewed-by: Marti Wong <martiw@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#38} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/about_flags.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/flag_descriptions.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/flag_descriptions.h [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/net/chrome_http_user_agent_settings.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/net/chrome_http_user_agent_settings.h [add] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/browser/net/chrome_http_user_agent_settings_unittest.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/common/chrome_features.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/common/chrome_features.h [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/chrome/test/BUILD.gn [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/net/http/http_util.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/net/http/http_util_unittest.cc [modify] https://crrev.com/92da6b3f73bea272a3031e789adac73fa4b57416/tools/metrics/histograms/enums.xml
,
Sep 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b96fcadc3fd680702ce0b9bc9be57aca49425268 commit b96fcadc3fd680702ce0b9bc9be57aca49425268 Author: Claudio Magni <claudiomagni@chromium.org> Date: Wed Sep 06 05:58:08 2017 Change the new Accept-Language Headers logic to default-enabled. See design doc: https://docs.google.com/document/d/10eGUww_2Ufv-YyGwnmr9ke_89Q6By_94v02FM_NTU24 The main logic was introduced in https://chromium-review.googlesource.com/c/chromium/src/+/625496 TBR=claudiomagni@chromium.org (cherry picked from commit 6ddc1c3486a8c1bf76b69268984bb05409a2fb31) Bug: 737232 Change-Id: I8f22cbba99a571edc1f95248ebb6ba8b5806d535 Reviewed-on: https://chromium-review.googlesource.com/647047 Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org> Commit-Queue: Claudio M <claudiomagni@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#499388} Reviewed-on: https://chromium-review.googlesource.com/651669 Reviewed-by: Marti Wong <martiw@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#39} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/b96fcadc3fd680702ce0b9bc9be57aca49425268/chrome/common/chrome_features.cc
,
Sep 10
This fix only affects Chrome, not WebView. claudiomagni@, amineer@, could this fix also be applied for WebView? I filed bug 882587 to track that.
,
Oct 16
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/656093235a0fc1d7c9d399deca7cd2a972939e2c commit 656093235a0fc1d7c9d399deca7cd2a972939e2c Author: Changwan Ryu <changwan@google.com> Date: Tue Oct 16 23:55:55 2018 Move ExpandLanguageList from chrome/ to net/ Such that we can use it from android_webview/. Bug: 882587 , 737232 Change-Id: I0006cabbdbb31dfbf1b36a67dd226fe54afe76a8 Reviewed-on: https://chromium-review.googlesource.com/c/1274598 Reviewed-by: Matt Menke <mmenke@chromium.org> Reviewed-by: Justin DeWitt <dewittj@chromium.org> Commit-Queue: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#600196} [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/chrome/browser/BUILD.gn [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/chrome/browser/android/explore_sites/explore_sites_fetcher.cc [delete] https://crrev.com/36f4d4de1f6244f3d7df3c08e13fbc7b16307419/chrome/browser/net/chrome_accept_language_settings.cc [delete] https://crrev.com/36f4d4de1f6244f3d7df3c08e13fbc7b16307419/chrome/browser/net/chrome_accept_language_settings.h [delete] https://crrev.com/36f4d4de1f6244f3d7df3c08e13fbc7b16307419/chrome/browser/net/chrome_accept_language_settings_unittest.cc [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/chrome/browser/net/profile_network_context_service.cc [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/chrome/test/BUILD.gn [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/net/http/http_util.cc [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/net/http/http_util.h [modify] https://crrev.com/656093235a0fc1d7c9d399deca7cd2a972939e2c/net/http/http_util_unittest.cc
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e69858666859ef9861f605c8b38c336bc76b04f8 commit e69858666859ef9861f605c8b38c336bc76b04f8 Author: Changwan Ryu <changwan@google.com> Date: Fri Oct 19 22:52:00 2018 Expand accept languages Expand accept languages by adding base language from language-country pair, using the same logic that Chrome is already using. This aligns with this W3C doc: https://www.w3.org/International/questions/qa-lang-priorities#langtagdetail Currently not behind a feature, will be followed by a change to use a feature. Also slightly refactoring tests to improve readability. Bug: 882587 , 737232 Change-Id: I1e067bde4ae5b00b6b7c3be765a9cd97bbbb96df Reviewed-on: https://chromium-review.googlesource.com/c/1286936 Commit-Queue: Changwan Ryu <changwan@chromium.org> Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Nate Fischer <ntfschr@chromium.org> Cr-Commit-Position: refs/heads/master@{#601334} [modify] https://crrev.com/e69858666859ef9861f605c8b38c336bc76b04f8/android_webview/browser/net/aw_http_user_agent_settings.cc [modify] https://crrev.com/e69858666859ef9861f605c8b38c336bc76b04f8/android_webview/javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java |
|||||||||||||||||||||||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||||||||||||||||||||||
Comment 1 by eroman@chromium.org
, Jun 28 2017