Issue metadata
Sign in to add a comment
|
Incorrect runtime language in WebView with Intl.NumberFormat
Reported by
ninn...@gmail.com,
Feb 27 2018
|
||||||||||||||||||||
Issue descriptionSteps to reproduce the problem: 1. Create an Activity with a simple WebView in it 2. Enable Javascript in the WebView 3. Create an instance of Intl.NumberFormat w/o a specific locale in its constructor and read Intl.NumberFormat.resolvedOptions().locale value 4. Change device language through Settings application 5. Repeat step 3 What is the expected behavior? Intl.NumberFormat.resolvedOptions().locale should match the user's preferred language/locale. What went wrong? Intl.NumberFormat.resolvedOptions().locale is always set to "en-US" no matter which is the preferred user's language/locale. Did this work before? Yes Android 7.1.1 Chrome version: 64.0.3282.137 Channel: stable OS Version: 8.0.0 Flash Version: Intl.NumberFormat.resolvedOptions().locale matches user's language/locale on API < 26.
,
Feb 27 2018
Verified this pen works fine when switching languages in Chrome: https://codepen.io/rbyers/full/jZQJaq, so not a generic Chrome issue. Over to WebView triage to confirm a WebView-specific regression.
,
Feb 27 2018
Chromium doesn't really support changing locale without restarting the process. Chrome handles this by exiting itself when you switch locale, so that when you come back to Chrome it restarts with the new locale, but WebView can't do that on the application's behalf. Can you reproduce this issue after making sure that the application process has entirely exited?
,
Feb 27 2018
Yes, I still can reproduce after killing the whole application process altogether (via adb shell run-as <application-package> and killing the process from there). Please note that navigator.language (and navigator.languages) are correctly updated each time I edit device locales.
,
Feb 28 2018
,
Feb 28 2018
ninniuz@ -- Thanks for reporting this issue with the sample file to reproduce. Unfortunately from the attachment .apk file is not found. Could you please compile to Android APK and share. Also, could you please provide the screen cast of the issue. That would help us in understanding and triaging the issue further. Thanks in advance!
,
Feb 28 2018
Please find attached an Android APK to reproduce the issue and a screencast grabbed from a Nexus 5X emulator with Android 8.0.0. Let me know if you need further info!
,
Feb 28 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 1 2018
Tested the issue in Android and able to reproduce the issue. Similar behavior is observed since Chrome #58.0.3029.83 Steps Followed: 1. Install the .apk file provided in the Comment #7. 2. From the device settings, change the language to any language other than English. Eg.: Arabic/Spanish/Urdu etc. 3. Launch the application installed in Step-1 4. Observed that the component "Intl.Numberformat locale" is always displayed as en-US. Chrome versions tested: 58.0.3029.83, 64.0.3282.137(Stable), 66.0.3355.0(Canary) OS: Android 7.0.0 Android Devices: Samsung J7 This seems to be a Non-Regression issue as same behavior is seen since M58. Untriaged for further input's on this issue. Please navigate to below link for log's and video-- go/chrome-androidlogs/816902 Thanks!
,
Mar 1 2018
I cannot reproduce on emulator running Android 7.0.0 and Chrome stable 64.0.3282.137
,
Mar 2 2018
I can reproduce this. I also see that the locale is always "en-US", even if I reboot the device or reinstall WebView. > Did this work before? Yes Android 7.1.1 I've tried this on N and O with 64.0.3282.137. I consistently see the bug, I haven't been able to repro the correct behavior, even after rebooting the device. ninniuz@ Can you upload a screenrecord of you reproducing the correct behavior? Also in the recording, please show the build fingerprint (Settings > About phone > Build number). If this really is a regression between Android 7.1.1 (N-MR1) and Android 8.0.0 (O), then this possibly points to a change in a framework API.
,
Mar 7 2018
Hi, Thank you for reporting this issue. However, this is not a localization issue. Unable to reproduce the steps as well. We will be looping in the Engineering Team for review. Regards!
,
Mar 7 2018
@ntfschr please find attached a screenrecord of a working example with a Moto Z Play device running Android 7.1.1
,
Mar 7 2018
Another screencast from an emulator running Android 7.0
,
Mar 16 2018
Removing needs feedback label, somehow monarail is not working correctly.
,
Mar 16 2018
Yep, I can repro this with Android O and see the correct behavior with Android 7.1.2.
,
Mar 19 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by ninn...@gmail.com
, Feb 27 2018130 KB
130 KB Download