From 32beec0c62867a9a31fc3aa17ccedfb486faf8f3 Mon Sep 17 00:00:00 2001 From: "hajimehoshi@chromium.org" Date: Thu, 20 Jun 2013 20:29:07 +0000 Subject: Translate: Preserve the dialect code of Chinese When a page whose Content-Language was 'zh' (not 'zh-TW' or 'zh-CN') was opened, even though CLD knew the dielect of the page, the Translate infobar didn't appear. This CL respects the result of CLD when Content-Language and CLD agree that the page is written in Chinese and the Content-Language doesn't know the dialect. BUG=250735 Review URL: https://chromiumcodereview.appspot.com/17230003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207543 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/metrics/histograms/histograms.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/metrics/histograms') diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 6dd5ec6..fa831e7 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml @@ -11288,7 +11288,14 @@ other types of suffix sets. enum="TranslateLanguageVerification"> For each page load, measures whether the provided Content-Language header - matches the language determined by CLD. + matches the language determined by CLD. Beyond directly matching or + mismatching the Content-Language header, CLD can complement the + Content-Language. For example, suppose the Content-Language header + specifies 'zh' (general Chinese), a language code that the Translate server + does not support. In this case, CLD can detect a subcode like '-TW' or + '-CN', resulting in language codes 'zh-TW' and 'zh-CN', which the Translate + server supports. This is referred to as "complementing a language + subcode". @@ -17952,6 +17959,8 @@ other types of suffix sets. + + -- cgit v1.1