summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2016-01-13 04:27:20 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-13 12:28:17 +0000
commitc84d76b61300a74fb8720836ed5553dc9bc16539 (patch)
tree21a4f910f127408bf6926c51ac7bc8d8a9aed1e2
parent9dcea032c77ba86e2f790bf42b819b96240a743c (diff)
downloadchromium_src-c84d76b61300a74fb8720836ed5553dc9bc16539.zip
chromium_src-c84d76b61300a74fb8720836ed5553dc9bc16539.tar.gz
chromium_src-c84d76b61300a74fb8720836ed5553dc9bc16539.tar.bz2
Convert IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS to branded string.
Avoid using string interpolation to insert product name into string IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS instead provide two branded variants of the strings. BUG=568486 Review URL: https://codereview.chromium.org/1579213004 Cr-Commit-Position: refs/heads/master@{#369147}
-rw-r--r--components/translate_strings.grdp13
-rw-r--r--ios/chrome/browser/translate/never_translate_infobar_controller.mm2
2 files changed, 10 insertions, 5 deletions
diff --git a/components/translate_strings.grdp b/components/translate_strings.grdp
index f52e361..fb8caeb 100644
--- a/components/translate_strings.grdp
+++ b/components/translate_strings.grdp
@@ -43,9 +43,16 @@
Never translate <ph name="language">$1<ex>French</ex></ph>
</message>
<if expr="is_ios">
- <message name="IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS" desc="Message for the Translate infobar to allow the user to opt out. [Length: 250em] [iOS only]">
- Would you like <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> to offer to translate <ph name="LANGUAGE_NAME">$2<ex>French</ex></ph> pages from this site next time?
- </message>
+ <if expr="_google_chrome">
+ <message name="IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS" desc="Message for the Translate infobar to allow the user to opt out. [Length: 250em] [iOS only]">
+ Would you like Google Chrome to offer to translate <ph name="LANGUAGE_NAME">$2<ex>French</ex></ph> pages from this site next time?
+ </message>
+ </if>
+ <if expr="not _google_chrome">
+ <message name="IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS" desc="Message for the Translate infobar to allow the user to opt out. [Length: 250em] [iOS only]">
+ Would you like Chromium to offer to translate <ph name="LANGUAGE_NAME">$2<ex>French</ex></ph> pages from this site next time?
+ </message>
+ </if>
</if>
<message name="IDS_TRANSLATE_INFOBAR_ALWAYS_TRANSLATE" desc="Button label shown to always translate a specific language in the translate infobar">
Always translate <ph name="language">$1<ex>English</ex></ph>
diff --git a/ios/chrome/browser/translate/never_translate_infobar_controller.mm b/ios/chrome/browser/translate/never_translate_infobar_controller.mm
index f8f1a6a..0758dd0 100644
--- a/ios/chrome/browser/translate/never_translate_infobar_controller.mm
+++ b/ios/chrome/browser/translate/never_translate_infobar_controller.mm
@@ -10,7 +10,6 @@
#include "grit/components_strings.h"
#include "ios/chrome/browser/translate/translate_infobar_tags.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
-#import "ios/public/provider/chrome/browser/string_provider.h"
#import "ios/public/provider/chrome/browser/ui/infobar_view_delegate.h"
#import "ios/public/provider/chrome/browser/ui/infobar_view_protocol.h"
#include "ui/base/l10n/l10n_util.h"
@@ -45,7 +44,6 @@
translateInfoBarDelegate->original_language_name();
[infoBarView addLabel:l10n_util::GetNSStringF(
IDS_TRANSLATE_INFOBAR_NEVER_MESSAGE_IOS,
- provider->GetStringProvider()->GetProductName(),
originalLanguage)];
// Close button.
[infoBarView addCloseButtonWithTag:TranslateInfoBarIOSTag::CLOSE