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

Side by Side Diff: Source/WebCore/platform/chromium/LocalizedStringsChromium.cpp

Issue 14141002: Remove ENABLE_INPUT_TYPE_WEEK compile-time flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update html.css Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 { 269 {
270 return query(WebLocalizedString::PlaceholderForMonthField); 270 return query(WebLocalizedString::PlaceholderForMonthField);
271 } 271 }
272 272
273 String placeholderForYearField() 273 String placeholderForYearField()
274 { 274 {
275 return query(WebLocalizedString::PlaceholderForYearField); 275 return query(WebLocalizedString::PlaceholderForYearField);
276 } 276 }
277 #endif 277 #endif
278 278
279 #if ENABLE(INPUT_TYPE_WEEK)
280 String weekFormatInLDML() 279 String weekFormatInLDML()
281 { 280 {
282 String templ = query(WebLocalizedString::WeekFormatTemplate); 281 String templ = query(WebLocalizedString::WeekFormatTemplate);
283 // Converts a string like "Week $2, $1" to an LDML date format pattern like 282 // Converts a string like "Week $2, $1" to an LDML date format pattern like
284 // "'Week 'ww', 'yyyy". 283 // "'Week 'ww', 'yyyy".
285 StringBuilder builder; 284 StringBuilder builder;
286 unsigned literalStart = 0; 285 unsigned literalStart = 0;
287 unsigned length = templ.length(); 286 unsigned length = templ.length();
288 for (unsigned i = 0; i + 1 < length; ++i) { 287 for (unsigned i = 0; i + 1 < length; ++i) {
289 if (templ[i] == '$' && (templ[i + 1] == '1' || templ[i + 1] == '2')) { 288 if (templ[i] == '$' && (templ[i + 1] == '1' || templ[i + 1] == '2')) {
290 if (literalStart < i) 289 if (literalStart < i)
291 DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalSta rt, i - literalStart), builder); 290 DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalSta rt, i - literalStart), builder);
292 builder.append(templ[++i] == '1' ? "yyyy" : "ww"); 291 builder.append(templ[++i] == '1' ? "yyyy" : "ww");
293 literalStart = i + 1; 292 literalStart = i + 1;
294 } 293 }
295 } 294 }
296 if (literalStart < length) 295 if (literalStart < length)
297 DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalStart, leng th - literalStart), builder); 296 DateTimeFormat::quoteAndAppendLiteral(templ.substring(literalStart, leng th - literalStart), builder);
298 return builder.toString(); 297 return builder.toString();
299 } 298 }
300 299
301 #endif
302
303 String missingPluginText() 300 String missingPluginText()
304 { 301 {
305 return query(WebLocalizedString::MissingPluginText); 302 return query(WebLocalizedString::MissingPluginText);
306 } 303 }
307 304
308 String crashedPluginText() 305 String crashedPluginText()
309 { 306 {
310 notImplemented(); 307 notImplemented();
311 return String("Plug-in Failure"); 308 return String("Plug-in Failure");
312 } 309 }
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 } 602 }
606 603
607 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 604 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
608 String validationMessageBadInputForDateTimeText() 605 String validationMessageBadInputForDateTimeText()
609 { 606 {
610 return query(WebLocalizedString::ValidationBadInputForDateTime); 607 return query(WebLocalizedString::ValidationBadInputForDateTime);
611 } 608 }
612 #endif 609 #endif
613 610
614 } // namespace WebCore 611 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/LocalizedStrings.h ('k') | Source/WebCore/platform/text/PlatformLocale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698