Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0f2ca73
Preparing the specification for LDML47 release
aphillips Feb 15, 2025
5e8783e
Update syntax.md
aphillips Feb 15, 2025
ee1c5c0
Update formatting.md
aphillips Feb 15, 2025
70f25b2
Update appendices.md
aphillips Feb 15, 2025
9a227bf
Update errors.md
aphillips Feb 15, 2025
dc1d8b4
Update u-namespace.md
aphillips Feb 15, 2025
162e462
Update README.md
aphillips Feb 15, 2025
5967ddb
Update README.md
aphillips Feb 15, 2025
2c7ab30
Remove "introduction" heading from formatting
aphillips Feb 15, 2025
7810003
Make a better header for "formatting" subsection
aphillips Feb 15, 2025
e72625e
Make non-`number`/`integer` functions DRAFT
aphillips Feb 15, 2025
b7ece27
Make date/time DRAFT
aphillips Feb 15, 2025
df87a37
Describe Draft and Stable
aphillips Feb 15, 2025
ead8d38
typo :-P
aphillips Feb 15, 2025
fc64c8b
Update README.md
aphillips Feb 15, 2025
beb4097
Update spec/data-model/README.md
aphillips Feb 16, 2025
cc2e198
Update spec/functions/README.md
aphillips Feb 16, 2025
aec0064
Update spec/u-namespace.md
aphillips Feb 16, 2025
1149a5a
Remove proposed
aphillips Feb 17, 2025
6d326df
Remove proposed
aphillips Feb 17, 2025
c0cd745
Remove one stability policy item per discussion
aphillips Feb 17, 2025
d0386aa
Update spec/functions/datetime.md
aphillips Feb 17, 2025
d394303
Functions _or_ options can be Drafty
eemeli Feb 17, 2025
32bfb25
Merge branch 'main' into aphillips-v47-prep
aphillips Feb 17, 2025
ac978d7
Remove spurious mentions of 2/2.0
aphillips Feb 17, 2025
7ac7411
Remove spurious mention of 2.0
aphillips Feb 17, 2025
f0fdd76
Remove spurious mentions of 2/2.0
aphillips Feb 17, 2025
bb4ca6d
option-option typo fix
aphillips Feb 17, 2025
cbab91c
Merge branch 'main' into aphillips-v47-prep
aphillips Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/appendices.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Appendices
## Appendices

## Security Considerations
### Security Considerations

MessageFormat 2.0 _patterns_ are meant to allow a _message_ to include any string value
which users might normally wish to use in their environment.
Expand Down Expand Up @@ -43,7 +43,7 @@ fingerprinting, and other types of bad behavior.
Any installed code needs to be appropriately sandboxed.
In addition, end-users need to be aware of the risks involved.

## Acknowledgements
### Acknowledgements

Special thanks to the following people for their contributions to making MessageFormat v2.
The following people contributed to our github repo and are listed in order by contribution size:
Expand Down
14 changes: 7 additions & 7 deletions spec/data-model/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Interchange Data Model
## Interchange Data Model

This section defines a data model representation of MessageFormat 2 _messages_.

Expand Down Expand Up @@ -47,7 +47,7 @@ declarations, options, and attributes to be optional rather than required proper
> sometimes uses the production `identifier`.
> This happens when the named item, such as a _function_, supports namespacing.

## Messages
### Messages Model

A `SelectMessage` corresponds to a syntax message that includes _selectors_.
A message without _selectors_ and with a single _pattern_ is represented by a `PatternMessage`.
Expand Down Expand Up @@ -114,7 +114,7 @@ interface CatchallKey {
}
```

## Patterns
### Pattern Model

Each `Pattern` contains a linear sequence of text and placeholders corresponding to potential output of a message.

Expand Down Expand Up @@ -160,7 +160,7 @@ interface FunctionExpression {
}
```

## Expressions
### Expression Model

