Skip to content

Commit 3f25754

Browse files
committed
9c71259 feat(i18n): add custom placeholder names
1 parent 38055ed commit 3f25754

761 files changed

Lines changed: 1361 additions & 978 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fri Apr 15 21:49:34 UTC 2016
2-
5095fc8c3c6ca45e87b5b3ec5d71a04124f34de9
1+
Fri Apr 15 21:51:03 UTC 2016
2+
9c712595ca398ae3aa3074428f0d0f168a62e96e

animate.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

animate/testing.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/angular2-all-testing.umd.dev.js

Lines changed: 44 additions & 21 deletions
Large diffs are not rendered by default.

bundles/angular2-all.umd.dev.js

Lines changed: 44 additions & 21 deletions
Large diffs are not rendered by default.

bundles/angular2-all.umd.js

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -764,15 +764,14 @@ return /******/ (function(modules) { // webpackBootstrap
764764
/**
765765
* Declares a list of child element references.
766766
*
767-
* Angular automatically updates the list when the DOM is updated.
767+
* Angular automatically updates the list when the DOM was updated.
768768
*
769769
* `ViewChildren` takes a argument to select elements.
770770
*
771771
* - If the argument is a type, directives or components with the type will be bound.
772772
*
773-
* - If the argument is a string, the string is interpreted as a list of comma-separated selectors.
774-
* For each selector, an element containing the matching template variable (e.g. `#child`) will be
775-
* bound.
773+
* - If the argument is a string, the string behaviors as comma-separated selectors. For each
774+
* selector, an element matched template variables (e.g. `#child`) will be bound.
776775
*
777776
* View children are set before the `ngAfterViewInit` callback is called.
778777
*
@@ -843,17 +842,17 @@ return /******/ (function(modules) { // webpackBootstrap
843842
exports.ViewChildren = decorators_1.makePropDecorator(di_2.ViewChildrenMetadata);
844843
// TODO(alexeagle): remove the duplication of this doc. It is copied from ViewChildMetadata.
845844
/**
846-
* Declares a reference to a child element.
845+
* Declares a reference of child element.
847846
*
848847
* `ViewChildren` takes a argument to select elements.
849848
*
850849
* - If the argument is a type, a directive or a component with the type will be bound.
851850
*
852-
* - If the argument is a string, the string is interpreted as a selector. An element containing the
853-
* matching template variable (e.g. `#child`) will be bound.
851+
* - If the argument is a string, the string behaviors as a selectors. An element matched template
852+
* variables (e.g. `#child`) will be bound.
854853
*
855-
* In either case, `@ViewChild()` assigns the first (looking from above) element if there are
856-
* multiple matches.
854+
* In either case, `@ViewChild()` assigns the first (looking from above) element if the result is
855+
* multiple.
857856
*
858857
* View child is set before the `ngAfterViewInit` callback is called.
859858
*
@@ -1469,15 +1468,14 @@ return /******/ (function(modules) { // webpackBootstrap
14691468
/**
14701469
* Declares a list of child element references.
14711470
*
1472-
* Angular automatically updates the list when the DOM is updated.
1471+
* Angular automatically updates the list when the DOM was updated.
14731472
*
14741473
* `ViewChildren` takes an argument to select elements.
14751474
*
14761475
* - If the argument is a type, directives or components with the type will be bound.
14771476
*
1478-
* - If the argument is a string, the string is interpreted as a list of comma-separated selectors.
1479-
* For each selector, an element containing the matching template variable (e.g. `#child`) will be
1480-
* bound.
1477+
* - If the argument is a string, the string behaviors as comma-separated selectors. For each
1478+
* selector, an element matched template variables (e.g. `#child`) will be bound.
14811479
*
14821480
* View children are set before the `ngAfterViewInit` callback is called.
14831481
*
@@ -1563,11 +1561,11 @@ return /******/ (function(modules) { // webpackBootstrap
15631561
*
15641562
* - If the argument is a type, a directive or a component with the type will be bound.
15651563
*
1566-
If the argument is a string, the string is interpreted as a selector. An element containing the
1567-
matching template variable (e.g. `#child`) will be bound.
1564+
* - If the argument is a string, the string behaviors as a selectors. An element matched template
1565+
* variables (e.g. `#child`) will be bound.
15681566
*
1569-
* In either case, `@ViewChild()` assigns the first (looking from above) element if there are
1570-
multiple matches.
1567+
* In either case, `@ViewChild()` assigns the first (looking from above) element if the result is
1568+
* multiple.
15711569
*
15721570
* View child is set before the `ngAfterViewInit` callback is called.
15731571
*
@@ -19382,7 +19380,7 @@ return /******/ (function(modules) { // webpackBootstrap
1938219380
}
1938319381
Parser.prototype.parseAction = function (input, location) {
1938419382
this._checkNoInterpolation(input, location);
19385-
var tokens = this._lexer.tokenize(input);
19383+
var tokens = this._lexer.tokenize(this._stripComments(input));
1938619384
var ast = new _ParseAST(input, location, tokens, true).parseChain();
1938719385
return new ast_1.ASTWithSource(ast, input, location);
1938819386
};
@@ -19405,7 +19403,7 @@ return /******/ (function(modules) { // webpackBootstrap
1940519403
return quote;
1940619404
}
1940719405
this._checkNoInterpolation(input, location);
19408-
var tokens = this._lexer.tokenize(input);
19406+
var tokens = this._lexer.tokenize(this._stripComments(input));
1940919407
return new _ParseAST(input, location, tokens, false).parseChain();
1941019408
};
1941119409
Parser.prototype._parseQuote = function (input, location) {
@@ -19430,7 +19428,7 @@ return /******/ (function(modules) { // webpackBootstrap
1943019428
return null;
1943119429
var expressions = [];
1943219430
for (var i = 0; i < split.expressions.length; ++i) {
19433-
var tokens = this._lexer.tokenize(split.expressions[i]);
19431+
var tokens = this._lexer.tokenize(this._stripComments(split.expressions[i]));
1943419432
var ast = new _ParseAST(input, location, tokens, false).parseChain();
1943519433
expressions.push(ast);
1943619434
}
@@ -19461,6 +19459,26 @@ return /******/ (function(modules) { // webpackBootstrap
1946119459
Parser.prototype.wrapLiteralPrimitive = function (input, location) {
1946219460
return new ast_1.ASTWithSource(new ast_1.LiteralPrimitive(input), input, location);
1946319461
};
19462+
Parser.prototype._stripComments = function (input) {
19463+
var i = this._commentStart(input);
19464+
return lang_1.isPresent(i) ? input.substring(0, i).trim() : input;
19465+
};
19466+
Parser.prototype._commentStart = function (input) {
19467+
var outerQuote = null;
19468+
for (var i = 0; i < input.length - 1; i++) {
19469+
var char = lang_1.StringWrapper.charCodeAt(input, i);
19470+
var nextChar = lang_1.StringWrapper.charCodeAt(input, i + 1);
19471+
if (char === lexer_1.$SLASH && nextChar == lexer_1.$SLASH && lang_1.isBlank(outerQuote))
19472+
return i;
19473+
if (outerQuote === char) {
19474+
outerQuote = null;
19475+
}
19476+
else if (lang_1.isBlank(outerQuote) && lexer_1.isQuote(char)) {
19477+
outerQuote = char;
19478+
}
19479+
}
19480+
return null;
19481+
};
1946419482
Parser.prototype._checkNoInterpolation = function (input, location) {
1946519483
var parts = lang_1.StringWrapper.split(input, INTERPOLATION_REGEXP);
1946619484
if (parts.length > 1) {
@@ -20139,6 +20157,7 @@ return /******/ (function(modules) { // webpackBootstrap
2013920157
exports.$RBRACKET = 93;
2014020158
var $CARET = 94;
2014120159
var $_ = 95;
20160+
exports.$BT = 96;
2014220161
var $a = 97, $e = 101, $f = 102, $n = 110, $r = 114, $t = 116, $u = 117, $v = 118, $z = 122;
2014320162
exports.$LBRACE = 123;
2014420163
exports.$BAR = 124;
@@ -20397,6 +20416,10 @@ return /******/ (function(modules) { // webpackBootstrap
2039720416
function isExponentSign(code) {
2039820417
return code == exports.$MINUS || code == exports.$PLUS;
2039920418
}
20419+
function isQuote(code) {
20420+
return code === exports.$SQ || code === exports.$DQ || code === exports.$BT;
20421+
}
20422+
exports.isQuote = isQuote;
2040020423
function unescape(code) {
2040120424
switch (code) {
2040220425
case $n:

bundles/angular2-all.umd.min.js

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundles/angular2.dev.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14178,6 +14178,7 @@ System.register("angular2/src/compiler/expression_parser/lexer", ["angular2/src/
1417814178
exports.$RBRACKET = 93;
1417914179
var $CARET = 94;
1418014180
var $_ = 95;
14181+
exports.$BT = 96;
1418114182
var $a = 97,
1418214183
$e = 101,
1418314184
$f = 102,
@@ -14421,6 +14422,10 @@ System.register("angular2/src/compiler/expression_parser/lexer", ["angular2/src/
1442114422
function isExponentSign(code) {
1442214423
return code == exports.$MINUS || code == exports.$PLUS;
1442314424
}
14425+
function isQuote(code) {
14426+
return code === exports.$SQ || code === exports.$DQ || code === exports.$BT;
14427+
}
14428+
exports.isQuote = isQuote;
1442414429
function unescape(code) {
1442514430
switch (code) {
1442614431
case $n:
@@ -20652,7 +20657,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2065220657
}
2065320658
Parser.prototype.parseAction = function(input, location) {
2065420659
this._checkNoInterpolation(input, location);
20655-
var tokens = this._lexer.tokenize(input);
20660+
var tokens = this._lexer.tokenize(this._stripComments(input));
2065620661
var ast = new _ParseAST(input, location, tokens, true).parseChain();
2065720662
return new ast_1.ASTWithSource(ast, input, location);
2065820663
};
@@ -20673,7 +20678,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2067320678
return quote;
2067420679
}
2067520680
this._checkNoInterpolation(input, location);
20676-
var tokens = this._lexer.tokenize(input);
20681+
var tokens = this._lexer.tokenize(this._stripComments(input));
2067720682
return new _ParseAST(input, location, tokens, false).parseChain();
2067820683
};
2067920684
Parser.prototype._parseQuote = function(input, location) {
@@ -20698,7 +20703,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2069820703
return null;
2069920704
var expressions = [];
2070020705
for (var i = 0; i < split.expressions.length; ++i) {
20701-
var tokens = this._lexer.tokenize(split.expressions[i]);
20706+
var tokens = this._lexer.tokenize(this._stripComments(split.expressions[i]));
2070220707
var ast = new _ParseAST(input, location, tokens, false).parseChain();
2070320708
expressions.push(ast);
2070420709
}
@@ -20726,6 +20731,25 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2072620731
Parser.prototype.wrapLiteralPrimitive = function(input, location) {
2072720732
return new ast_1.ASTWithSource(new ast_1.LiteralPrimitive(input), input, location);
2072820733
};
20734+
Parser.prototype._stripComments = function(input) {
20735+
var i = this._commentStart(input);
20736+
return lang_1.isPresent(i) ? input.substring(0, i).trim() : input;
20737+
};
20738+
Parser.prototype._commentStart = function(input) {
20739+
var outerQuote = null;
20740+
for (var i = 0; i < input.length - 1; i++) {
20741+
var char = lang_1.StringWrapper.charCodeAt(input, i);
20742+
var nextChar = lang_1.StringWrapper.charCodeAt(input, i + 1);
20743+
if (char === lexer_1.$SLASH && nextChar == lexer_1.$SLASH && lang_1.isBlank(outerQuote))
20744+
return i;
20745+
if (outerQuote === char) {
20746+
outerQuote = null;
20747+
} else if (lang_1.isBlank(outerQuote) && lexer_1.isQuote(char)) {
20748+
outerQuote = char;
20749+
}
20750+
}
20751+
return null;
20752+
};
2072920753
Parser.prototype._checkNoInterpolation = function(input, location) {
2073020754
var parts = lang_1.StringWrapper.split(input, INTERPOLATION_REGEXP);
2073120755
if (parts.length > 1) {

bundles/angular2.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14178,6 +14178,7 @@ System.register("angular2/src/compiler/expression_parser/lexer", ["angular2/src/
1417814178
exports.$RBRACKET = 93;
1417914179
var $CARET = 94;
1418014180
var $_ = 95;
14181+
exports.$BT = 96;
1418114182
var $a = 97,
1418214183
$e = 101,
1418314184
$f = 102,
@@ -14421,6 +14422,10 @@ System.register("angular2/src/compiler/expression_parser/lexer", ["angular2/src/
1442114422
function isExponentSign(code) {
1442214423
return code == exports.$MINUS || code == exports.$PLUS;
1442314424
}
14425+
function isQuote(code) {
14426+
return code === exports.$SQ || code === exports.$DQ || code === exports.$BT;
14427+
}
14428+
exports.isQuote = isQuote;
1442414429
function unescape(code) {
1442514430
switch (code) {
1442614431
case $n:
@@ -20652,7 +20657,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2065220657
}
2065320658
Parser.prototype.parseAction = function(input, location) {
2065420659
this._checkNoInterpolation(input, location);
20655-
var tokens = this._lexer.tokenize(input);
20660+
var tokens = this._lexer.tokenize(this._stripComments(input));
2065620661
var ast = new _ParseAST(input, location, tokens, true).parseChain();
2065720662
return new ast_1.ASTWithSource(ast, input, location);
2065820663
};
@@ -20673,7 +20678,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2067320678
return quote;
2067420679
}
2067520680
this._checkNoInterpolation(input, location);
20676-
var tokens = this._lexer.tokenize(input);
20681+
var tokens = this._lexer.tokenize(this._stripComments(input));
2067720682
return new _ParseAST(input, location, tokens, false).parseChain();
2067820683
};
2067920684
Parser.prototype._parseQuote = function(input, location) {
@@ -20698,7 +20703,7 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2069820703
return null;
2069920704
var expressions = [];
2070020705
for (var i = 0; i < split.expressions.length; ++i) {
20701-
var tokens = this._lexer.tokenize(split.expressions[i]);
20706+
var tokens = this._lexer.tokenize(this._stripComments(split.expressions[i]));
2070220707
var ast = new _ParseAST(input, location, tokens, false).parseChain();
2070320708
expressions.push(ast);
2070420709
}
@@ -20726,6 +20731,25 @@ System.register("angular2/src/compiler/expression_parser/parser", ["angular2/src
2072620731
Parser.prototype.wrapLiteralPrimitive = function(input, location) {
2072720732
return new ast_1.ASTWithSource(new ast_1.LiteralPrimitive(input), input, location);
2072820733
};
20734+
Parser.prototype._stripComments = function(input) {
20735+
var i = this._commentStart(input);
20736+
return lang_1.isPresent(i) ? input.substring(0, i).trim() : input;
20737+
};
20738+
Parser.prototype._commentStart = function(input) {
20739+
var outerQuote = null;
20740+
for (var i = 0; i < input.length - 1; i++) {
20741+
var char = lang_1.StringWrapper.charCodeAt(input, i);
20742+
var nextChar = lang_1.StringWrapper.charCodeAt(input, i + 1);
20743+
if (char === lexer_1.$SLASH && nextChar == lexer_1.$SLASH && lang_1.isBlank(outerQuote))
20744+
return i;
20745+
if (outerQuote === char) {
20746+
outerQuote = null;
20747+
} else if (lang_1.isBlank(outerQuote) && lexer_1.isQuote(char)) {
20748+
outerQuote = char;
20749+
}
20750+
}
20751+
return null;
20752+
};
2072920753
Parser.prototype._checkNoInterpolation = function(input, location) {
2073020754
var parts = lang_1.StringWrapper.split(input, INTERPOLATION_REGEXP);
2073120755
if (parts.length > 1) {

bundles/angular2.min.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)