summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 19:36:45 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 19:36:45 +0000
commita830b88172bbf4fc48847bd739ac14897346aea3 (patch)
tree30537941d05b8b48dcca915154fcdf202a943e72
parent7ca8be715ac89620f8c6985aaba8d2809f559fd7 (diff)
downloadchromium_src-a830b88172bbf4fc48847bd739ac14897346aea3.zip
chromium_src-a830b88172bbf4fc48847bd739ac14897346aea3.tar.gz
chromium_src-a830b88172bbf4fc48847bd739ac14897346aea3.tar.bz2
Update plug-in infobar/placeholder strings.
BUG=92795 TEST=manual Review URL: http://codereview.chromium.org/9857010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128974 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd37
-rw-r--r--chrome/browser/plugin_infobar_delegates.cc34
-rw-r--r--chrome/renderer/plugins/plugin_placeholder.cc13
-rw-r--r--chrome/renderer/plugins/plugin_placeholder.h1
4 files changed, 51 insertions, 34 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 4fa3795..384399f4 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5594,7 +5594,7 @@ Because search results are requested even while you're typing your query, your d
<!-- Plug-in placeholders -->
<message name="IDS_PLUGIN_LOAD" desc="The link for loading a blocked plug-in, displayed in the click to play UI.">
- Click to run the <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> plug-in.
+ Click to run <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>.
</message>
<message name="IDS_PLUGIN_HIDE" desc="The tooltip for hiding a blocked plug-in, displayed in the click to play UI.">
Hide this plug-in
@@ -5603,13 +5603,13 @@ Because search results are requested even while you're typing your query, your d
Update plug-in...
</message>
<message name="IDS_PLUGIN_BLOCKED" desc="The placeholder text for a blocked plug-in.">
- The <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> plug-in is not allowed.
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is not allowed.
</message>
<message name="IDS_PLUGIN_OUTDATED" desc="The placeholder text for an outdated plug-in.">
- The <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> plug-in is out of date.
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> is out of date.
</message>
<message name="IDS_PLUGIN_NOT_AUTHORIZED" desc="The placeholder text for a plug-in that requires user permission to run.">
- The <ph name="PLUGIN_NAME">$1<ex>Java</ex></ph> plug-in needs your permission to run.
+ <ph name="PLUGIN_NAME">$1<ex>Java</ex></ph> needs your permission to run.
</message>
<message name="IDS_PLUGIN_NOT_FOUND" desc="The placeholder text for an unknown plug-in that is not installed.">
No plug-in available to display this content.
@@ -5618,37 +5618,37 @@ Because search results are requested even while you're typing your query, your d
Looking for plug-in...
</message>
<message name="IDS_PLUGIN_DOWNLOADING" desc="The placeholder text when downloading a missing plug-in.">
- Downloading plug-in...
+ Downloading <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph>...
</message>
<message name="IDS_PLUGIN_DOWNLOAD_ERROR" desc="The placeholder text when there was an error download a missing plug-in.">
- There was an error downloading the plug-in (<ph name="ERROR">$1<ex>net::ERR_TOO_MANY_GOATS</ex></ph>). Sorry :-/
+ There was an error (<ph name="ERROR">$1<ex>net::ERR_TOO_MANY_GOATS</ex></ph>) while downloading the plug-in.
</message>
<message name="IDS_PLUGIN_DOWNLOAD_ERROR_SHORT" desc="The placeholder text when there was an error download a missing plug-in.">
- There was an error downloading the plug-in. Sorry :-/
+ <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> download failed.
</message>
<message name="IDS_PLUGIN_DOWNLOAD_CANCELLED" desc="The placeholder text when the user cancelled downloading the plug-in.">
- The plug-in download was cancelled.
+ <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> download was cancelled.
</message>
<message name="IDS_PLUGIN_INSTALLING" desc="The placeholder text when installing a missing plug-in.">
- After installing the plug-in, reload the page.
+ When <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> has finished installing, reload the page to activate it.
</message>
<message name="IDS_PLUGIN_UPDATING" desc="The placeholder text when updating an out-of-date plug-in.">
- After updating the plug-in, reload the page.
+ When <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> has finished updating, reload the page to activate it.
</message>
<message name="IDS_PLUGIN_FOUND" desc="The placeholder text for a known plug-in that is not installed.">
- The <ph name="PLUGIN_NAME">$1<ex>Quicktime</ex></ph> plug-in is required to display this content.
+ <ph name="PLUGIN_NAME">$1<ex>Quicktime</ex></ph> is required to display this content.
</message>
<message name="IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE" desc="Title of the plug-in installation confirmation dialog.">
- <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> plug-in needed
+ Install <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph>
</message>
<message name="IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_MSG" desc="Message of the plug-in installation confirmation dialog.">
- Please confirm that you would like to install the <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph> plug-in. You should only install plug-ins that you trust.
+ Are you sure you want to install <ph name="PLUGIN_NAME">$1<ex>Realplayer</ex></ph>? You should only install plug-ins that you trust.
</message>
<message name="IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON" desc="Button title to install a missing plug-in.">
- Get Plug-in
+ Install
</message>
<message name="IDS_PLUGIN_DISABLED" desc="The placeholder text for a disabled plug-in.">
- The <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> plug-in has been disabled. To re-enable it, please go to <ph name="CHROME_PLUGINS_LINK">chrome://plugins</ph>.
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> has been disabled. To re-enable it, please go to <ph name="CHROME_PLUGINS_LINK">chrome://plugins</ph>.
</message>
<!-- Session Crashed Info Bar-->
@@ -9912,7 +9912,7 @@ experiment id: "<ph name="EXPERIMENT_ID">$5<ex>ar1</ex></ph>"
</message>
<message name="IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT" desc="Info Bar message to prompt installing missing plugin">
- The <ph name="PLUGIN_NAME">$1<ex>Quicktime</ex></ph> plug-in is required to display some elements on this page.
+ <ph name="PLUGIN_NAME">$1<ex>Quicktime</ex></ph> is required to display some elements on this page.
</message>
<message name="IDS_PLUGININSTALLER_INSTALLPLUGIN_BUTTON" desc="Info Bar button to install missing plugin">
Install plug-in...
@@ -9924,7 +9924,7 @@ experiment id: "<ph name="EXPERIMENT_ID">$5<ex>ar1</ex></ph>"
Problems updating?
</message>
<message name="IDS_PLUGIN_OUTDATED_PROMPT" desc="Info Bar message when an outdated plugin was disabled">
- The <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> plug-in was blocked because it is out of date.
+ <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> was blocked because it is out of date.
</message>
<message name="IDS_PLUGIN_ENABLE_TEMPORARILY" desc="Info Bar button to run a blocked outdated plugin">
Run this time
@@ -9932,6 +9932,9 @@ experiment id: "<ph name="EXPERIMENT_ID">$5<ex>ar1</ex></ph>"
<message name="IDS_PLUGIN_ENABLE_ALWAYS" desc="Info Bar button to always run blocked plugins for this website">
Always run on this site
</message>
+ <message name="IDS_PLUGIN_RETRY_DOWNLOAD" desc="Info Bar button to retry downloading the plug-in.">
+ Try again
+ </message>
<message name="IDS_PLUGIN_CRASHED_PROMPT" desc="Info Bar message to notify about a crashed plugin">
The following plug-in has crashed: <ph name="PLUGIN_NAME">$1<ex>Shockwave</ex></ph>
</message>
diff --git a/chrome/browser/plugin_infobar_delegates.cc b/chrome/browser/plugin_infobar_delegates.cc
index 314325d..084e4f9 100644
--- a/chrome/browser/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugin_infobar_delegates.cc
@@ -151,7 +151,8 @@ InfoBarDelegate* OutdatedPluginInfoBarDelegate::Create(
installer->name());
break;
case PluginInstaller::kStateDownloading:
- message = l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOADING);
+ message = l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOADING,
+ installer->name());
break;
}
return new OutdatedPluginInfoBarDelegate(
@@ -244,20 +245,24 @@ bool OutdatedPluginInfoBarDelegate::LinkClicked(
}
void OutdatedPluginInfoBarDelegate::DownloadStarted() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOADING));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOADING,
+ installer()->name()));
}
void OutdatedPluginInfoBarDelegate::DownloadError(const std::string& message) {
ReplaceWithInfoBar(
- l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_ERROR_SHORT));
+ l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_ERROR_SHORT,
+ installer()->name()));
}
void OutdatedPluginInfoBarDelegate::DownloadCancelled() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED,
+ installer()->name()));
}
void OutdatedPluginInfoBarDelegate::DownloadFinished() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(IDS_PLUGIN_UPDATING));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_UPDATING,
+ installer()->name()));
}
void OutdatedPluginInfoBarDelegate::OnlyWeakObserversLeft() {
@@ -302,13 +307,14 @@ InfoBarDelegate* PluginInstallerInfoBarDelegate::Create(
PluginInstaller* installer,
const base::Closure& callback) {
string16 message;
+ const string16& plugin_name = installer->name();
switch (installer->state()) {
case PluginInstaller::kStateIdle:
message = l10n_util::GetStringFUTF16(
- IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT, installer->name());
+ IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT, plugin_name);
break;
case PluginInstaller::kStateDownloading:
- message = l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOADING);
+ message = l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOADING, plugin_name);
break;
}
return new PluginInstallerInfoBarDelegate(
@@ -362,21 +368,25 @@ bool PluginInstallerInfoBarDelegate::LinkClicked(
}
void PluginInstallerInfoBarDelegate::DownloadStarted() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOADING));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOADING,
+ installer()->name()));
}
void PluginInstallerInfoBarDelegate::DownloadCancelled() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED,
+ installer()->name()));
}
void PluginInstallerInfoBarDelegate::DownloadError(const std::string& message) {
ReplaceWithInfoBar(
- l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_ERROR_SHORT));
+ l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_ERROR_SHORT,
+ installer()->name()));
}
void PluginInstallerInfoBarDelegate::DownloadFinished() {
- ReplaceWithInfoBar(l10n_util::GetStringUTF16(
- new_install_ ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING));
+ ReplaceWithInfoBar(l10n_util::GetStringFUTF16(
+ new_install_ ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING,
+ installer()->name()));
}
void PluginInstallerInfoBarDelegate::OnlyWeakObserversLeft() {
diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc
index 78f5f80..c0a09a9 100644
--- a/chrome/renderer/plugins/plugin_placeholder.cc
+++ b/chrome/renderer/plugins/plugin_placeholder.cc
@@ -306,26 +306,29 @@ void PluginPlaceholder::OnFoundMissingPlugin(const string16& plugin_name) {
if (status_->value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound)
SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_FOUND, plugin_name));
has_host_ = true;
+ plugin_name_ = plugin_name;
}
void PluginPlaceholder::OnStartedDownloadingPlugin() {
- SetMessage(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOADING));
+ SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOADING, plugin_name_));
}
void PluginPlaceholder::OnFinishedDownloadingPlugin() {
bool is_installing =
status_->value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
- SetMessage(l10n_util::GetStringUTF16(
- is_installing ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING));
+ SetMessage(l10n_util::GetStringFUTF16(
+ is_installing ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING,
+ plugin_name_));
}
void PluginPlaceholder::OnErrorDownloadingPlugin(const std::string& error) {
SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_ERROR,
- UTF8ToUTF16(error)));
+ UTF8ToUTF16(error)));
}
void PluginPlaceholder::OnCancelledDownloadingPlugin() {
- SetMessage(l10n_util::GetStringUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED));
+ SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED,
+ plugin_name_));
}
#endif // defined(ENABLE_PLUGIN_INSTALLATION)
diff --git a/chrome/renderer/plugins/plugin_placeholder.h b/chrome/renderer/plugins/plugin_placeholder.h
index c70de24..eb70d35 100644
--- a/chrome/renderer/plugins/plugin_placeholder.h
+++ b/chrome/renderer/plugins/plugin_placeholder.h
@@ -149,6 +149,7 @@ class PluginPlaceholder : public content::RenderViewObserver,
bool hidden_;
bool has_host_;
bool finished_loading_;
+ string16 plugin_name_;
DISALLOW_COPY_AND_ASSIGN(PluginPlaceholder);
};