Home | History | Annotate | Download | only in common

Lines Matching refs:icu

116     const std::vector<icu::PluralFormat*>& formatter(FormatType format_type) {
173 std::vector<icu::PluralFormat*> short_formatter_;
174 std::vector<icu::PluralFormat*> time_left_formatter_;
175 std::vector<icu::PluralFormat*> time_elapsed_formatter_;
177 std::vector<icu::PluralFormat*>* time_formats);
178 static icu::PluralFormat* createFallbackFormat(
179 const icu::PluralRules& rules, int index, FormatType format_type);
188 FormatType format_type, std::vector<icu::PluralFormat*>* time_formats) {
189 static const icu::UnicodeString kKeywords[] = {
195 scoped_ptr<icu::PluralRules> rules(
196 icu::PluralRules::forLocale(icu::Locale::getDefault(), err));
199 icu::UnicodeString fallback_rules("one: n is 1", -1, US_INV);
200 rules.reset(icu::PluralRules::createRules(fallback_rules, err));
207 icu::UnicodeString pattern;
215 // once ICU's isKeyword is fixed to return true for isKeyword('other').
220 pattern += icu::UnicodeString(sub_pattern.c_str(), "UTF-8");
224 icu::PluralFormat* format = new icu::PluralFormat(*rules, pattern, err);
230 // Reset it so that next ICU call can proceed.
238 icu::PluralFormat* TimeFormatter::createFallbackFormat(
239 const icu::PluralRules& rules, int index, FormatType format_type) {
240 static const icu::UnicodeString kUnits[4][2] = {
246 icu::UnicodeString suffix(GetFallbackFormatSuffix(format_type), -1, US_INV);
247 icu::UnicodeString pattern;
253 icu::PluralFormat* format = new icu::PluralFormat(rules, pattern, err);
266 const std::vector<icu::PluralFormat*>& formatters =
270 icu::UnicodeString time_string;