5
5
// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
6
6
// constructs incompatible with that mode.
7
7
8
- /* global $interpolateMinErr: false */
8
+ /* global $$ interpolateMinErr: false */
9
9
/* global indexToLineAndColumn: false */
10
10
/* global InterpolationParts: false */
11
11
/* global PluralMessage: false */
@@ -124,7 +124,7 @@ MessageFormatParser.prototype.run = function run(initialRule) {
124
124
} ;
125
125
126
126
MessageFormatParser . prototype . errorInParseLogic = function errorInParseLogic ( ) {
127
- throw $interpolateMinErr ( 'logicbug' ,
127
+ throw $$ interpolateMinErr ( 'logicbug' ,
128
128
'The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: "{0}"' ,
129
129
this . text ) ;
130
130
} ;
@@ -141,19 +141,19 @@ MessageFormatParser.prototype.errorExpecting = function errorExpecting() {
141
141
var match = this . matchRe ( NEXT_WORD_RE ) , position ;
142
142
if ( match == null ) {
143
143
position = indexToLineAndColumn ( this . text , this . index ) ;
144
- throw $interpolateMinErr ( 'reqarg' ,
144
+ throw $$ interpolateMinErr ( 'reqarg' ,
145
145
'Expected one of "plural" or "select" at line {0}, column {1} of text "{2}"' ,
146
146
position . line , position . column , this . text ) ;
147
147
}
148
148
var word = match [ 1 ] ;
149
149
if ( word == "select" || word == "plural" ) {
150
150
position = indexToLineAndColumn ( this . text , this . index ) ;
151
- throw $interpolateMinErr ( 'reqcomma' ,
151
+ throw $$ interpolateMinErr ( 'reqcomma' ,
152
152
'Expected a comma after the keyword "{0}" at line {1}, column {2} of text "{3}"' ,
153
153
word , position . line , position . column , this . text ) ;
154
154
} else {
155
155
position = indexToLineAndColumn ( this . text , this . index ) ;
156
- throw $interpolateMinErr ( 'unknarg' ,
156
+ throw $$ interpolateMinErr ( 'unknarg' ,
157
157
'Unsupported keyword "{0}" at line {0}, column {1}. Only "plural" and "select" are currently supported. Text: "{3}"' ,
158
158
word , position . line , position . column , this . text ) ;
159
159
}
@@ -164,7 +164,7 @@ MessageFormatParser.prototype.ruleString = function ruleString() {
164
164
var match = this . matchRe ( STRING_START_RE ) ;
165
165
if ( match == null ) {
166
166
var position = indexToLineAndColumn ( this . text , this . index ) ;
167
- throw $interpolateMinErr ( 'wantstring' ,
167
+ throw $$ interpolateMinErr ( 'wantstring' ,
168
168
'Expected the beginning of a string at line {0}, column {1} in text "{2}"' ,
169
169
position . line , position . column , this . text ) ;
170
170
}
@@ -184,7 +184,7 @@ MessageFormatParser.prototype.ruleInsideString = function ruleInsideString() {
184
184
var match = this . searchRe ( this . stringInterestsRe ) ;
185
185
if ( match == null ) {
186
186
var position = indexToLineAndColumn ( this . text , this . stringStartIndex ) ;
187
- throw $interpolateMinErr ( 'untermstr' ,
187
+ throw $$ interpolateMinErr ( 'untermstr' ,
188
188
'The string beginning at line {0}, column {1} is unterminated in text "{2}"' ,
189
189
position . line , position . column , this . text ) ;
190
190
}
@@ -233,7 +233,7 @@ MessageFormatParser.prototype.rulePluralOffset = function rulePluralOffset() {
233
233
MessageFormatParser . prototype . assertChoiceKeyIsNew = function assertChoiceKeyIsNew ( choiceKey , index ) {
234
234
if ( this . choices [ choiceKey ] !== void 0 ) {
235
235
var position = indexToLineAndColumn ( this . text , index ) ;
236
- throw $interpolateMinErr ( 'dupvalue' ,
236
+ throw $$ interpolateMinErr ( 'dupvalue' ,
237
237
'The choice "{0}" is specified more than once. Duplicate key is at line {1}, column {2} in text "{3}"' ,
238
238
choiceKey , position . line , position . column , this . text ) ;
239
239
}
@@ -274,7 +274,7 @@ var BRACE_CLOSE_RE = /}/g;
274
274
MessageFormatParser . prototype . ruleMessageText = function ruleMessageText ( ) {
275
275
if ( ! this . consumeRe ( BRACE_OPEN_RE ) ) {
276
276
var position = indexToLineAndColumn ( this . text , this . index ) ;
277
- throw $interpolateMinErr ( 'reqopenbrace' ,
277
+ throw $$ interpolateMinErr ( 'reqopenbrace' ,
278
278
'The plural choice "{0}" must be followed by a message in braces at line {1}, column {2} in text "{3}"' ,
279
279
this . choiceKey , position . line , position . column , this . text ) ;
280
280
}
@@ -302,7 +302,7 @@ MessageFormatParser.prototype.advanceInInterpolationOrMessageText = function adv
302
302
INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE : INTERP_OR_END_MESSAGE_RE ) ;
303
303
if ( match == null ) {
304
304
var position = indexToLineAndColumn ( this . text , this . msgStartIndex ) ;
305
- throw $interpolateMinErr ( 'reqendbrace' ,
305
+ throw $$ interpolateMinErr ( 'reqendbrace' ,
306
306
'The plural/select choice "{0}" message starting at line {1}, column {2} does not have an ending closing brace. Text "{3}"' ,
307
307
this . choiceKey , position . line , position . column , this . text ) ;
308
308
}
@@ -398,7 +398,7 @@ MessageFormatParser.prototype.ruleEndMustache = function ruleEndMustache() {
398
398
var match = this . matchRe ( INTERP_END_RE ) ;
399
399
if ( match == null ) {
400
400
var position = indexToLineAndColumn ( this . text , this . index ) ;
401
- throw $interpolateMinErr ( 'reqendinterp' ,
401
+ throw $$ interpolateMinErr ( 'reqendinterp' ,
402
402
'Expecting end of interpolation symbol, "{0}", at line {1}, column {2} in text "{3}"' ,
403
403
'}}' , position . line , position . column , this . text ) ;
404
404
}
@@ -470,7 +470,7 @@ MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularEx
470
470
return ;
471
471
}
472
472
var innermostOperator = this . angularOperatorStack [ 0 ] ;
473
- throw $interpolateMinErr ( 'badexpr' ,
473
+ throw $$ interpolateMinErr ( 'badexpr' ,
474
474
'Unexpected end of Angular expression. Expecting operator "{0}" at the end of the text "{1}"' ,
475
475
this . getEndOperator ( innermostOperator ) , this . text ) ;
476
476
}
@@ -483,7 +483,7 @@ MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularEx
483
483
if ( operator == "," ) {
484
484
if ( this . trustedContext ) {
485
485
position = indexToLineAndColumn ( this . text , this . index ) ;
486
- throw $interpolateMinErr ( 'unsafe' ,
486
+ throw $$ interpolateMinErr ( 'unsafe' ,
487
487
'Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text "{3}"' ,
488
488
this . trustedContext , position . line , position . column , this . text ) ;
489
489
}
@@ -514,7 +514,7 @@ MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularEx
514
514
return ;
515
515
}
516
516
position = indexToLineAndColumn ( this . text , this . index ) ;
517
- throw $interpolateMinErr ( 'badexpr' ,
517
+ throw $$ interpolateMinErr ( 'badexpr' ,
518
518
'Unexpected operator "{0}" at line {1}, column {2} in text. Was expecting "{3}". Text: "{4}"' ,
519
519
operator , position . line , position . column , getEndOperator ( this . angularOperatorStack [ 0 ] ) , this . text ) ;
520
520
}
0 commit comments