8000 Drop the u:locale option by eemeli · Pull Request #1014 · unicode-org/message-format-wg · GitHub
[go: up one dir, main page]

Skip to content

Drop the u:locale option #1014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
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}
> ```

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

### `u:locale`

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 value of the `u:locale` _option_ is 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 value of the `u:locale` _option_ 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`

Replaces the base directionality defined in
Expand Down
8 changes: 2 additions & 6 deletions test/tests/u-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
]
},
{
"src": "{#tag u:dir=rtl u:locale=ar}content{/ns:tag}",
"src": "{#tag u:dir=rtl}content{/ns:tag}",
"exp": "content",
"expErrors": [{ "type": "bad-option" }, { "type": "bad-option" }],
"expErrors": [{ "type": "bad-option" }],
"expParts": [
{
"type": "markup",
Expand All @@ -50,10 +50,6 @@
}
]
},
{
"src": "hello {4.2 :number u:locale=fr}",
"exp": "hello 4,2"
},
{
"src": "hello {world :string u:dir=ltr u:id=foo}",
"exp": "hello \u2066world\u2069",
Expand Down
0