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

Unified Diff: chrome/browser/translate/translate_infobar_delegate.cc

Issue 15295004: Translate: enable against unknown languages with server side detection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/translate/translate_infobar_delegate.cc
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 3a93725ad6914403e813d6b4754ed53f0faf7d83..907b37ba88c42fd08b8d18574ea03e4e74a06771 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -290,6 +290,20 @@ void TranslateInfoBarDelegate::GetAfterTranslateStrings(
strings->push_back(text.substr(offsets[1]));
}
+// static
+void TranslateInfoBarDelegate::GetAfterTranslateWithAutoStrings(
+ std::vector<string16>* strings) {
+ DCHECK(strings);
+
+ size_t offset;
+ string16 text =
+ l10n_util::GetStringFUTF16(IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_WITH_AUTO,
+ string16(), &offset);
+
+ strings->push_back(text.substr(0, offset));
+ strings->push_back(text.substr(offset));
+}
+
TranslateInfoBarDelegate::TranslateInfoBarDelegate(
Type infobar_type,
TranslateErrors::Type error_type,

Powered by Google App Engine
This is Rietveld 408576698