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

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

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/l10n_util_plurals.h ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_plurals.cc
diff --git a/ui/base/l10n/l10n_util_plurals.cc b/ui/base/l10n/l10n_util_plurals.cc
deleted file mode 100644
index 177e263cf24429218c6ae9394d9a37566f0df94f..0000000000000000000000000000000000000000
--- a/ui/base/l10n/l10n_util_plurals.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/base/l10n/l10n_util_plurals.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "ui/base/l10n/l10n_util.h"
-
-namespace l10n_util {
-
-scoped_ptr<icu::PluralRules> BuildPluralRules() {
- UErrorCode err = U_ZERO_ERROR;
- scoped_ptr<icu::PluralRules> rules(
- icu::PluralRules::forLocale(icu::Locale::getDefault(), err));
- if (U_FAILURE(err)) {
- err = U_ZERO_ERROR;
- icu::UnicodeString fallback_rules("one: n is 1", -1, US_INV);
- rules.reset(icu::PluralRules::createRules(fallback_rules, err));
- DCHECK(U_SUCCESS(err));
- }
- return rules.Pass();
-}
-
-void FormatNumberInPlural(const icu::MessageFormat& format, int number,
- icu::UnicodeString* result, UErrorCode* err) {
- if (U_FAILURE(*err)) return;
- icu::Formattable formattable(number);
- icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
- format.format(&formattable, 1, *result, ignore, *err);
- DCHECK(U_SUCCESS(*err));
- return;
-}
-
-
-} // namespace l10n_util
« no previous file with comments | « ui/base/l10n/l10n_util_plurals.h ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698