Skip to content

Commit da9377b

Browse files
aphillipseemeliecherancatamorphismmacchiati
authored
Update from main (#914)
* Create notes-2024-08-19.md * Accept attributes design & remove spec note (#845) * Accept attributes design & remove spec note * Disallow duplicate attribute names (closes #756) * Add link to contextual options PR * Add more prose to tag example text Co-authored-by: Addison Phillips <[email protected]> * Mention attribute validity condition in the **_valid_** definition --------- Co-authored-by: Addison Phillips <[email protected]> * Update selection-declaration design doc based on mtg / issue discussion (#867) * Add tests for pattern selection (#863) * Add tests for pattern selection * Add missing errors * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]> * Add Duplicate Variant to table in test/README.md (#861) * Add new selection-declaration alternative: Require annotation of selector variables in placeholders (#860) * Add new selection-declaration alternative: Require annotation of selector variables in placeholders * Improve examples * Switch example order * Update the stability policy (#834) * Update the stability policy Based on discussion in the 2024-07-22 call and in PR #829, update the stability policy. * A deeper, more thorough rewrite - Standardizes the phrasing completely. - Moves all potential future changes (which are not, after all, stability policies) to an "important" block - Removes duplication - Separates functions, options, and option values into separate guarantees - Clarifies the note about formatting changing over time * Update spec/README.md Co-authored-by: Tim Chevalier <[email protected]> * Update spec/README.md Co-authored-by: Eemeli Aro <[email protected]> * remove well-formed * Update spec/README.md --------- Co-authored-by: Tim Chevalier <[email protected]> Co-authored-by: Eemeli Aro <[email protected]> * Refine error handling text (#816) * Refine error handling text * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Update fallback text * Turn bullet point list into paragraphs * Be more mighty Co-authored-by: Addison Phillips <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]> * Create notes-2024-08-26.md * Select "Match on variables instead of expressions" for selection-declarations (#824) * Select "Match on variables instead of expressions" for selection-declarations * Add hybrid option to selection-declaration.md (#870) * Add hybrid option to selection-declaration.md * Update selection-declaration.md fixed glitch in original edit * Update selection-declaration.md * Apply suggestions from code review Fixing typos Co-authored-by: Addison Phillips <[email protected]> * Update selection-declaration.md * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <[email protected]> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <[email protected]> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]> Co-authored-by: Eemeli Aro <[email protected]> * Update selection-declaration.md --------- Co-authored-by: Mark Davis <[email protected]> Co-authored-by: Addison Phillips <[email protected]> * Fix "Allow immutable input declarative selectors" example (#874) * Update README.md (#875) * Update README.md * Update README.md * [DESIGN] Update bidi design document to show proposed design (#871) * [DESIGN] Update bidi design document to show proposed design The design I actually think we should adopt is the "hybrid approaches" one. This is a necessary first step on the highway to UAX31 compliance and I think is responsibly contained/managed. It is a hybrid approach, in that it permits testable strict implementations to be created (particularly for message serialization). This PR consists of moving text around. I added one "pro" to one option also. * Address comments * Miscellaneous test fixes (#862) * Add missing expected bad-selector errors * Fix expected parts for unsupported-statement test * Add a few new tests for leading-whitespace and duplicate-variant * Add tests for escaped-char changes made in #743 * Fix tests for attributes with variable values * Update contributing and joining info (#876) * Update contributing and joining info * Update README.md * Update CONTRIBUTING.md * Restore CLA copy * Clarify error & fallback handling (#879) * Clarify error & fallback handling * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Select last rather than first attribute * Drop mention of "starting with Pattern Selection" * Attributes can't change the formatted output * Use "nor" instead of "or" regarding attribute restrictions --------- Co-authored-by: Addison Phillips <[email protected]> * Clarify rule selection (#878) * Clarify rule selection Fixes #868 This adds normative SHOULD language to using CLDR plural and ordinal data, which was intended originally. - clarifies that keyword selection follows exact match - clarifies the purpose of rule-based selection - makes non-CLDR-based implementation permitted * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Eemeli Aro <[email protected]> * [DESIGN] Maintaining the Standard, Optional and Unicode Namespace Function Sets (#634) * Design doc to capture registry maintenance * Update maintaining-registry.md * Update exploration/maintaining-registry.md Co-authored-by: Tim Chevalier <[email protected]> * Update exploration/maintaining-registry.md Co-authored-by: Tim Chevalier <[email protected]> * Add user stories, small updates to RGI * Update exploration/maintaining-registry.md * Adding additional detail * Remove machine readable registry; update prose * Update maintaining-registry.md * Further development work * Update to change format and naming Per the 2024-08-19 call, we decided to switch towards a specification-per-function model, with statuses. This commit includes the initial set of changes to try and implement this. * Address some comments. --------- Co-authored-by: Tim Chevalier <[email protected]> * Create notes-2024-09-09.md * Fix a typo in an example (#880) The upcoming work to implement resolved value might make this patch unnecessary or obsolete, but fixing the typo (missing `{`/`}` around the variable in the pattern) just in case * Remove forward-compatibility promise and all reserved & private syntax (#883) * Remove forwards compatibility from stability guarantee * Drop reserved statements and expressions * Drop private-use annotations * Update tests * Clarify that deprecation is not removal * Match on variables instead of expressions (#877) * Match on variables instead of expressions * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Apply suggestions from code review * Add missing test changes noticed during implementation * Empty commit to re-trigger CLA check --------- Co-authored-by: Addison Phillips <[email protected]> * Create notes-2024-09-10.md * Add bidi support and address UAX31/UTS55 requirements (#884) * Add bidi support and address UAX31/UTS55 requirements Adds the bidi strong marks ALM, RLM, and LRM plus the bidi isolate controls LRI, RLI, FSI, and PDI to the syntax. Formally defines optional vs. non-optional whitespace. Non-optional whitespace must include at least one whitespace character. Optional whitespace may contain only bidi marks (which are invisible) * Update syntax.md including text from previous PR * Repair the guidance on strongly directional marks Include ALM and better specify how to use the marks. * Fix formatting of the "important" * Add bidi characters to description of whitespace. * Permit bidi in a few more places Add optional whitespace at the start of `variant` Add optional whitespace around `quoted-pattern` These changes result in allowing bidi around keys and quoted patterns as intended. * Update syntax.md ABNF * Update formatting.md - Add a note about the difference between formatting and message syntax. - Clarify the sentence about message directionality. * Address comment about name/identifier * Address comments related to bidi in `name` * Fix variable's location * Address comment about the list of LRI/PDI targets * One character typo :-P * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> * Address comments about rule R3a-1 * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> * Address comment about U+061C * Change [o]wsp => `o` or `s` * Match syntax spec to abnf * Remove * * Update syntax.md * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/message.abnf Co-authored-by: Eemeli Aro <[email protected]> * Update spec/message.abnf Co-authored-by: Eemeli Aro <[email protected]> * Update syntax.md * Update spec/message.abnf Co-authored-by: Eemeli Aro <[email protected]> * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Eemeli Aro <[email protected]> * Specify `bad-option` for bad digit size option values (#882) * Specify `bad-option` for bad digit size option values Fixes #739 * adopt 'non-negative integer' * Create notes-2024-09-16.md * Address name and literal equality (#885) * Address name and literal equality This change defines equality as discussed in the 2024-09-09 teleconference in the following ways: - It defines _name_ equality as being under NFC - It defines _literal_ equality as explicitly **not** under NFC - It moves _name_ before _identifier_ in that section of text to avoid a forward definition. Note that this deviates from discussion in 2024-09-09's call in that we didn't discuss literals at length. It also doesn't discuss non-name/non-literal values, which I'll point out are limited to ASCII sequences such as keywords. * Typo fix * Add a note about not requiring implementations to actually normalize * Implement changes dicussed in 2024-09-16 call. - Make _key_ require NFC for uniqueness/comparison - Add a note about NFC - Make _literal_ **_not_** define equality - Make text in _name_ identical to that in _key_ for consistency * Update formatting.md to include keys in NFC * Address comments * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/syntax.md Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Eemeli Aro <[email protected]> * Update list of normative changes during the LDML45 period (#890) * Fix typos in data-model-errors tests (#892) Fix #886 * Update note on exact numeric match for v46 (#891) Addresses #887 Non-normative changes to the notes specifically part of LDML46 * Fix attribute value to be literal (#894) Fixes #893 * Create notes-2024-09-30.md * Add Resolved Values and Function Handler sections to formatting (#728) * Add Resolved Values section to formatting * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: Tim Chevalier <[email protected]> * Linkify "resolved value" * Add some examples & explicitly allow wrapping input values * No throw, only emit Co-authored-by: Tim Chevalier <[email protected]> * Add section on Function Handlers, defining the term * Apply suggestions from code review * Rephrase initial resolved value definition * Update spec/formatting.md Co-authored-by: Eemeli Aro <[email protected]> * Update resolved value definition again Co-authored-by: Addison Phillips <[email protected]> --------- Co-authored-by: Tim Chevalier <[email protected]> Co-authored-by: Addison Phillips <[email protected]> * Define function composition for :number and :integer values (#823) * Define function composition for :number and :integer values * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Add operand option priority example * Add apostrophes' Co-authored-by: Tim Chevalier <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]> Co-authored-by: Tim Chevalier <[email protected]> * Create notes-2024-10-07.md * Apply NFC normalization during :string key comparison (#905) * Apply NFC normalization during :string key comparison * Add link to UAX#15 Co-authored-by: Addison Phillips <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]> * Add tests for changes due to bidi/whitespace (#902) * Add tests for changes due to bidi/whitespace * Correct output * Make erroneous test a syntax error * Define function composition for date/time values (#814) * Define function composition for date/time values * Apply suggestions from code review Co-authored-by: Stanisław Małolepszy <[email protected]> * Drop the "only" * Update spec/registry.md * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Update spec/registry.md Co-authored-by: Eemeli Aro <[email protected]> * Make :date and :time composition implementation-defined --------- Co-authored-by: Stanisław Małolepszy <[email protected]> Co-authored-by: Addison Phillips <[email protected]> * DESIGN: Add alternative designs to the design doc on function composition (#806) * DESIGN: Add a sequel to the design doc on function composition This document sketches out some alternatives for the machinery provided to enable function composition. The goal is to provide an exhaustive list of alternatives. * Remove 'part 2' document and move contents to the end of part 1 * Revise introduction to reflect the changed goal * Edited for conciseness * Further edits for conciseness * Give a name to InputType and use it * Refer to motivating examples * Update function-composition-part-1.md status Per 2024-10-14 telecon * Create notes-2024-10-14.md * Add test for :integer and :number composition (#907) * Fix `:integer` option `useGrouping` values (#912) I noticed that `:integer` does not include the "never" value for the option `useGrouping`. This is a bug. * Drop syntax note on additional bidi changes (#910) Drop syntax note on addition bidi changes * Add tests for changes due to #885 (name/literal equality) (#904) * Add tests for changes due to #885 (name/literal equality) * Update test/tests/functions/string.json Co-authored-by: Eemeli Aro <[email protected]> * Update test/tests/syntax.json Co-authored-by: Eemeli Aro <[email protected]> * Update test/tests/functions/string.json Co-authored-by: Eemeli Aro <[email protected]> * Added tests for reordering and special case mapping * Add another selection test --------- Co-authored-by: Eemeli Aro <[email protected]> * Add u: options namespace (#846) * Move spec/registry.md -> spec/registry/default.md * Add Unicode Registry definition * Refer to BCP47, add note about only requiring normal tags * Call it a namespace * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Fix test file reference Co-authored-by: Tim Chevalier <[email protected]> * Apply suggestions from code review * Update spec/u-namespace.md Co-authored-by: Eemeli Aro <[email protected]> * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Add mention of functions to namespace description --------- Co-authored-by: Addison Phillips <[email protected]> Co-authored-by: Tim Chevalier <[email protected]> * Define function composition for :string values (#798) * Define function composition for :string values * Update spec/registry.md as suggested by @stasm in #814 * Drop the "only" * Update text following code review comments --------- Co-authored-by: Addison Phillips <[email protected]> * Drop data model request for feedback on "name" (#909) * Allow surrogates in content, issue #895 (#906) * Allow surrogates in content, issue #895 * Grammar and typos, linkify terms, make into a note, and fix 2119 keywords Thanks Addison! Co-authored-by: Addison Phillips <[email protected]> * Not using "localizable elements" Co-authored-by: Addison Phillips <[email protected]> * Keep syntax.md in sync with message.abnf * Added note about surrogates to quoted literals * Moved the note about surrogates from Security Considerations to The Message * Update spec/syntax.md * Update spec/syntax.md * Italicize in a couple of places * Implemeted more (all?) feedback from review --------- Co-authored-by: Addison Phillips <[email protected]> --------- Co-authored-by: Eemeli Aro <[email protected]> Co-authored-by: Elango Cheran <[email protected]> Co-authored-by: Tim Chevalier <[email protected]> Co-authored-by: Mark Davis <[email protected]> Co-authored-by: Danny Gleckler <[email protected]> Co-authored-by: Steven R. Loomis <[email protected]> Co-authored-by: Stanisław Małolepszy <[email protected]> Co-authored-by: Eemeli Aro <[email protected]> Co-authored-by: Mihai Nita <[email protected]>
1 parent 9bd4097 commit da9377b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4626
-1492
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
# Contributing to this project
22

3-
## Joining the Working Group
4-
5-
We are looking for participation from software developers, localization engineers and others with experience
6-
in Internationalization (I18N) and Localization (L10N). If you wish to contribute to this work, please review
7-
the information on the Contributor License Agreement below. In addition, you should:
8-
9-
1. Apply to join our [mailing list](https://groups.google.com/a/chromium.org/forum/#!forum/message-format-wg)
10-
2. Watch this repository (use the "Watch" button in the upper right corner)
3+
To join this Working Group, please read the information in the [README.md](./README.md) as well as the Contributor License Agreement information just below:
114

125
<!-- boilerplate follows - do not edit -->
136

README.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ Functions can optionally take _options_:
7676
Messages can use a _selector_ to choose between different _variants_,
7777
which correspond to the grammatical (or other) requirements of the language:
7878

79-
.match {$count :integer}
79+
.input {$count :integer}
80+
.match $count
8081
0 {{You have no notifications.}}
8182
one {{You have {$count} notification.}}
8283
* {{You have {$count} notifications.}}
@@ -105,6 +106,23 @@ The `main` branch of this repository contains changes implemented since the tech
105106
Implementers should be aware of the following normative changes during the tech preview period.
106107
See the [commit history](https://github.com/unicode-org/message-format-wg/commits)
107108
after 2024-04-13 for a list of all commits (including non-normative changes).
109+
- [#885](https://github.com/unicode-org/message-format-wg/issues/885) Address equality of `name` and `literal` values, including requiring keys to use NFC
110+
- [#884](https://github.com/unicode-org/message-format-wg/issues/884) Add support for bidirectional isolates and strong marks in syntax and address UAX31/UTS55 requirements
111+
- [#883](https://github.com/unicode-org/message-format-wg/issues/883) Remove forward-compatibility promise and all reserved/private syntax.
112+
- [#882](https://github.com/unicode-org/message-format-wg/issues/882) Specify `bad-option` error for bad digit size options in `:number` and `:integer` functions
113+
- [#878](https://github.com/unicode-org/message-format-wg/issues/878) Clarify "rule" selection in `:number` and `:integer` functions
114+
- [#877](https://github.com/unicode-org/message-format-wg/issues/877) Match on variables instead of expressions.
115+
- [#854](https://github.com/unicode-org/message-format-wg/issues/854) Allow whitespace at complex message start
116+
- [#853](https://github.com/unicode-org/message-format-wg/issues/853) Add a "duplicate-variant" error
117+
- [#845](https://github.com/unicode-org/message-format-wg/issues/845) Define "attributes" feature
118+
- [#834](https://github.com/unicode-org/message-format-wg/issues/834) Modify the stability policy (not currently in effect due to Tech Preview)
119+
- [#816](https://github.com/unicode-org/message-format-wg/issues/816) Refine error handling
120+
- [#815](https://github.com/unicode-org/message-format-wg/issues/815) Removed machine-readable function registry as a deliverable
121+
- [#813](https://github.com/unicode-org/message-format-wg/issues/813) Change default of `:date` and `:datetime` date formatting from `short` to `medium`
122+
- [#812](https://github.com/unicode-org/message-format-wg/issues/812) Allow trailing whitespace for complex messages
123+
- [#793](https://github.com/unicode-org/message-format-wg/issues/793) Recommend the use of escapes only when necessary
124+
- [#775](https://github.com/unicode-org/message-format-wg/issues/775) Add formal definitions for variable, external variable, and local variable
125+
- [#774](https://github.com/unicode-org/message-format-wg/issues/774) Refactor errors, adding Message Function Errors
108126
- [#771](https://github.com/unicode-org/message-format-wg/issues/771) Remove inappropriate normative statement from errors.md
109127
- [#767](https://github.com/unicode-org/message-format-wg/issues/767) Add a test schema and
110128
[#778](https://github.com/unicode-org/message-format-wg/issues/778) validate tests against it
@@ -113,7 +131,9 @@ after 2024-04-13 for a list of all commits (including non-normative changes).
113131
- [#769](https://github.com/unicode-org/message-format-wg/issues/769) Add `:test:function`,
114132
`:test:select` and `:test:format` functions for implementation testing
115133
- [#743](https://github.com/unicode-org/message-format-wg/issues/743) Collapse all escape sequence rules into one (affects the ABNF)
116-
- _more to be added as they are merged_
134+
135+
In addition to the above, the test suite is significantly modified and updated.
136+
117137

118138
## Implementations
119139

@@ -137,18 +157,27 @@ We invite feedback about the current syntax draft, as well as the real-life use-
137157
- General questions and thoughts → [post a discussion thread](https://github.com/unicode-org/message-format-wg/discussions).
138158
- Actionable feedback (bugs, feature requests) → [file a new issue](https://github.com/unicode-org/message-format-wg/issues).
139159

140-
## Participation
160+
## Participation / Joining the Working Group
161+
162+
We are looking for participation from software developers, localization engineers and others with experience
163+
in Internationalization (I18N) and Localization (L10N).
164+
If you wish to contribute to this work, please review the information about the Contributor License Agreement below.
141165

142-
To join in:
166+
To follow this work:
167+
1. Apply to join our [mailing list](https://groups.google.com/a/chromium.org/forum/#!forum/message-format-wg)
168+
2. Watch this repository (use the "Watch" button in the upper right corner)
143169

144-
1. Review [CONTRIBUTING.md](./CONTRIBUTING.md)
145-
2. Apply to join our [mailing list](https://groups.google.com/a/chromium.org/forum/#!forum/message-format-wg)
146-
3. Watch this repository (use the "Watch" button in the upper right corner)
170+
To contribute to this work, in addition to the above:
171+
1. Each individual MUST have a copy of the CLA on file. See below.
172+
2. Individuals who are employees of Unicode Member organizations SHOULD contact their member representative.
173+
Individuals who are not employees of Unicode Member organizations MUST contact the chair to request Invited Expert status.
174+
Employees of Unicode Member organizations MAY also apply for Invited Expert status,
175+
subject to approval from their member representative.
147176

148177
### Copyright & Licenses
149178

150179
Copyright © 2019-2024 Unicode, Inc. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the United States and other countries.
151180

152-
The project is released under [LICENSE](./LICENSE).
153-
154181
A CLA is required to contribute to this project - please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file (or start a Pull Request) for more information.
182+
183+
The contents of this repository are governed by the Unicode [Terms of Use](https://www.unicode.org/copyright.html) and are released under [LICENSE](./LICENSE).

exploration/bidi-usability.md

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,39 @@ Not allowing these to mix could produce annoying parse errors.
273273
274274
_Describe the proposed solution. Consider syntax, formatting, errors, registry, tooling, interchange._
275275
276+
I propose adopting a hybrid approach in which we permit "super-loose isolation".
277+
This allows user to include isolates and strongly directional characters into the whitespace
278+
portions of the syntax in order to make messages appear correctly.
279+
280+
The second part of the hybrid approach would be to recommend ("SHOULD") the "strict isolation"
281+
design for serializers.
282+
(Note that "strict" and "super-loose" use non-identical productions with the name `bidi`.
283+
These serve different purposes and are consistent with strict being narrower with super-loose.)
284+
This syntax is a subset of the super-loose syntax and can be applied selectively to messages that
285+
have RTL sequences or which have problematic display.
286+
287+
288+
## Alternatives Considered
289+
290+
_What other solutions are available?_
291+
_How do they compare against the requirements?_
292+
_What other properties they have?_
293+
294+
### Nothing
295+
We could do nothing.
296+
297+
A likely outcome of doing nothing is that RTL users would insert bidi controls into
298+
_messages_ in an attempt to make the _pattern_ and/or _placeholders_ display correctly.
299+
These controls would become part of the output of the _message_,
300+
showing up inappropriately at runtime.
301+
Because these characters are invisible, users might be very frustrated trying to manage
302+
the results or debug what is wrong with their messages.
303+
304+
By contrast, if users insert too many or the wrong controls using the recommended design,
305+
the _message_ would still be functional and would emit no undesired characters.
306+
307+
### LTR Messages with isolating sequences
308+
276309
The syntax of a _message_ assumes a left-to-right base direction
277310
both for the complete text of the _message_ as well as for each line (paragraph)
278311
contained therein.
@@ -383,7 +416,7 @@ ns-separator = [bidi] ":"
383416
bidi = [ %x200E-200F / %x061C ]
384417
```
385418

386-
### Open Issues with Proposed Design
419+
**Open Issues**
387420

388421
The ABNF changes found above put isolates and strongly directional marks into specific locations,
389422
such as directly next to `{`/`}`/`{{`/`}}` markers
@@ -393,32 +426,24 @@ A more permissive design would add the isolates and strongly directional marks t
393426
whitespace in the syntax and depend on users/editors to appropriately pair or position the marks
394427
to get optimal display.
395428

396-
## Alternatives Considered
397-
398-
_What other solutions are available?_
399-
_How do they compare against the requirements?_
400-
_What other properties they have?_
401-
402-
### Nothing
403-
We could do nothing.
404-
405-
A likely outcome of doing nothing is that RTL users would insert bidi controls into
406-
_messages_ in an attempt to make the _pattern_ and/or _placeholders_ display correctly.
407-
These controls would become part of the output of the _message_,
408-
showing up inappropriately at runtime.
409-
Because these characters are invisible, users might be very frustrated trying to manage
410-
the results or debug what is wrong with their messages.
411-
412-
By contrast, if users insert too many or the wrong controls using the recommended design,
413-
the _message_ would still be functional and would emit no undesired characters.
414429

415430
### Super-loose isolation
416431

417432
Add isolates and strongly directional marks to required and optional whitespace in the syntax.
418433
This would permit users to get the effects described by the above design,
419434
as long as they use isolates/marks in a "responsible" way.
420435

421-
(Omitting other changes found in #673)
436+
The exception to this is the namespace separator, used in `identifier`.
437+
This requires the ability to insert isolates or strongly directional marks
438+
between the namespace and name portions, where whitespace is not permitted.
439+
This is the only location in the syntax where such characters might be needed
440+
but whitespace is not at least optional.
441+
This could be defined as:
442+
```abnf
443+
ns-separator = [bidi] ":" [bidi]
444+
```
445+
446+
Here are the other ABNF changes:
422447

423448
```abnf
424449
; strongly directional marks and bidi isolates
@@ -447,7 +472,7 @@ s = ( SP / HTAB / CR / LF / %x3000 )
447472
### Strict isolation all the time
448473

449474
Apply bidi isolates in a strict way.
450-
The main differences to the proposed solution is:
475+
In this design:
451476
1. The open/close isolate characters are syntactically required to be paired.
452477
This introduces parse errors for unpaired invisible characters,
453478
which could lead to bad user experiences.
@@ -467,7 +492,7 @@ markup = "{" [s] "#" identifier [bidi] *(s option) *(s attribute) [s] ["
467492
/ "{" [s] "/" identifier [bidi] *(s option) *(s attribute) [s] "}" ; close
468493
/ "{" LRI [s] "/" identifier [bidi] *(s option) *(s attribute) [s] close-isolate "}" ; close
469494
identifier = [(namespace ns-separator)] name
470-
ns-separator = [bidi] ":"
495+
ns-separator = [bidi] ":" [bidi]
471496
bidi = [ %x200E-200F / %x061C ]
472497
```
473498

@@ -610,6 +635,8 @@ adherence to the stricter grammar.
610635
syntax errors
611636
- Provides a foundation for tools to claim strict conformance and message normalization
612637
as well as guidance to implementers to make them want to adopt it
638+
- Messages are valid while being edited (such as when the open or close isolate has been
639+
inserted but the corresponding opposite isolate hasn't been entered yet)
613640

614641
**Cons**
615642
- Requires additional effort to maintain the grammar

exploration/expression-attributes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Expression Attributes
22

3-
Status: **Proposed**
3+
Status: **Accepted**
44

55
<details>
66
<summary>Metadata</summary>
@@ -15,6 +15,8 @@ Status: **Proposed**
1515
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/772">#772</a></dd>
1616
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/780">#780</a></dd>
1717
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/792">#792</a></dd>
18+
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/845">#845</a></dd>
19+
<dd><a href="https://github.com/unicode-org/message-format-wg/pull/846">#846</a></dd>
1820
</dl>
1921
</details>
2022

0 commit comments

Comments
 (0)