The `Literal` and `VariableRef` correspond to the the _literal_ and _variable_ syntax rules.
When they are used as the `body` of an `Expression`,
Expand Down Expand Up @@ -200,7 +200,7 @@ interface FunctionRef {
type Options = Map<string, Literal | VariableRef>;
```

## Markup
### Markup Model

A `Markup` object has a `kind` of either `"open"`, `"standalone"`, or `"close"`,
each corresponding to _open_, _standalone_, and _close_ _markup_.
Expand All @@ -218,7 +218,7 @@ interface Markup {
}
```

## Attributes
### Attribute Model

`Attributes` is a key-value mapping
used to represent the _expression_ and _markup_ _attributes_.
Expand All @@ -229,7 +229,7 @@ _Attributes_ with no value are represented by `true` here.
type Attributes = Map<string, Literal | true>;
```

## Extensions
### Model Extensions

Implementations MAY extend this data model with additional interfaces,
as well as adding new fields to existing interfaces.
Expand Down
38 changes: 19 additions & 19 deletions spec/errors.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Errors
## Errors

Errors can occur during the processing of a _message_.
Some errors can be detected statically,
Expand All @@ -9,7 +9,7 @@ Other errors might be detected during selection or formatting of a given _messag
Where available, the use of validation tools is recommended,
as early detection of errors makes their correction easier.

## Error Handling
### Error Handling

_Syntax Errors_ and _Data Model Errors_ apply to all message processors,
and MUST be emitted as soon as possible.
Expand Down Expand Up @@ -51,7 +51,7 @@ or calling MatchSelectorKeys with its resolved value,
the _selector_ MUST NOT match any _variant_ _key_ other than the catch-all `*`
and a _Bad Selector_ error MUST be emitted.

## Syntax Errors
### Syntax Errors

**_<dfn>Syntax Errors</dfn>_** occur when the syntax representation of a message is not _well-formed_.

Expand All @@ -73,12 +73,12 @@ and a _Bad Selector_ error MUST be emitted.
> .local $var = {|no message body|}
> ```
## Data Model Errors
### Data Model Errors
**_<dfn>Data Model Errors</dfn>_** occur when a message is not _valid_ due to
violating one of the semantic requirements on its structure.
### Variant Key Mismatch
#### Variant Key Mismatch
A **_<dfn>Variant Key Mismatch</dfn>_** occurs when the number of keys on a _variant_
does not equal the number of _selectors_.
Expand All @@ -101,7 +101,7 @@ does not equal the number of _selectors_.
> * * {{Otherwise}}
> ```
### Missing Fallback Variant
#### Missing Fallback Variant
A **_<dfn>Missing Fallback Variant</dfn>_** error occurs when the message
does not include a _variant_ with only catch-all keys.
Expand All @@ -123,7 +123,7 @@ does not include a _variant_ with only catch-all keys.
> * 1 {{Second is one}}
> ```
### Missing Selector Annotation
#### Missing Selector Annotation
A **_<dfn>Missing Selector Annotation</dfn>_** error occurs when the _message_
contains a _selector_ that does not
Expand Down Expand Up @@ -151,7 +151,7 @@ directly or indirectly reference a _declaration_ with a _function_.
> * {{Value is not one}}
> ```
### Duplicate Declaration
#### Duplicate Declaration
A **_<dfn>Duplicate Declaration</dfn>_** error occurs when a _variable_ is declared more than once.
Note that an input _variable_ is implicitly declared when it is first used,
Expand Down Expand Up @@ -182,7 +182,7 @@ so explicitly declaring it after such use is also an error.
> {{{$var} cannot be redefined. {$var2} cannot refer to itself}}
> ```
### Duplicate Option Name
#### Duplicate Option Name
A **_<dfn>Duplicate Option Name</dfn>_** error occurs when the same _identifier_
appears on the left-hand side of more than one _option_ in the same _expression_.
Expand All @@ -198,7 +198,7 @@ appears on the left-hand side of more than one _option_ in the same _expression_
> {{This is {$foo}}}
> ```
### Duplicate Variant
#### Duplicate Variant
A **_<dfn>Duplicate Variant</dfn>_** error occurs when the
same list of _keys_ is used for more than one _variant_.
Expand All @@ -222,12 +222,12 @@ same list of _keys_ is used for more than one _variant_.
> * * {{The default variant}}
> ```
## Resolution Errors
### Resolution Errors
**_<dfn>Resolution Errors</dfn>_** occur when the runtime value of a part of a message
cannot be determined.
### Unresolved Variable
#### Unresolved Variable
An **_<dfn>Unresolved Variable</dfn>_** error occurs when a variable reference cannot be resolved.
Expand All @@ -246,7 +246,7 @@ An **_<dfn>Unresolved Variable</dfn>_** error occurs when a variable reference c
> * {{The value is not one.}}
> ```
### Unknown Function
#### Unknown Function
An **_<dfn>Unknown Function</dfn>_** error occurs when an _expression_ includes
a reference to a function which cannot be resolved.
Expand All @@ -266,7 +266,7 @@ a reference to a function which cannot be resolved.
> * {{The value is not one.}}
> ```
### Bad Selector
#### Bad Selector
A **_<dfn>Bad Selector</dfn>_** error occurs when a message includes a _selector_
with a _resolved value_ which does not support selection.
Expand All @@ -280,7 +280,7 @@ with a _resolved value_ which does not support selection.
> * {{The due date is {$day}}}
> ```
## Message Function Errors
### Message Function Errors
A **_<dfn>Message Function Error</dfn>_** is any error that occurs
when calling a _function handler_
Expand Down Expand Up @@ -319,7 +319,7 @@ Implementations MAY also provide implementation-defined _Message Function Error_
> Your {$field} is {$id :ns:get field=$field}
> ```
### Bad Operand
#### Bad Operand
A **_<dfn>Bad Operand</dfn>_** error is any error that occurs due to the content or format of the _operand_,
such as when the _operand_ provided to a _function_ during _function resolution_ does not match one of the
Expand All @@ -344,7 +344,7 @@ for that specific _function_.
> * {{The value is not one.}}
> ```
### Bad Option
#### Bad Option
A **_<dfn>Bad Option</dfn>_** error is an error that occurs when there is
an implementation-defined error with an _option_ or its value.
Expand All @@ -365,7 +365,7 @@ These might include:
> The answer is {42 :number minimumFractionDigits=foo}.
> ```
### Bad Variant Key
#### Bad Variant Key
A **_<dfn>Bad Variant Key</dfn>_** error is an error that occurs when a _variant_ _key_
does not match the expected implementation-defined format.
Expand All @@ -383,7 +383,7 @@ does not match the expected implementation-defined format.
> * {{The value is not one.}}
> ```
### Unsupported Operation
#### Unsupported Operation
A **_<dfn>Unsupported Operation</dfn>_** error is an implementation-specific error
that occurs when a given _option_, _option_ value, _operand_ value, or some combination
Expand Down
Loading