Rename i18n to intl

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11076 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
alanknight@google.com
2012-08-21 17:30:21 +00:00
parent fe4a885a84
commit 96c3872ffe
23 changed files with 13 additions and 13 deletions
@@ -203,6 +203,7 @@ class _DateFormatPatternField extends _DateFormatField {
*/
void handleNumericField(_Stream input, Function setter, [int offset = 0]) {
var result = input.nextInteger();
if (result == null) throwFormatException(input);
setter(result + offset);
}
@@ -125,14 +125,11 @@ class _Stream {
* Assuming that the contents are characters, read as many digits as we
* can see and then return the corresponding integer. Advance the stream.
*/
var digitMatcher = const RegExp(@'\d');
var digitMatcher = const RegExp(@'\d+');
int nextInteger() {
// Doing this with a regular expression is slightly slower on the VM,
// but makes a moderate difference in Javascript right now.
var digits = [];
while (!atEnd() && (digitMatcher.hasMatch(peek()))) {
digits.add(next().charCodeAt(0));
}
return Math.parseInt(new String.fromCharCodes(digits));
var string = digitMatcher.stringMatch(rest());
if (string == null || string.isEmpty()) return null;
read(string.length);
return Math.parseInt(string);
}
}
@@ -1,4 +1,4 @@
name: i18n
name: intl
description: >
Contains code to deal with internationalized/localized
messages, date and number formatting and parsing,
+5 -3
View File
@@ -58,7 +58,7 @@
# ....pkg/
# ......args/
# ......dartdoc/
# ......i18n/
# ......intl/
# ......logging/
# ......(more will come here)
# ....util/
@@ -410,10 +410,10 @@ def Main(argv):
os.makedirs(PKG)
#
# Create and populate pkg/{args, i18n, logging, unittest}
# Create and populate pkg/{args, intl, logging, unittest}
#
for library in ['args', 'i18n', 'logging', 'unittest']:
for library in ['args', 'intl', 'logging', 'unittest']:
src_dir = join(HOME, 'pkg', library)
dest_dir = join(PKG, library)
os.makedirs(dest_dir)
@@ -421,6 +421,8 @@ def Main(argv):
for filename in os.listdir(src_dir):
if filename.endswith('.dart'):
copyfile(join(src_dir, filename), join(dest_dir, filename))
if exists(join(src_dir, 'lib')):
copytree(join(src_dir, 'lib'), join(dest_dir, 'lib'))
# Create and populate pkg/dartdoc.
dartdoc_src_dir = join(HOME, 'pkg', 'dartdoc')
+1 -1
View File
@@ -110,7 +110,7 @@ void main() {
}
});
apidocLibraries.add(doc.scriptDir.append('../../pkg/unittest/unittest.dart'));
apidocLibraries.add(doc.scriptDir.append('../../pkg/i18n/intl.dart'));
apidocLibraries.add(doc.scriptDir.append('../../pkg/intl/intl.dart'));
print('Generating docs...');
final apidoc = new Apidoc(mdn, htmldoc, outputDir, mode, generateAppCache);