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

Issue 10506006: Polish existing skeleton API. (Closed)

Created:
8 years, 6 months ago by Emily Fortuna
Modified:
8 years, 6 months ago
Reviewers:
Alan Knight
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Polish existing skeleton API. TBR. Committed: https://code.google.com/p/dart/source/detail?r=8226

Patch Set 1 : #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -255 lines) Patch
D lib/i18n/date_format.dart View 1 chunk +0 lines, -161 lines 0 comments Download
A + lib/i18n/date_time_format.dart View 3 chunks +84 lines, -39 lines 10 comments Download
M lib/i18n/message_format.dart View 2 chunks +17 lines, -15 lines 0 comments Download
D tests/lib/i18n/date_format_test.dart View 1 chunk +0 lines, -35 lines 0 comments Download
A + tests/lib/i18n/date_time_format_test.dart View 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Emily Fortuna
(this cleans up what we originally had. Our new changes can be added in the ...
8 years, 6 months ago (2012-06-02 05:49:26 UTC) #1
Alan Knight
https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_format.dart File lib/i18n/date_time_format.dart (right): https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_format.dart#newcode6 lib/i18n/date_time_format.dart:6: * DateTimeFormat is for formatting and parsing dates in ...
8 years, 6 months ago (2012-06-04 19:58:37 UTC) #2
Emily Fortuna
8 years, 6 months ago (2012-06-04 22:25:57 UTC) #3
https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
File lib/i18n/date_time_format.dart (right):

https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
lib/i18n/date_time_format.dart:6: * DateTimeFormat is for formatting and parsing
dates in a locale-sensitive
On 2012/06/04 19:58:37, Alan Knight wrote:
> I'd called it DateFormat because the objects it operates on are Dates, and we
> don't have either Time or DateTime objects. And it's shorter.

You're right. I'll fix it right now.

https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
lib/i18n/date_time_format.dart:116: * String indicating a language code with
which the message is to be
On 2012/06/04 19:58:37, Alan Knight wrote:
> Strictly I think language would be just the "en" part, and en-US would be a
> locale code.

Done.

https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
lib/i18n/date_time_format.dart:123: * written this way so that they can be
discoverable via autocomplete.
On 2012/06/04 19:58:37, Alan Knight wrote:
> We should probably say where these come from and/or indicate what the
characters
> mean. While most are obvious, some are less so, e.g. L, E. Maybe even examples
> would be good for the non-i18n literate.

Done.

https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
lib/i18n/date_time_format.dart:125: static final String Hm = 'Hm';          //
HH:mm
On 2012/06/04 19:58:37, Alan Knight wrote:
> So usage on these is, e.g.
>    new DateTimeFormat(DateTimeFormat.Hms);
> ?
> Are people going to want to type that instead of using the string literal? Is
> the case significant on these? Seems like it probably is, but discoverability
> would probably be better if all lowercase. But maybe autocomplete doesn't
care.
> Would named constructors for these be better? Or methods on Intl? e.g.
>    new DateTimeFormat.Hms()
> or 
>    Intl.dateHms();

Realistically, no, people are not going to want to type that. They're provided
more to be discovered than for extensive use... see page 4 on my User Guide --
they can also be called as intl.date.Hms. I can provide named constructors for
these (in addition??) if that would be better (seems like it would).

https://chromiumcodereview.appspot.com/10506006/diff/4001/lib/i18n/date_time_...
lib/i18n/date_time_format.dart:147: /** Date/Time format patterns. */
On 2012/06/04 19:58:37, Alan Knight wrote:
> We should probably make this mechanism more consistent with the skeletons.

Fixing...

Powered by Google App Engine
This is Rietveld 408576698