OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/base/l10n/time_format.h" | 5 #include "ui/base/l10n/time_format.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 }, | 76 }, |
77 { | 77 { |
78 IDS_TIME_REMAINING_DAYS_DEFAULT, IDS_TIME_REMAINING_DAY_SINGULAR, | 78 IDS_TIME_REMAINING_DAYS_DEFAULT, IDS_TIME_REMAINING_DAY_SINGULAR, |
79 IDS_TIME_REMAINING_DAYS_ZERO, IDS_TIME_REMAINING_DAYS_TWO, | 79 IDS_TIME_REMAINING_DAYS_ZERO, IDS_TIME_REMAINING_DAYS_TWO, |
80 IDS_TIME_REMAINING_DAYS_FEW, IDS_TIME_REMAINING_DAYS_MANY | 80 IDS_TIME_REMAINING_DAYS_FEW, IDS_TIME_REMAINING_DAYS_MANY |
81 } | 81 } |
82 } }; | 82 } }; |
83 | 83 |
84 static const MessageIDs kTimeRemainingLongMessageIDs = { { | 84 static const MessageIDs kTimeRemainingLongMessageIDs = { { |
85 { | 85 { |
86 IDS_TIME_REMAINING_SECS_DEFAULT, IDS_TIME_REMAINING_SEC_SINGULAR, | 86 IDS_TIME_REMAINING_LONG_SECS_DEFAULT, IDS_TIME_REMAINING_LONG_SEC_SINGULAR, |
87 IDS_TIME_REMAINING_SECS_ZERO, IDS_TIME_REMAINING_SECS_TWO, | 87 IDS_TIME_REMAINING_LONG_SECS_ZERO, IDS_TIME_REMAINING_LONG_SECS_TWO, |
88 IDS_TIME_REMAINING_SECS_FEW, IDS_TIME_REMAINING_SECS_MANY | 88 IDS_TIME_REMAINING_LONG_SECS_FEW, IDS_TIME_REMAINING_LONG_SECS_MANY |
89 }, | 89 }, |
90 { | 90 { |
91 IDS_TIME_REMAINING_LONG_MINS_DEFAULT, IDS_TIME_REMAINING_LONG_MIN_SINGULAR, | 91 IDS_TIME_REMAINING_LONG_MINS_DEFAULT, IDS_TIME_REMAINING_LONG_MIN_SINGULAR, |
92 IDS_TIME_REMAINING_LONG_MINS_ZERO, IDS_TIME_REMAINING_LONG_MINS_TWO, | 92 IDS_TIME_REMAINING_LONG_MINS_ZERO, IDS_TIME_REMAINING_LONG_MINS_TWO, |
93 IDS_TIME_REMAINING_LONG_MINS_FEW, IDS_TIME_REMAINING_LONG_MINS_MANY | 93 IDS_TIME_REMAINING_LONG_MINS_FEW, IDS_TIME_REMAINING_LONG_MINS_MANY |
94 }, | 94 }, |
95 { | 95 { |
96 IDS_TIME_REMAINING_HOURS_DEFAULT, IDS_TIME_REMAINING_HOUR_SINGULAR, | 96 IDS_TIME_REMAINING_HOURS_DEFAULT, IDS_TIME_REMAINING_HOUR_SINGULAR, |
97 IDS_TIME_REMAINING_HOURS_ZERO, IDS_TIME_REMAINING_HOURS_TWO, | 97 IDS_TIME_REMAINING_HOURS_ZERO, IDS_TIME_REMAINING_HOURS_TWO, |
98 IDS_TIME_REMAINING_HOURS_FEW, IDS_TIME_REMAINING_HOURS_MANY | 98 IDS_TIME_REMAINING_HOURS_FEW, IDS_TIME_REMAINING_HOURS_MANY |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 if (time >= tomorrow) | 378 if (time >= tomorrow) |
379 return base::string16(); | 379 return base::string16(); |
380 else if (time >= midnight_today) | 380 else if (time >= midnight_today) |
381 return l10n_util::GetStringUTF16(IDS_PAST_TIME_TODAY); | 381 return l10n_util::GetStringUTF16(IDS_PAST_TIME_TODAY); |
382 else if (time >= yesterday) | 382 else if (time >= yesterday) |
383 return l10n_util::GetStringUTF16(IDS_PAST_TIME_YESTERDAY); | 383 return l10n_util::GetStringUTF16(IDS_PAST_TIME_YESTERDAY); |
384 return base::string16(); | 384 return base::string16(); |
385 } | 385 } |
386 | 386 |
387 } // namespace ui | 387 } // namespace ui |
OLD | NEW |