diff options
author | hajimehoshi@chromium.org <hajimehoshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 20:29:07 +0000 |
---|---|---|
committer | hajimehoshi@chromium.org <hajimehoshi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 20:29:07 +0000 |
commit | 32beec0c62867a9a31fc3aa17ccedfb486faf8f3 (patch) | |
tree | 7634b7523856b4608e01814790cfd6cd5279273c /tools/metrics | |
parent | 022f251ed0ba24467b8d78e89ab0893e12e63d73 (diff) | |
download | chromium_src-32beec0c62867a9a31fc3aa17ccedfb486faf8f3.zip chromium_src-32beec0c62867a9a31fc3aa17ccedfb486faf8f3.tar.gz chromium_src-32beec0c62867a9a31fc3aa17ccedfb486faf8f3.tar.bz2 |
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
Diffstat (limited to 'tools/metrics')
-rw-r--r-- | tools/metrics/histograms/histograms.xml | 11 |
1 files changed, 10 insertions, 1 deletions
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"> <summary> 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". </summary> </histogram> @@ -17952,6 +17959,8 @@ other types of suffix sets. <int value="2" label="CLD can not determine a language"/> <int value="3" label="CLD agrees with Content-Language"/> <int value="4" label="CLD disagrees with Content-Language"/> + <int value="5" label="CLD can be trusted"/> + <int value="6" label="CLD can complement a sub code"/> </enum> <enum name="TranslateScheme" type="int"> |