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

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: drop unnecessary dep. on base_i18n from api_registration Created 5 years, 5 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: ui/base/l10n/l10n_util.h
diff --git a/ui/base/l10n/l10n_util.h b/ui/base/l10n/l10n_util.h
index 505ebd3a41fdf3f6a8cd1a1c3a70106f3a78e93e..3d6a6518aa21b31d26740cc45ebdb843cf1d7843 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 formatted 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).
+UI_BASE_EXPORT base::string16 GetSingleOrMultipleStringFUTF16(int message_id,
Reilly Grant (use Gerrit) 2015/07/30 18:10:09 I'm confused why a number of methods here are "Str
jungshik at Google 2015/07/31 21:36:15 I'm not sure what you meants by "support format ar
+ bool is_multiple);
+
// In place sorting of base::string16 strings using collation rules for
// |locale|.
UI_BASE_EXPORT void SortStrings16(const std::string& locale,

Powered by Google App Engine
This is Rietveld 408576698