Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Issue 2882143002: Fix the bug that 'Afikaans' is unable to be selected in language menu. (Closed)

Created:
3 years, 7 months ago by Marti Wong
Modified:
3 years, 7 months ago
Reviewers:
mdjones, googleo
CC:
chromium-reviews, agrieve+watch_chromium.org, dfalcantara+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the bug that 'Afikaans' is unable to be selected in language menu. It is because the item 'Afikaans' was mistakenly disabled in TranslateMenuHelper#isEnabled() as its mId = TranslateMenu.ID_UNDEFINED. This could be fixed by creating Id offsets for the menuItems of different menus. (MENU_OVERFLOW, MENU_TARGET_LANGUAGE, MENU_SOURCE_LANGUAGE.) This can prevent the menuItem's IDs of those menus from overlapping. And make menu bugs in future easier to investigate and fix. More info: MENU_OVERFLOW is the menu which shows after clicking on the "3 dots" menu button on the new translation infobar. MENU_TARGET_LANGUAGE is the menu which shows after clicking on "More Languages" on the overflow menu above. MENU_SOURCE_LANGUAGE is the menu which shows after clicking on "Page not in this language" on the overflow menu. Prototype of the new translation infobar: https://bbergher.googleplex.com/prototypes/translate/easier-1/ BUG=721950 Review-Url: https://codereview.chromium.org/2882143002 Cr-Commit-Position: refs/heads/master@{#471990} Committed: https://chromium.googlesource.com/chromium/src/+/6a55a101eb8e05a04285cfd416b6506d711a7d19

Patch Set 1 : fix #

Patch Set 2 : make ID_UNDEFINED = -1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -7 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/infobar/translate/TranslateMenu.java View 1 1 chunk +7 lines, -7 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
Marti Wong
PTAL. thanks
3 years, 7 months ago (2017-05-15 01:20:44 UTC) #2
mdjones
Would it make more sense for ID_UNDEFINED to be a negative number so it never ...
3 years, 7 months ago (2017-05-15 16:25:21 UTC) #7
Marti Wong
On 2017/05/15 16:25:21, mdjones wrote: > Would it make more sense for ID_UNDEFINED to be ...
3 years, 7 months ago (2017-05-16 00:21:02 UTC) #9
mdjones
lgtm
3 years, 7 months ago (2017-05-16 00:45:15 UTC) #10
mdjones
On 2017/05/16 00:45:15, mdjones wrote: > lgtm Also update the description to match the solution.
3 years, 7 months ago (2017-05-16 00:46:00 UTC) #11
Marti Wong
On 2017/05/16 00:45:15, mdjones wrote: > lgtm thanks Matthew!
3 years, 7 months ago (2017-05-16 00:46:02 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2882143002/40001
3 years, 7 months ago (2017-05-16 00:47:02 UTC) #14
commit-bot: I haz the power
3 years, 7 months ago (2017-05-16 02:42:47 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/6a55a101eb8e05a04285cfd416b6...

Powered by Google App Engine
This is Rietveld 408576698