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

Issue 807317 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Unable to remove languages that aren't in the predefined list

Reported by sam.kauf...@vistashare.com, Jan 30 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Go to Settings -> Languages.
2. Turn on "Offer to translate pages that aren't in a language you read."
3. Visit a Haitian Creole web page such as https://ht.wikipedia.org/wiki/Paj_Prensipal
4. When asked if Chromium should translate the page, click No. "ht" has now been added to your "accept-language" header.
5. Go to Settings -> Languages.
6. Haitian Creole is not listed as one of your languages and therefore cannot be removed from your header.

What is the expected behavior?
The language setup area should list all of the user's accepted languages.

What went wrong?
Only a predefined list of languages is available under "Add Languages." In the UI, the list of the user's accepted languages is filtered to only those that are in this predefined list. If the user accepts a language not in the list, like Haitian Creole, the language will not show up in the list of the user's accepted languages, giving the user no way to remove it.

Did this work before? N/A 

Chrome version: 63.0.3239.84  Channel: stable
OS Version: Debian 9
Flash Version: Shockwave Flash 28.0 r0

Ideally the user would also be able to add languages that aren't in the predefined list.
 
Labels: Needs-Triage-M63

Comment 2 by b...@chromium.org, Jan 30 2018

Components: UI>Settings UI>Internationalization
Labels: Triaged-ET M-66 FoundIn-66 Target-66 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #63.0.3239.84, latest stable #64.0.3282.168 and latest canary #66.0.3350.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!

Comment 4 by dpa...@chromium.org, Feb 20 2018

Cc: michae...@chromium.org
Owner: claudiomagni@chromium.org

Comment 5 by dpa...@chromium.org, Feb 20 2018

@claudiomagni: Can you triage this bug? Is it basically a feature request?

Comment 6 Deleted

Just to say a bit more about the problems caused by this issue:

Haitian Creole was added to my list of accepted languages automatically, and I can't remove it. I also can't change the position of Haitian Creole in the list. I have been doing some language testing in which I manually added and removed several languages from my list using the UI. Every time I removed a language that was higher than Haitian Creole, Haitian Creole invisibly moved up the list until it was at the top. Now it is my browser's #1 preferred language, and I can't remove it or reorder it. This has an obvious negative effect on my browsing experience.

Thanks for looking into this.

Comment 8 by dpa...@chromium.org, Feb 21 2018

Cc: anthonyvd@chromium.org
Not a real fix, but here's a workaround for you, Sam:

1. Open chrome://settings
2. Open JS console with Ctrl+Shift+J
3. Type chrome.languageSettingsPrivate.disableLanguage('ht')

where 'ht' is the language code for Haitian Creole in this example.
Thank you! That worked.
Cc: claudiomagni@chromium.org
Owner: yyushkina@chromium.org
Status: Available (was: Untriaged)
Sam,
this is a bug and it has to do with different lists of languages used in the Language Settings page vs. the Translate prompt.

I've assigned this to Yana to find suitable owner.
Cc: yyushkina@chromium.org
Components: UI>Browser>Language
Labels: OS-Android OS-Chrome
Owner: anthonyvd@chromium.org
It's not so much the Translate prompt but the languages available on the web. I think the list of languages available in language settings should be equivalent to what we can detect through CLD3. Assigning this to Anthony, our new TL.


Status: Assigned (was: Available)

Comment 14 Deleted

Comment 15 by hellm...@mitbiz.de, Apr 27 2018

On Android (Chrome 66.0.3359.126), the same filtering bug affect users who have one language (or more) configured as their OS language, which is not part of Chrome's Language Settings page.

Example with "en-DE":

1. In the Android OS language settings, configure "en-DE" as the only language
2. Check navigator.languages, which is now: en-DE, en-US, en
3. Check Chrome's Language Settings page, which shows: English (United States), English

So "English (Germany)" has been omitted. This causes further problems during re-ordering or when adding other languages:

4. In the OS language settings, add "es-MX" as 2nd language
5. Check navigator.languages, which is now: en-DE, es-MX, es, en-US, en
6. Check Chrome's Language Settings page, which shows: Spanish (Mexico), Spanish, English (United States), English

Note that the "hidden" en-DE is still first in navigator.languages and subsequently in navigator.language. In the Languages Settings page it appears that websites would try to provide content in Spanish, while in fact the primarily accepted locale is en-DE.
Owner: nicolaso@chromium.org
Cc: js...@chromium.org
So, these locales don't appear in the Settings page right now, because they're not in `kAcceptLanguageList` [1]. They are still being translated, because they are in CLD3's language detection list [2].

As a first step, we could add those missing entries to `kAcceptLanguageList`, which would solve the problem from the first comment. Any language we can detect with CLD3 (and offer translations for) would at least show up in the Chrome Settings menu.

As for Hellmund's problem, we might need a more sophisticated solution, but let's start with step 1 for now.

[1] https://cs.chromium.org/chromium/src/ui/base/l10n/l10n_util.cc?l=51&rcl=bac9e16fb3877aef8aad360be5ab806daf454e81
[2] https://cs.chromium.org/chromium/src/third_party/cld_3/src/src/task_context_params.cc?l=43&rcl=484afe9ba7438d078e60b3a26e7fb590213c0e17
Project Member

Comment 18 by bugdroid1@chromium.org, Jun 20 2018

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

commit 38d8d6d9985356a1d6e1d8fd8519bae84ce81871
Author: Nicolas Ouellet-payeur <nicolaso@chromium.org>
Date: Wed Jun 20 20:35:47 2018

Add missing CLD3 languages to `kAcceptLanguageList`

These were languages that we can detect with CLD3 (and offer translations for),
but wouldn't appear in the Chrome Settings page, and therefore couldn't be
removed from the Accept-Language list.

The list of missing languages was obtained by calculating the set difference
of `kLanguageNames` (from task_context_params.cc) and `kAcceptLanguageList`
(from l10n_util.cc):

https://paste.googleplex.com/6446173711761408
(apologies for external contributors who can't visit the link)

Languages that end in '-Latn' (e.g. 'zh-Latn') are not supported by Translate
and were not added to `kAcceptLanguageList`.

Bug:  807317 
Change-Id: I83386fb5cb7ecbb3aae04aa1d1ca87ad0f0df34c
Reviewed-on: https://chromium-review.googlesource.com/1107878
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568996}
[modify] https://crrev.com/38d8d6d9985356a1d6e1d8fd8519bae84ce81871/chrome/browser/chromeos/locale_change_guard_unittest.cc
[modify] https://crrev.com/38d8d6d9985356a1d6e1d8fd8519bae84ce81871/ui/base/l10n/l10n_util.cc

Status: Fixed (was: Assigned)

Sign in to add a comment