summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 18:00:58 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-23 18:00:58 +0000
commit3c80d0add43d84f91f16851600b93a0c9e782042 (patch)
tree4f926ac11c3d22231f293d6f9c0d9a6001850036
parent10d011dc0ffbb45adc1d8af2f03eedb2c280ed2b (diff)
downloadchromium_src-3c80d0add43d84f91f16851600b93a0c9e782042.zip
chromium_src-3c80d0add43d84f91f16851600b93a0c9e782042.tar.gz
chromium_src-3c80d0add43d84f91f16851600b93a0c9e782042.tar.bz2
Add a separate string for showing that chrome updated without
a version number. This makes it easier for translators to handle both cases. BUG=2656 Review URL: http://codereview.chromium.org/7900 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3821 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd5
-rw-r--r--chrome/browser/views/about_chrome_view.cc18
2 files changed, 13 insertions, 10 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index e5d9c07..bacb00d 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1941,7 +1941,10 @@ each locale. -->
A new version of <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is available
</message>
<message name="IDS_UPGRADE_SUCCESSFUL" desc="Status label: Successfully upgraded">
- <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> has been updated <ph name="VERSION">$2<ex>(0.1.131)</ex></ph>
+ <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> has been updated to <ph name="VERSION">$2<ex>0.1.131</ex></ph>
+ </message>
+ <message name="IDS_UPGRADE_SUCCESSFUL_NOVERSION" desc="Status label: Successfully upgraded">
+ <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> has been updated
</message>
<message name="IDS_UPGRADE_ALREADY_UP_TO_DATE" desc="Status label: Already up to date">
<ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> is up to date (<ph name="VERSION">$2<ex>0.1.131</ex></ph>)
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc
index 1ef5292..e0ec434 100644
--- a/chrome/browser/views/about_chrome_view.cc
+++ b/chrome/browser/views/about_chrome_view.cc
@@ -610,11 +610,6 @@ void AboutChromeView::OnReportResults(GoogleUpdateUpgradeResult result,
// Make a note of which version Google Update is reporting is the latest
// version.
new_version_available_ = version;
- if (!new_version_available_.empty()) {
- new_version_available_ = std::wstring(L"(") +
- new_version_available_ +
- std::wstring(L")");
- }
UpdateStatus(result, error_code);
}
@@ -671,18 +666,23 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result,
}
// No break here as we want to notify user about upgrade if there is one.
}
- case UPGRADE_SUCCESSFUL:
+ case UPGRADE_SUCCESSFUL: {
if (result == UPGRADE_ALREADY_UP_TO_DATE)
UserMetrics::RecordAction(L"UpgradeCheck_AlreadyUpgraded", profile_);
else
UserMetrics::RecordAction(L"UpgradeCheck_Upgraded", profile_);
check_button_status_ = CHECKBUTTON_HIDDEN;
- update_label_.SetText(l10n_util::GetStringF(IDS_UPGRADE_SUCCESSFUL,
- l10n_util::GetString(IDS_PRODUCT_NAME),
- new_version_available_));
+ const std::wstring& update_string = new_version_available_.empty()
+ ? l10n_util::GetStringF(IDS_UPGRADE_SUCCESSFUL_NOVERSION,
+ l10n_util::GetString(IDS_PRODUCT_NAME))
+ : l10n_util::GetStringF(IDS_UPGRADE_SUCCESSFUL,
+ l10n_util::GetString(IDS_PRODUCT_NAME),
+ new_version_available_);
+ update_label_.SetText(update_string);
show_success_indicator = true;
RestartMessageBox::ShowMessageBox(window()->GetHWND());
break;
+ }
case UPGRADE_ERROR:
UserMetrics::RecordAction(L"UpgradeCheck_Error", profile_);
check_button_status_ = CHECKBUTTON_HIDDEN;