Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docs/goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ The MessageFormat Working Group is a working group of the CLDR-TC.
- percent formatting
- Deliver at least as Technical Preview (v49) and Stable (v50) all draft functions and options
- `:unit`
- the `u:locale` option
- Deliver as Technical Preview additional functions to support significant additional functionality.
Such functions could include: lists, ranges, relative time, inflection.
- Deliver as Technical Preview a machine-readable function description format or syntax.
Expand Down
2 changes: 1 addition & 1 deletion spec/functions/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The function `:string` has no _options_.
> For example:
>
> ```
> {$s :string u:dir=ltr u:locale=fr-CA}
> {$s :string u:dir=ltr u:id=my-string}
> ```

##### `:string` Resolved Value
Expand Down
42 changes: 0 additions & 42 deletions spec/u-namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,48 +40,6 @@ or can be resolved to a string without error.
For other values, a _Bad Option_ error is emitted
and the `u:id` _option_ and its _option value_ are ignored.

#### `u:locale`

> [!IMPORTANT]
> This _option_ has a status of **Draft**.
> It is proposed for inclusion in a future release and is not Stable.

Implementations MAY support this option.

Replaces the _locale_ defined in the _function context_ for this _expression_.

A comma-delimited list consisting of
well-formed [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
language tags,
or an implementation-defined list of such tags.

If this _option_ is set on _markup_, a _Bad Option_ error is emitted
and the `u:locale` _option_ and its _option value_ are ignored.

During processing, the `u:locale` _option_
MUST be removed from the resolved mapping of _options_
before calling the _function handler_.

Values matching the following ABNF are always accepted:
```abnf
u-locale-option = unicode_bcp47_locale_id *(o "," o unicode_bcp47_locale_id)
```
using `unicode_bcp47_locale_id` as defined for
[Unicode Locale Identifier](https://unicode.org/reports/tr35/tr35.html#unicode_bcp47_locale_id).

Implementations MAY support additional language tags,
such as private-use or grandfathered tags,
or tags using `_` instead of `-` as a separator.
When the value of `u:locale` is set by a _variable_,
implementations MAY support non-string values otherwise representing locales.

Implementations MAY emit a _Bad Option_ error
and MAY ignore the `u:locale` _option_ and _option value_ as a whole
or any of the entries in the list of language tags.
This might be because the locale specified is not supported
or because the language tag is not well-formed,
not valid, or some other reason.

#### `u:dir`

Implementations SHOULD support this option.
Expand Down
1 change: 0 additions & 1 deletion test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ This may include one or more of the following:
| `:percent` | The [:percent](../spec/functions/number.md#the-percent-function) function |
| `u:dir` | The [u:dir](../spec/u-namespace.md#udir) option |
| `u:id` | The [u:id](../spec/u-namespace.md#uid) option |
| `u:locale` | The [u:locale](../spec/u-namespace.md#ulocale) option |

## Test Functions

Expand Down
3 changes: 1 addition & 2 deletions test/schemas/v0/tests.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@
"enum": [
":percent",
"u:dir",
"u:id",
"u:locale"
"u:id"
]
}
},
Expand Down
16 changes: 0 additions & 16 deletions test/tests/u-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,6 @@
{ "type": "markup", "kind": "close", "name": "ns:tag" }
]
},
{
"tags": ["u:locale"],
"src": "hello {4.2 :number u:locale=fr}",
"exp": "hello 4,2"
},
{
"tags": ["u:dir", "u:locale"],
"src": "{#tag u:dir=rtl u:locale=ar}content{/ns:tag}",
"exp": "content",
"expErrors": [{ "type": "bad-option" }],
"expParts": [
{ "type": "markup", "kind": "open", "name": "tag" },
{ "type": "text", "value": "content" },
{ "type": "markup", "kind": "close", "name": "ns:tag" }
]
},
{
"tags": ["u:dir", "u:id"],
"src": "hello {world :string u:dir=ltr u:id=foo}",
Expand Down