Skip to content

Commit a1e03e5

Browse files
committed
Drop references to a "function registry"
1 parent a5eb9a3 commit a1e03e5

File tree

6 files changed

+34
-38
lines changed

6 files changed

+34
-38
lines changed

spec/formatting.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ At a minimum, it includes:
9797
defining variable values that are available during _variable resolution_.
9898
This is often determined by a user-provided argument of a formatting function call.
9999

100-
- The _function registry_,
101-
providing the _function handlers_ of the functions referred to by _message_ _functions_.
100+
- A mapping of string identifiers to the _function handlers_
101+
that are available during _function resolution_.
102102

103103
- Optionally, a fallback string to use for the _message_ if it is not _valid_.
104104

@@ -290,8 +290,8 @@ the following steps are taken:
290290
emit an _Unknown Function_ error
291291
and return a _fallback value_ as the _resolved value_ of the _expression_.
292292
293-
Implementations are not required to implement _namespaces_ or installable
294-
_function registries_.
293+
Implementations are not required to implement _namespaces_ or
294+
support _functions_ other than the _default functions_.
295295
296296
3. Perform _option resolution_.
297297

spec/functions/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MessageFormat 2.0 Default Function Registry
1+
# MessageFormat 2.0 Default Functions
22

33
## Table of Contents
44

@@ -18,8 +18,9 @@
1818

1919
## Introduction
2020

21-
This section defines the **REQUIRED** _functions_ which are REQUIRED for conformance with this specification,
22-
along with **RECOMMENDED** _functions_ that SHOULD be implemented to support
21+
This section defines the **_<dfn>default functions</dfn>_**
22+
which are REQUIRED for conformance with this specification,
23+
along with _default functions_ that SHOULD be implemented to support
2324
additional functionality.
2425

2526
To **_<dfn>accept</dfn>_** a function means that an implementation MUST NOT
@@ -34,34 +35,33 @@ Implementations MAY emit an _Unsupported Operation_ error for _options_
3435
or _option_ values that they cannot support.
3536

3637
_Functions_ can define _options_.
37-
An _option_ can be **REQUIRED** or **RECOMMENDED**.
38+
An _option_ can be REQUIRED or RECOMMENDED.
3839

39-
Implementations MUST _accept_ each **REQUIRED** _function_ and
40-
MUST _accept_ all _options_ defined as **REQUIRED** for those _functions_.
40+
Implementations MUST _accept_ each REQUIRED _default function_ and
41+
MUST _accept_ all _options_ defined as REQUIRED for those _functions_.
4142

42-
Implementations SHOULD _accept_ each **RECOMMENDED** _function_.
43+
Implementations SHOULD _accept_ each RECOMMENDED _default function_.
4344
For each such _function_, the implementation MUST accept all _options_
44-
listed as **REQUIRED** for that _function_.
45+
listed as REQUIRED for that _function_.
4546

46-
Implementations SHOULD _accept_ _options_ that are marked as **RECOMMENDED**.
47+
Implementations SHOULD _accept_ _options_ that are marked as RECOMMENDED.
4748

4849
Implementations MAY _accept_ _functions_ not defined in this specification.
4950
In addition, implementations SHOULD provide mechanisms for users to
50-
register and use user-defined _functions_ and their associated _functional handlers_.
51+
register and use user-defined _functions_ and their associated _function handlers_.
5152
Functions not defined by any version of this specification SHOULD use
5253
an implementation-defined or user-defined _namespace_.
5354

5455
Implementations MAY implement additional _options_ not defined
55-
by any version of this specification
56-
for **REQUIRED** and **RECOMMENDED** functions.
56+
by any version of this specification for _default functions_.
5757
Such _options_ MUST use an implementation-specific _namespace_.
5858

5959
Implementations MAY _accept_, for _options_ defined in this specification,
6060
_option_ values which are not defined in this specification.
6161
However, such values might become defined with a different meaning in the future,
6262
including with a different, incompatible name
6363
or using an incompatible value space.
64-
Supporting implementation-specific _option_ values for **REQUIRED** or **RECOMMENDED** functions is NOT RECOMMENDED.
64+
Supporting implementation-specific _option_ values for _default functions_ is NOT RECOMMENDED.
6565

6666
Implementations MAY _accept_, for _operands_ or _options_ defined in this specification,
6767
values with implementation-defined types.

spec/functions/datetime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Date and Time Value Formatting
22

33
This subsection describes the functions and options for date/time formatting.
4-
Selection based on date and time values is not required in this release.
4+
Selection based on date and time values is NOT REQUIRED in this release.
55

66
> [!NOTE]
77
> Selection based on date/time types is not required by MF2.

spec/functions/number.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ the value of other options, or both.
2020
> [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options)
2121
> in JavaScript's `Intl.NumberFormat`.
2222
23-
The following options and their values are required to be available on the function `:number`:
23+
The following options and their values are REQUIRED to be available on the function `:number`:
2424

