summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 23:55:48 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-06 23:55:48 +0000
commit05d1464668af89d91a53c99dd0b5e2aa1c784092 (patch)
treeb8f0305ebbe5e704699ee4e52aad9302af413d23
parent35dc42ded658d3129f7b7f215d9a8788ef1887ce (diff)
downloadchromium_src-05d1464668af89d91a53c99dd0b5e2aa1c784092.zip
chromium_src-05d1464668af89d91a53c99dd0b5e2aa1c784092.tar.gz
chromium_src-05d1464668af89d91a53c99dd0b5e2aa1c784092.tar.bz2
Merge 68398 - Localize instant string.
BUG=58763 TEST=manual Review URL: http://codereview.chromium.org/5601003 TBR=estade@chromium.org Review URL: http://codereview.chromium.org/5545004 git-svn-id: svn://svn.chromium.org/chrome/branches/597/src@68408 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd5
-rw-r--r--chrome/browser/dom_ui/options/browser_options_handler.cc2
-rw-r--r--chrome/browser/gtk/instant_confirm_dialog_gtk.cc2
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc2
-rw-r--r--chrome/browser/instant/instant_confirm_dialog.cc8
-rw-r--r--chrome/browser/instant/instant_confirm_dialog.h3
-rw-r--r--chrome/browser/ui/views/instant_confirm_view.cc2
-rw-r--r--chrome/browser/ui/views/options/general_page_view.cc3
8 files changed, 17 insertions, 10 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 4832e43..b6dc5c1 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -4208,6 +4208,9 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_INSTANT_PREF_WARNING" desc="Warning displayed beneath instant pref">
Omnibox input may be logged
</message>
+ <message name="IDS_INSTANT_LEARN_MORE_URL" desc="URL of help center page that explains browser instant" translateable="false">
+ http://www.google.com/support/chrome/bin/answer.py?answer=180655&amp;hl=[GRITLANGCODE]
+ </message>
<!-- Conflicts page -->
<message name="IDS_CONFLICTS_CHECK_PAGE_TABLE_TITLE_SUFFIX_ONE" desc="What gets appended after the page title if no conflicts were found.">
@@ -4264,7 +4267,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_CONFLICTS_NOT_LOADED_YET" desc="Shown next to a module that has not been loaded into memory yet">
Not loaded yet
</message>
- <message name="IDS_HELP_CENTER_VIEW_CONFLICTS" desc="The url of the Help center article for the View Conflicts page">
+ <message name="IDS_HELP_CENTER_VIEW_CONFLICTS" desc="The url of the Help center article for the View Conflicts page" translateable="false">
http://www.google.com/support/chrome/bin/answer.py?answer=666386&amp;hl=[GRITLANGCODE]&amp;n=<ph name="NAME">$1<ex>Hash</ex></ph>&amp;l=<ph name="LOCATION">$2<ex>Hash</ex></ph>&amp;d=<ph name="DESC">$3<ex>Hash</ex></ph>&amp;s=<ph name="SIGNER">$4<ex>Hash</ex></ph>
</message>
diff --git a/chrome/browser/dom_ui/options/browser_options_handler.cc b/chrome/browser/dom_ui/options/browser_options_handler.cc
index d49a534..a6775f7 100644
--- a/chrome/browser/dom_ui/options/browser_options_handler.cc
+++ b/chrome/browser/dom_ui/options/browser_options_handler.cc
@@ -77,7 +77,7 @@ void BrowserOptionsHandler::GetLocalizedValues(
localized_strings->SetString("instantWarningText",
l10n_util::GetStringUTF16(IDS_INSTANT_PREF_WARNING));
localized_strings->SetString("instantLearnMoreLink",
- ASCIIToUTF16(browser::kInstantLearnMoreURL));
+ ASCIIToUTF16(browser::InstantLearnMoreURL().spec()));
localized_strings->SetString("instantConfirmTitle",
l10n_util::GetStringUTF16(IDS_INSTANT_OPT_IN_TITLE));
localized_strings->SetString("instantConfirmMessage",
diff --git a/chrome/browser/gtk/instant_confirm_dialog_gtk.cc b/chrome/browser/gtk/instant_confirm_dialog_gtk.cc
index ab083b7..fcc95b6 100644
--- a/chrome/browser/gtk/instant_confirm_dialog_gtk.cc
+++ b/chrome/browser/gtk/instant_confirm_dialog_gtk.cc
@@ -73,5 +73,5 @@ void InstantConfirmDialogGtk::OnDialogResponse(GtkWidget* dialog,
}
void InstantConfirmDialogGtk::OnLinkButtonClicked(GtkWidget* button) {
- browser::ShowOptionsURL(profile_, GURL(browser::kInstantLearnMoreURL));
+ browser::ShowOptionsURL(profile_, browser::InstantLearnMoreURL());
}
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index ca34c7f..70e88b0 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -803,5 +803,5 @@ void GeneralPageGtk::OnInstantLabelSizeAllocate(GtkWidget* sender,
}
void GeneralPageGtk::OnSearchLearnMoreClicked(GtkWidget* sender) {
- browser::ShowOptionsURL(profile(), GURL(browser::kInstantLearnMoreURL));
+ browser::ShowOptionsURL(profile(), browser::InstantLearnMoreURL());
}
diff --git a/chrome/browser/instant/instant_confirm_dialog.cc b/chrome/browser/instant/instant_confirm_dialog.cc
index ee176ea..9999b9c 100644
--- a/chrome/browser/instant/instant_confirm_dialog.cc
+++ b/chrome/browser/instant/instant_confirm_dialog.cc
@@ -4,16 +4,20 @@
#include "chrome/browser/instant/instant_confirm_dialog.h"
+#include "app/l10n_util.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/instant/promo_counter.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profile.h"
#include "chrome/common/pref_names.h"
+#include "googleurl/src/gurl.h"
+#include "grit/generated_resources.h"
namespace browser {
-const char kInstantLearnMoreURL[] =
- "http://www.google.com/support/chrome/bin/answer.py?answer=180655";
+GURL InstantLearnMoreURL() {
+ return GURL(l10n_util::GetStringUTF8(IDS_INSTANT_LEARN_MORE_URL));
+}
void ShowInstantConfirmDialogIfNecessary(gfx::NativeWindow parent,
Profile* profile) {
diff --git a/chrome/browser/instant/instant_confirm_dialog.h b/chrome/browser/instant/instant_confirm_dialog.h
index bdd5554..f8cfe21 100644
--- a/chrome/browser/instant/instant_confirm_dialog.h
+++ b/chrome/browser/instant/instant_confirm_dialog.h
@@ -8,12 +8,13 @@
#include "gfx/native_widget_types.h"
+class GURL;
class Profile;
namespace browser {
// URL for learning more about instant.
-extern const char kInstantLearnMoreURL[];
+GURL InstantLearnMoreURL();
// Invoked from the opt-in and preferences when the user toggles instant. If the
// instant confirm dialog hasn't been shown, it's shown. If the instant dialog
diff --git a/chrome/browser/ui/views/instant_confirm_view.cc b/chrome/browser/ui/views/instant_confirm_view.cc
index bc750e7..f8686ee 100644
--- a/chrome/browser/ui/views/instant_confirm_view.cc
+++ b/chrome/browser/ui/views/instant_confirm_view.cc
@@ -81,7 +81,7 @@ bool InstantConfirmView::IsModal() const {
void InstantConfirmView::LinkActivated(views::Link* source, int event_flags) {
Browser* browser = BrowserList::GetLastActive();
- browser->OpenURL(GURL(browser::kInstantLearnMoreURL), GURL(),
+ browser->OpenURL(browser::InstantLearnMoreURL(), GURL(),
NEW_FOREGROUND_TAB, PageTransition::TYPED);
}
diff --git a/chrome/browser/ui/views/options/general_page_view.cc b/chrome/browser/ui/views/options/general_page_view.cc
index e8a5457..623b592 100644
--- a/chrome/browser/ui/views/options/general_page_view.cc
+++ b/chrome/browser/ui/views/options/general_page_view.cc
@@ -453,8 +453,7 @@ void GeneralPageView::HighlightGroup(OptionsGroup highlight_group) {
void GeneralPageView::LinkActivated(views::Link* source, int event_flags) {
DCHECK(source == instant_link_);
- browser::ShowOptionsURL(profile(),
- GURL(browser::kInstantLearnMoreURL));
+ browser::ShowOptionsURL(profile(), browser::InstantLearnMoreURL());
}
///////////////////////////////////////////////////////////////////////////////