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

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

Issue 135963010: Prepare to enable icu_use_data_file_flat on CrOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UTF18 -> UTF8 Created 6 years, 11 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.cc
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc
index d3fb1608948db8b4e3e4510d47b1962c945aa7b5..1c68f80fe06320efa2a1d32526d753296b1d403b 100644
--- a/ui/base/l10n/l10n_util.cc
+++ b/ui/base/l10n/l10n_util.cc
@@ -263,6 +263,11 @@ void AdjustParagraphDirectionality(base::string16* paragraph) {
#endif
}
+base::string16 GetStringUTF16Raw(int message_id) {
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
+ return rb.GetLocalizedString(message_id);
+}
+
#if defined(OS_WIN)
std::string GetCanonicalLocale(const std::string& locale) {
return base::i18n::GetCanonicalLocale(locale.c_str());
@@ -660,13 +665,16 @@ bool IsValidLocaleSyntax(const std::string& locale) {
return true;
}
+std::string GetStringUTF8Raw(int message_id) {
+ return base::UTF16ToUTF8(GetStringUTF16Raw(message_id));
+}
+
std::string GetStringUTF8(int message_id) {
return base::UTF16ToUTF8(GetStringUTF16(message_id));
}
base::string16 GetStringUTF16(int message_id) {
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- base::string16 str = rb.GetLocalizedString(message_id);
+ base::string16 str = GetStringUTF16Raw(message_id);
AdjustParagraphDirectionality(&str);
return str;

Powered by Google App Engine
This is Rietveld 408576698