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

Unified Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 23591040: Use ICU for string pluralization in the extension permission dialog. (Closed) Base URL: http://git.chromium.org/chromium/src.git@gtk-extension-install-dialog
Patch Set: Created 7 years, 3 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/app/generated_resources.grd ('k') | chrome/common/extensions/permissions/permission_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_install_prompt.cc
diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
index c45fefabf761db8667aba4a5a9730bac109fdc1e..309c28f6aec9c48d765073ad14aa8ff8a5b85f62 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -347,9 +347,19 @@ string16 ExtensionInstallPrompt::Prompt::GetOAuthHeading() const {
}
string16 ExtensionInstallPrompt::Prompt::GetRetainedFilesHeading() const {
- return l10n_util::GetStringFUTF16(
- IDS_EXTENSION_PROMPT_RETAINED_FILES,
- base::IntToString16(GetRetainedFileCount()));
+ const int kRetainedFilesMessageIDs[6] = {
+ IDS_EXTENSION_PROMPT_RETAINED_FILES_DEFAULT,
+ IDS_EXTENSION_PROMPT_RETAINED_FILE_SINGULAR,
+ IDS_EXTENSION_PROMPT_RETAINED_FILES_ZERO,
+ IDS_EXTENSION_PROMPT_RETAINED_FILES_TWO,
+ IDS_EXTENSION_PROMPT_RETAINED_FILES_FEW,
+ IDS_EXTENSION_PROMPT_RETAINED_FILES_MANY,
+ };
+ std::vector<int> message_ids;
+ for (size_t i = 0; i < arraysize(kRetainedFilesMessageIDs); i++) {
+ message_ids.push_back(kRetainedFilesMessageIDs[i]);
+ }
+ return l10n_util::GetPluralStringFUTF16(message_ids, GetRetainedFileCount());
}
bool ExtensionInstallPrompt::Prompt::ShouldShowPermissions() const {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/common/extensions/permissions/permission_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698