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

Unified Diff: ui/base/l10n/l10n_util.h

Issue 1140153005: ICU msg format support with more than one arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark's review comments Created 5 years, 4 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 | « ui/base/l10n/formatter.cc ('k') | ui/base/l10n/l10n_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util.h
diff --git a/ui/base/l10n/l10n_util.h b/ui/base/l10n/l10n_util.h
index 505ebd3a41fdf3f6a8cd1a1c3a70106f3a78e93e..9317556260f636cc2d86a4f599e2e94ccc38ea7f 100644
--- a/ui/base/l10n/l10n_util.h
+++ b/ui/base/l10n/l10n_util.h
@@ -169,6 +169,13 @@ base::string16 GetStringFUTF16Int(int message_id, int64 a);
UI_BASE_EXPORT base::string16 GetPluralStringFUTF16(int message_id, int number);
UI_BASE_EXPORT std::string GetPluralStringFUTF8(int message_id, int number);
+// Get a string when you only care about 'single vs multiple' distinction.
+// The message pointed to by |message_id| should be in ICU syntax
+// (see the references above for Plural) with 'single', 'multiple', and
+// 'other' (fallback) instead of 'male', 'female', and 'other' (fallback).
+UI_BASE_EXPORT base::string16 GetSingleOrMultipleStringUTF16(int message_id,
+ bool is_multiple);
+
// In place sorting of base::string16 strings using collation rules for
// |locale|.
UI_BASE_EXPORT void SortStrings16(const std::string& locale,
« no previous file with comments | « ui/base/l10n/formatter.cc ('k') | ui/base/l10n/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698