Add intl to apidoc, and some minor comment formatting cleanup.

Review URL: https://chromiumcodereview.appspot.com//10692018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9192 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
efortuna@google.com
2012-06-27 22:49:06 +00:00
parent f2e095cba3
commit 57582bbd08
10 changed files with 29 additions and 40 deletions
+1 -7
View File
@@ -2,13 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#library('bidi_formatter');
#import('bidi_utils.dart');
/**
* Bidi stands for Bi-directional text.
* According to http://en.wikipedia.org/wiki/Bi-directional_text:
* According to [Wikipedia](http://en.wikipedia.org/wiki/Bi-directional_text):
* Bi-directional text is text containing text in both text directionalities,
* both right-to-left (RTL) and left-to-right (LTR). It generally involves text
* containing different types of alphabets, but may also refer to boustrophedon,
@@ -57,8 +53,6 @@
* then up to the caller to insert the return value in the output.
*/
#import('dart:web');
class BidiFormatter {
/** The direction of the surrounding text (the context). */
-4
View File
@@ -2,8 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#library('bidi_utils');
/**
* Bidi stands for Bi-directional text.
* According to http://en.wikipedia.org/wiki/Bi-directional_text:
@@ -22,8 +20,6 @@
* bidi functionality in the given directional context, instead of using
* bidi_utils.dart directly.
*/
/** Class containing constants to represent the directionality of text. */
class TextDirection {
static final LTR = const TextDirection._('LTR', 'ltr');
static final RTL = const TextDirection._('RTL', 'rtl');
+5 -4
View File
@@ -46,7 +46,9 @@
* Items marked with '#' work differently than in Java.
*
* The count of pattern letters determine the format.
* **Text**:
*
* **Text**:
*
* * 4 or more pattern letters--use full form,
* * less than 4--use short or abbreviated form if one exists.
* In parsing, we will always try long format, then short.
@@ -106,8 +108,6 @@
* that point, the parse of the run fails.
*/
#library('date_format');
class DateFormat {
/** Definition of how this object formats dates. */
@@ -126,7 +126,8 @@ class DateFormat {
* given the pattern.
*/
// TODO(efortuna): Hear back from i18n about Time Zones and the "core set"
// of skeleton patterns.
// of skeleton patterns. When this is complete, also properly comment these
// so the documentation is available on api_docs.
// Example of how this looks in the US
// locale.
static final String Hm = 'Hm'; // HH:mm
+13 -9
View File
@@ -1,17 +1,21 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#library('intl');
#import('dart:web');
#source('intl_message.dart');
#source('date_format.dart');
#source('bidi_formatter.dart');
#source('bidi_utils.dart');
/**
* Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
* for details. All rights reserved. Use of this source code is governed by a
* BSD-style license that can be found in the LICENSE file.
*
* Internationalization object providing access to message formatting objects,
* date formatting, parsing, bidirectional text relative to a specific locale.
*/
#library('Intl');
#import('intl_message.dart');
#import('date_format.dart');
class Intl {
/**
+5 -8
View File
@@ -7,10 +7,10 @@
*
*
* _message example:
* '''I see ${Intl.plural(num_people,
* {'0': 'no one at all',
* '1': 'one other person',
* 'other': '$num_people other people'})} in $place.''''
* '''I see ${Intl.plural(num_people,
* {'0': 'no one at all',
* '1': 'one other person',
* 'other': '$num_people other people'})} in $place.''''
*
* Usage examples:
* today(date) => intl.message(
@@ -29,13 +29,10 @@
*
* Calling `msg({'num_people': 2, 'place': 'Athens'});` would
* produce "I see 2 other people in Athens." as output.
* <!-- TODO(efortuna): documentation example involving the offset parameter.
* -->
*
* See tests/message_format_test.dart for more examples.
*/
#library('intl_message');
//TODO(efortuna): documentation example involving the offset parameter?
class IntlMessage {
+1 -2
View File
@@ -5,8 +5,7 @@
#library('bidi_format_test');
#import('../../../lib/i18n/bidi_formatter.dart');
#import('../../../lib/i18n/bidi_utils.dart');
#import('../../../lib/i18n/intl.dart');
#import('../../../lib/unittest/unittest.dart');
/**
+1 -1
View File
@@ -5,7 +5,7 @@
#library('bidi_utils_test');
#import('../../../lib/i18n/bidi_utils.dart');
#import('../../../lib/i18n/intl.dart');
#import('../../../lib/unittest/unittest.dart');
/**
+1 -1
View File
@@ -6,7 +6,7 @@
#library('date_time_format_test');
#import('../../../lib/i18n/date_format.dart');
#import('../../../lib/i18n/intl.dart');
#import('../../../lib/unittest/unittest.dart');
/**
+1 -4
View File
@@ -6,12 +6,9 @@
#library('intl_message_test');
#import('../../../lib/i18n/intl.dart');
#import('../../../lib/i18n/intl_message.dart');
#import('../../../lib/unittest/unittest.dart');
/**
* Tests the MessageFormat library in dart.
*/
/** Tests the MessageFormat library in dart. */
class Person {
String firstName, lastName;
+1
View File
@@ -130,6 +130,7 @@ void main() {
world.getOrAddLibrary('dart:json');
world.getOrAddLibrary('${doc.scriptDir}/../../lib/math/math.dart');
world.getOrAddLibrary('${doc.scriptDir}/../../lib/unittest/unittest.dart');
world.getOrAddLibrary('${doc.scriptDir}/../../lib/i18n/intl.dart');
world.getOrAddLibrary('dart:uri');
world.getOrAddLibrary('dart:utf');
world.getOrAddLibrary('dart:web');