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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 1103293004: Use ICU plural syntax in more place (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment in generated_strings.grd Created 5 years, 8 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
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 91ae93205314708c7dc9ade72d85264fe460c0f9..08a9485a944e7c426826c6b71a6a846388594122 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -807,26 +807,18 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
NSString* exitTitle = nil;
// Set the dialog text based on whether or not there are multiple downloads.
- if (downloadCount == 1) {
- // Dialog text: warning and explanation.
- titleText = l10n_util::GetNSString(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_TITLE);
- explanationText = l10n_util::GetNSString(
- IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_EXPLANATION);
- } else {
- // Dialog text: warning and explanation.
- titleText = l10n_util::GetNSString(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_TITLE);
- explanationText = l10n_util::GetNSString(
- IDS_MULTIPLE_DOWNLOADS_REMOVE_CONFIRM_EXPLANATION);
- }
+ // Dialog text: warning and explanation.
+ titleText = l10n_util::GetPluralNSStringF(
+ IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_TITLE, downloadCount);
+ explanationText = l10n_util::GetPluralNSStringF(
+ IDS_SINGLE_DOWNLOAD_REMOVE_CONFIRM_EXPLANATION, downloadCount);
// Cancel download and exit button text.
- exitTitle = l10n_util::GetNSString(
- IDS_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL);
+ exitTitle = l10n_util::GetPluralNSStringF(
+ IDS_DOWNLOAD_REMOVE_CONFIRM_OK_BUTTON_LABEL, downloadCount);
// Wait for download button text.
- waitTitle = l10n_util::GetNSString(
- IDS_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL);
+ waitTitle = l10n_util::GetPluralNSStringF(
+ IDS_DOWNLOAD_REMOVE_CONFIRM_CANCEL_BUTTON_LABEL, downloadCount);
// 'waitButton' is the default choice.
int choice = NSRunAlertPanel(titleText, @"%@",

Powered by Google App Engine
This is Rietveld 408576698