2525
- `select`
2626
- `plural` (default; see [Default Value of `select` Option](#default-value-of-select-option) below)
@@ -167,8 +167,7 @@ the value of other options, or both.
167167
> [options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options)
168168
> in JavaScript's `Intl.NumberFormat`.
169169
170-
The following options and their values are required in the default registry to be available on the
171-
function `:integer`:
170+
The following options and their values are REQUIRED to be available on the function `:integer`:
172171
173172
- `select`
174173
- `plural` (default)
@@ -287,8 +286,7 @@ The options on `:math` are exclusive with each other,
287286
and exactly one option is always required.
288287
The options do not have default values.
289288
290-
The following options and their values are
291-
required in the default registry to be available on the function `:math`:
289+
The following options and their values are REQUIRED to be available on the function `:math`:
292290
293291
- `add`
294292
- ([digit size option](#digit-size-options))
@@ -438,7 +436,7 @@ Some implementations might not be able to produce all of these formats for every
438436
> The option `select` does not accept the value `ordinal` because selecting
439437
> currency values using ordinal rules makes no sense.
440438
441-
The following options and their values are required to be available on the function `:currency`:
439+
The following options and their values are REQUIRED to be available on the function `:currency`:
442440
443441
- `select`
444442
- `plural` (default)
@@ -529,7 +527,7 @@ The _function_ `:currency` performs selection as described in [Number Selection]
529527
### The `:unit` function
530528
531529
The _function_ `:unit` is **Proposed** for inclusion in the next release of this specification but has not yet been finalized.
532-
The _function_ `:unit` is proposed to be a **RECOMMENDED** selector and formatter for unitized values,
530+
The _function_ `:unit` is proposed to be a RECOMMENDED selector and formatter for unitized values,
533531
that is, for numeric values associated with a unit of measurement.
534532
This is a specialized form of numeric selection and formatting.
535533
@@ -579,7 +577,8 @@ the value of other _options_, or all of these.
579577
> The option `select` does not accept the value `ordinal` because selecting
580578
> unit values using ordinal rules makes no sense.
581579
582-
The following options and their values are required to be available on the function `:unit`:
580+
The following options and their values are REQUIRED to be available on the function `:unit`,
581+
unless otherwise indicated:
583582
584583
- `select`
585584
- `plural` (default)

spec/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1. [`message.abnf`](message.abnf)
1111
1. [Formatting](formatting.md)
1212
1. [Errors](errors.md)
13-
1. [Default Function Registry](functions/README.md)
13+
1. [Default Functions](functions/README.md)
1414
1. [`u:` Namespace](u-namespace.md)
1515
1. [Interchange data model](data-model/README.md)
1616
1. [Appendices](appendices.md)
@@ -95,10 +95,10 @@ that previously did not specify a _fallback value_.
9595
Updates to this specification will not change the syntactical meaning
9696
of any syntax defined in this specification.
9797

98-
Updates to this specification will not remove any _functions_ defined in the default function registry.
98+
Updates to this specification will not remove any _default functions_.
9999

100100
Updates to this specification will not remove any _options_ or _option_ values
101-
defined in the default function registry.
101+
defined for _default functions_.
102102

103103
> [!NOTE]
104104
> The foregoing policies are _not_ a guarantee that the results of formatting will never change.
@@ -137,7 +137,7 @@ based on this version being invalid.
137137
> - Future versions may add additional structure or meaning to existing syntax.
138138
> - Future versions may define new _keywords_.
139139
> - Future versions may make previously invalid _messages_ valid.
140-
> - Future versions may define additional _functions_ in the default registry
140+
> - Future versions may define additional _default functions_.
141141
> or may reserve the names of _functions_ for the purposes of interoperability.
142142
> - Future versions may define additional _options_ to existing functions.
143143
> - Future versions may define additional _option_ values for existing _options_.

spec/syntax.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,11 @@ values during formatting.
532532
A _function_ can appear in an _expression_ by itself or following a single _operand_.
533533
When following an _operand_, the _operand_ serves as input to the _function_.
534534
535-
Each _function_ is defined by the runtime's _function registry_.
536-
A _function_'s entry in the _function registry_ will define
537-
whether the _function_ is a _selector_ or formatter (or both),
538-
whether an _operand_ is required,
539-
what form the values of an _operand_ can take,
540-
what _options_ and _option_ values are acceptable,
541-
and what outputs might result.
542-
See [function registry](./functions/README.md) for more information.
535+
The resolution of a _function_ relies on an implementation-defined _function handler_.
536+
Some _functions_ can be used both as a _selector_ as well as in a _placeholder_;
537+
others are only valid in one of these positions.
538+
_Functions_ also differ in their requirements on the _operand_ and _options_ that they accept.
539+
See _Function Resolution_ and _default functions_ for more information.
543540
544541
A _function_ starts with a prefix sigil `:` followed by an _identifier_.
545542
The _identifier_ MAY be followed by one or more _options_.

0 commit comments

Comments
 (0)