New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 751441 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[Chrome][M59][Android 7.1.2] language token of app shoutcut doesn't reflect language setting on O devices.

Reported by seiyon.p...@gmail.com, Aug 2 2017

Issue description

Steps to reproduce the problem:
1. Go to Setting > Language > Korean (non-English language)
2. Open Up Chrome > Open 3 new tabs
3. Go to Setting > Language > English

What is the expected behavior?
language token of app shoutcut should reflect language setting accordingly.

What went wrong?
language tokens are Korean not English.

Did this work before? N/A 

Chrome version: 59.0.3071.125  Channel: stable
OS Version: 7.1.2
Flash Version:
 
Cc: ram...@chromium.org
Labels: triage-te
Labels: Needs-Feedback
Can you share a video or screenshot with this report? Not able to repro on Chrome stable '59.0.3071.125' on Nexus 6p/N2G48D.
Thanks.

Comment 3 by seiyon.p...@lge.com, Sep 26 2017

Could you check this on O OS nexus device?
ChromeBug751441_issue1.png
6.9 MB View Download
ChromeBug751441_issue2.png
6.7 MB View Download

Comment 4 by ram...@chromium.org, Sep 28 2017

Cc: tedc...@chromium.org yus...@chromium.org
Components: -UI UI>Internationalization
Labels: -triage-te -Needs-Feedback M-62
Status: Available (was: Unconfirmed)
Summary: [Chrome][M59][Android 7.1.2] language token of app shoutcut doesn't reflect language setting on O devices. (was: [Chrome][M59][Android 7.1.2] language token of app shoutcut doesn't reflect language setting)
Device: Pixel XL/O
Chrome version:61.0.3163.98
Bug is 100% repro and not a regression issue.

1. Launch Chrome.
2. Change system language to double bye (Chinese, Korean).
3. Long press Chrome.

Result:
New tab/Incognito are correctly translated.
4. Change language to RTL
5. Long press chrome.

New tab popup menu is display in RTL and New incognito in double byte.


Results:
When changing language settings, the New tab & New incognito are being displayed in different languages.

Expected:
Long press chrome should display popup menus as set in system language settings.

Example: Maps.

Owner: twelling...@chromium.org
Status: Assigned (was: Available)
Ramine@ - does htis only reproduce on Android O? If so, will you please file a bug with the Android team in buganizer.

This seems like an Android bug to me. We go through the system context.getResources.getString() methods when setting strings for launcher shortcuts (Chrome isn't doing anything special).
Labels: Needs-Feedback
We converted to dynamic shortcuts for incognito right?  It looks like incognito is being duplicated and I wonder if that is the problem with android where it doesn't handle localization changes right with dynamic shortcuts?
We only converted incognito to dynamic. The "New tab" shortcut is still a static launcher shortcut, so I would expect the system to handle updates based on language changes.

We only add the dynamic shortcut once (it's blocked on a shared preference), so I wouldn't expect there to ever be 3 shortcuts.

Furthermore, from the dynamic shortcut According to the documentation, "if there are already dynamic or pinned shortcuts with the same IDs, each mutable shortcut is updated." It's possible that the framework expects apps to re-add dynamic shortcuts when the device language changes.
Tested on NMR1 in Spanish and it looks like dynamic shortcuts don't get updated when the device language changes :( The Android documentation confirms this.

Rate limits are reset when an app is foregrounded, so we can probably just remove the shared preference gating addition of the dynamic preference.

I'm still confused about how seiyon.park@lge.com ended up with 3 shortcuts, though.




Project Member

Comment 11 by bugdroid1@chromium.org, Sep 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/beb5322616421666239e3c6ed63a5e4c33f393f6

commit beb5322616421666239e3c6ed63a5e4c33f393f6
Author: Theresa Wellington <twellington@google.com>
Date: Fri Sep 29 21:07:28 2017

[Launcher shortcuts] Continuously update dynamic launcher shortcuts

Apps are responsible for updating their own dynamic launcher shortcuts
when the system language changes. This change always updates the
launcher shortcut onDeferredStartup(). Functionally this means language
changes will not be reflected in the dynamic shortcut until after Chrome
is restarted. We need the native library to be initialized in order to
check if incognito mode is enabled so this is preferred to a broadcast
receiver that listens for locale changes.

BUG= 751441 

Change-Id: Ic93814a03e5f17191d9a021c68d3cca69f9650b8
Reviewed-on: https://chromium-review.googlesource.com/692619
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505456}
[modify] https://crrev.com/beb5322616421666239e3c6ed63a5e4c33f393f6/chrome/android/java/src/org/chromium/chrome/browser/LauncherShortcutActivity.java

Status: Fixed (was: Assigned)
The expected behavior after the patch in #11 is:

1. Freshly install Chrome
2. Long-press Chrome icon, only "New tab" shortcut is present
3. Launch Chrome
2. Go back to homescreen, long-press Chrome icon, both "New tab" and "New incognito tab" present
3. Change device language
4. Long-press on Chrome icon, "New tab" is translated but "New incognito tab" is not
5. Remove Chrome from Android recents, relaunch Chrome
6. Long-press Chrome icon, both "New tab" and "New incognito tab" are translated.

Sign in to add a comment