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

Unified Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 525013: Suppress promotional line and image on non-English builds of Chrome.... (Closed) Base URL: svn://chrome-svn/chrome/branches/249/src/
Patch Set: '' Created 10 years, 12 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
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_theme_source.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 35476)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -19,6 +19,7 @@
#include "base/string_piece.h"
#include "base/thread.h"
#include "chrome/browser/browser.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
#include "chrome/browser/dom_ui/dom_ui_theme_source.h"
#include "chrome/browser/dom_ui/most_visited_handler.h"
@@ -916,9 +917,21 @@
std::wstring extensionLink = ASCIIToWide(
google_util::AppendGoogleLocaleParam(
GURL(extension_urls::kGalleryBrowsePrefix)).spec());
- localized_strings.SetString(L"promomessage",
- l10n_util::GetStringF(IDS_NTP_PROMO_MESSAGE,
- l10n_util::GetString(IDS_PRODUCT_NAME), extensionLink));
+
+ if (StartsWithASCII(g_browser_process->GetApplicationLocale(),
+ "en", false)) { // false = compare not case-sensitive.
+ // In en locales, promote sync and extensions.
+ localized_strings.SetString(L"promomessage",
+ l10n_util::GetStringF(IDS_NTP_PROMO_MESSAGE,
+ l10n_util::GetString(IDS_PRODUCT_NAME), extensionLink));
+ } else {
+ // In non-en locales, only promote sync. This message is a hack, using an
+ // available translated string to promote bookmark sync without extensions.
+ localized_strings.SetString(L"promomessage",
+ L"<button>" +
+ l10n_util::GetString(IDS_SYNC_START_SYNC_BUTTON_LABEL) +
+ L"</button>");
+ }
localized_strings.SetString(L"extensionslink", extensionLink);
localized_strings.SetString(L"close", l10n_util::GetString(IDS_CLOSE));
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_theme_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698