@@ -280,7 +280,7 @@ The key `*` is a "catch-all" key, matching all selector values.
280
280
281
281
``` ebnf
282
282
Variant ::= VariantKey* Pattern
283
- VariantKey ::= String | Nmtoken | '*'
283
+ VariantKey ::= Literal | Nmtoken | '*'
284
284
```
285
285
286
286
A well-formed message is considered valid if the following requirements are satisfied:
@@ -300,8 +300,8 @@ This serves 3 purposes:
300
300
` hello = [Hello] ` will unambiguously define the ` Hello ` message without the space in front of it.
301
301
- The message should be conveniently embeddable in various programming languages
302
302
without the need to escape characters commonly related to strings, e.g. ` " ` and ` ' ` .
303
- Such need may still occur when a singe or double quote is
304
- used in the translatable content or to delimit a string literal .
303
+ Such need may still occur when a single or double quote is
304
+ used in the translatable content.
305
305
- The syntax should make it as clear as possible which parts of the message body
306
306
are translatable and which ones are part of the formatting logic definition.
307
307
@@ -327,7 +327,7 @@ Placeholder ::= '{' (Expression | MarkupStart | MarkupEnd) '}'
327
327
328
328
Expressions can either start with an operand, or be standalone function calls.
329
329
330
- The operand is a quoted string literal or a variable name.
330
+ The operand is a literal or a variable name.
331
331
The operand can be optionally followed by an _ annotation_ :
332
332
a formatting function and its named options.
333
333
Formatting functions do not accept any positional arguments
@@ -337,27 +337,27 @@ Standalone function calls don't have any operands in front of them.
337
337
338
338
``` ebnf
339
339
Expression ::= Operand Annotation? | Annotation
340
- Operand ::= String | Variable
340
+ Operand ::= Literal | Variable
341
341
Annotation ::= Function Option*
342
- Option ::= Name '=' (String | Nmtoken | Variable)
342
+ Option ::= Name '=' (Literal | Nmtoken | Variable)
343
343
```
344
344
345
345
Examples:
346
346
347
347
```
348
- " 1.23"
348
+ ( 1.23)
349
349
```
350
350
351
351
```
352
- " 1.23" :number maxFractionDigits=1
352
+ ( 1.23) :number maxFractionDigits=1
353
353
```
354
354
355
355
```
356
- " 1970-01-01T13:37:00.000Z" :datetime weekday=long
356
+ ( 1970-01-01T13:37:00.000Z) :datetime weekday=long
357
357
```
358
358
359
359
```
360
- " Thu Jan 01 1970 14:37:00 GMT+0100 (CET)" :datetime weekday=long
360
+ ( Thu Jan 01 1970 14:37:00 GMT+0100 \ (CET\)) :datetime weekday=long
361
361
```
362
362
363
363
```
@@ -388,7 +388,7 @@ Examples:
388
388
```
389
389
390
390
```
391
- [{h1 name=" above-and-beyond" }Above And Beyond{/h1}]
391
+ [{h1 name=( above-and-beyond) }Above And Beyond{/h1}]
392
392
```
393
393
394
394
## Tokens
@@ -440,26 +440,26 @@ NameChar ::= NameStart | [0-9] | "-" | "." | #xB7
440
440
| [#x0300-#x036F] | [#x203F-#x2040]
441
441
```
442
442
443
- ### Quoted Strings
443
+ ### Literal
444
444
445
- Any Unicode codepoint is allowed in quoted string literals, with the exception of
446
- ` " ` (which ends the string literal) ,
445
+ Any Unicode code point is allowed in literals,
446
+ with the exception of its delimiters ` ( ` and ` ) ` ,
447
447
and ` \ ` (which starts an escape sequence).
448
448
449
449
``` ebnf
450
- String ::= '" ' (StringChar | StringEscape )* '" ' /* ws: explicit */
451
- StringChar ::= AnyChar - ('"' | Esc)
450
+ Literal ::= '( ' (LiteralChar | LiteralEscape )* ') ' /* ws: explicit */
451
+ LiteralChar ::= AnyChar - ('(' | ')' | Esc)
452
452
```
453
453
454
454
### Escape Sequences
455
455
456
456
Escape sequences are introduced by the backslash character (` \ ` ).
457
- They are allowed in translatable text as well as in string literals.
457
+ They are allowed in translatable text as well as in literals.
458
458
459
459
``` ebnf
460
460
Esc ::= '\'
461
461
TextEscape ::= Esc Esc | Esc '[' | Esc ']' | Esc '{' | Esc '}'
462
- StringEscape ::= Esc Esc | Esc '" '
462
+ LiteralEscape ::= Esc Esc | Esc '(' | Esc ') '
463
463
```
464
464
465
465
### Whitespace
0 commit comments