diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 16:48:02 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-30 16:48:02 +0000 |
commit | 7f90c383008605329c4f6dedcba0a7587aa6dfd9 (patch) | |
tree | 5a0753787094c7845075345c3e4da2417da12d2f /chrome/common/translate_errors.h | |
parent | 44db7c6b5a0dd41bfbd8145a74cc6948fe2d6c04 (diff) | |
download | chromium_src-7f90c383008605329c4f6dedcba0a7587aa6dfd9.zip chromium_src-7f90c383008605329c4f6dedcba0a7587aa6dfd9.tar.gz chromium_src-7f90c383008605329c4f6dedcba0a7587aa6dfd9.tar.bz2 |
Adds support for language detection on the server side.
The CLD can sometimes fail to detect the language of a page, in which case the translate server might be able to. This CL ensures the browser deals with the server side language detection properly.
Also added a new factory method to create error translate infobar delegates that does not assert when the language code is incorrect.
Also changed the enums in TranslateInfoBarDelegate2 to use the constant name style, as it is the preferred naming for enums according to the style guide.
Original review:
http://codereview.chromium.org/2859013/show
BUG=40857
TEST=Visit http://www.saanconf.org/saanday.htm, use the context menu
to translate the page. You should get an error mentioning the
page is already in English.
Review URL: http://codereview.chromium.org/2860037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/translate_errors.h')
-rw-r--r-- | chrome/common/translate_errors.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/common/translate_errors.h b/chrome/common/translate_errors.h index c8f4225..56a104c 100644 --- a/chrome/common/translate_errors.h +++ b/chrome/common/translate_errors.h @@ -13,8 +13,10 @@ class TranslateErrors { NONE = 0, NETWORK, // No connectivity. INITIALIZATION_ERROR, // The translation script failed to initialize. - TRANSLATION_ERROR, // An error was reported by the translation script - // during translation. + UNKNOWN_LANGUAGE, // The page's language could not be detected. + IDENTICAL_LANGUAGES, // The original and target languages are the same. + TRANSLATION_ERROR, // An error was reported by the translation script + // during translation. }; private: |