Skip to content

Commit 0c1449c

Browse files
authored
Address #703: make syntax/data model error fallback clear
Fixes #703 This fix moves the syntax/data model error resolution text verbatim from the bottom of the pattern selection section to the formatting intro (except to replace the words 'pattern selection' with 'formatting', making it more general). In addition, this changes uses US vs. UK spelling in the first sentence of the intro (an editorial nit) and removes the existing similar instruction about fallbacks. This is a normative change because the previous text had "MAY" for the fallback. I also rephrased the "To start..." paragraph to be less chatty by using an imperative (this is an editorial change).
1 parent 38fdd69 commit 0c1449c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

spec/formatting.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
## Introduction
44

5-
This document defines the behaviour of a MessageFormat 2.0 implementation
5+
This document defines the behavior of a MessageFormat 2.0 implementation
66
when formatting a message for display in a user interface, or for some later processing.
77

8-
To start, we presume that a _message_ has either been parsed from its syntax
9-
or created from a data model description.
10-
If this construction has encountered any _Syntax Errors_ or _Data Model Errors_,
11-
an appropriate error MUST be emitted and a _fallback value_ MAY be used as the formatting result.
8+
To start, parse the _message_ from its syntax or create it from a data model description.
9+
10+
If the message being formatted has any _Syntax Errors_ or _Data Model Errors_,
11+
the result of formatting the _message_ MUST be a pattern resolving to a single _fallback value_
12+
using the message's fallback string defined in the _formatting context_
13+
or if this is not available or empty, the U+FFFD REPLACEMENT CHARACTER ``.
1214

1315
Formatting of a _message_ is defined by the following operations:
1416

@@ -495,11 +497,6 @@ This selection method is defined in more detail below.
495497
An implementation MAY use any pattern selection method,
496498
as long as its observable behavior matches the results of the method defined here.
497499
498-
If the message being formatted has any _Syntax Errors_ or _Data Model Errors_,
499-
the result of pattern selection MUST be a pattern resolving to a single _fallback value_
500-
using the message's fallback string defined in the _formatting context_
501-
or if this is not available or empty, the U+FFFD REPLACEMENT CHARACTER `�`.
502-
503500
### Resolve Selectors
504501
505502
First, resolve the values of each _selector_:

0 commit comments

Comments
 (0)