From a20f491abd66d7667c919b150cb3e8f8b3e1a237 Mon Sep 17 00:00:00 2001 From: Eemeli Aro Date: Mon, 27 Oct 2025 19:40:45 +0200 Subject: [PATCH] Drop u:locale --- docs/goals.md | 1 - spec/functions/string.md | 2 +- spec/u-namespace.md | 42 ------------------------------- test/README.md | 1 - test/schemas/v0/tests.schema.json | 3 +-- test/tests/u-options.json | 16 ------------ 6 files changed, 2 insertions(+), 63 deletions(-) diff --git a/docs/goals.md b/docs/goals.md index 57fac73c66..4edcaf7429 100644 --- a/docs/goals.md +++ b/docs/goals.md @@ -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. diff --git a/spec/functions/string.md b/spec/functions/string.md index 88f0c16367..41e140a275 100644 --- a/spec/functions/string.md +++ b/spec/functions/string.md @@ -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 diff --git a/spec/u-namespace.md b/spec/u-namespace.md index 38a278af93..9e32d4b50e 100644 --- a/spec/u-namespace.md +++ b/spec/u-namespace.md @@ -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. diff --git a/test/README.md b/test/README.md index 352795f964..1d13807dc0 100644 --- a/test/README.md +++ b/test/README.md @@ -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 diff --git a/test/schemas/v0/tests.schema.json b/test/schemas/v0/tests.schema.json index 11a0d8ca2f..20e07feb84 100644 --- a/test/schemas/v0/tests.schema.json +++ b/test/schemas/v0/tests.schema.json @@ -206,8 +206,7 @@ "enum": [ ":percent", "u:dir", - "u:id", - "u:locale" + "u:id" ] } }, diff --git a/test/tests/u-options.json b/test/tests/u-options.json index 80cbaa7748..e2a9539002 100644 --- a/test/tests/u-options.json +++ b/test/tests/u-options.json @@ -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}",