-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add Resolved Values and Function Handler sections to formatting #728
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking at stab at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that this is non-normative text, but my conclusion after reading it is that there should be a design doc.
Some of it should be normative: specifically, the question of what functions take and return, which has to be answered (IMO) for the registry spec to make sense. How to describe that takes some thought, as I said in one of the comments. The task is to design a foreign function interface that's abstract enough to be adapted to a range of implementation languages, while concrete enough to make the spec something that can be implemented in a way that affords confidence that an implementation conforms to the spec. That's not easy.
Given the amount of discussion the question of "what is the domain and range of a function?" has generated, and how closely coupled that question is with "resolved values", I think it's worth a design doc. This could be #645 or someone could start afresh.
I like the direction this is going, but I think we really never want to use
the naked 'value' term. There are different kinds of resolved values, and
it is important to keep them separate to prevent confusion. The value of
{|3| :number minSignificantDigits=4} is **not** 3, nor is it 3.000.
But high bit, this is a difficult issue, and if we rush it it is not
unlikely that the spec for tech preview will be worsened. At this point, I
think we would almost be better off having a NOTE explaining that we will
be revamping this section to clarify the language in the following ways: ...
…On Mon, Mar 18, 2024 at 2:11 PM Tim Chevalier ***@***.***> wrote:
***@***.**** commented on this pull request.
I know that this is non-normative text, but my conclusion after reading it
is that there should be a design doc.
Some of it *should be* normative: specifically, the question of what
functions take and return, which has to be answered (IMO) for the registry
spec to make sense. How to describe that takes some thought, as I said in
one of the comments. The task is to design a foreign function interface
that's abstract enough to be adapted to a range of implementation
languages, while concrete enough to make the spec something that can be
implemented in a way that affords confidence that an implementation
conforms to the spec. That's not easy.
Given the amount of discussion the question of "what is the domain and
range of a function?" has generated, and how closely coupled that question
is with "resolved values", I think it's worth a design doc. This could be
#645 <#645> or
someone could start afresh.
------------------------------
In spec/formatting.md
<#728 (comment)>
:
> >
-> Alternatively, it could be an instance of an ICU4J `FormattedNumber`,
-> or some other locally appropriate value.
+> With this approach:
+> - An _expression_ could be used as a _placeholder_ if
+> calling the `formatToString()` or `formatToX()` method of its _resolved value_
+> did not throw an error.
"Throw an error" is not terminology that's used elsewhere in the spec (as
far as I can recall), and sounds implementation-language-specific. My
intention is not to nitpick about the terminology, but to ask how to
structure this exposition in a way that doesn't favor one specific
implementation language. For example, in some cases, it might be more
appropriate for the MessageValue interface to include isFormattable() and
isSelectable() (and so on) as predicates.
------------------------------
In spec/formatting.md
<#728 (comment)>
:
> +> did not throw an error.
+> - An _expression_ could be used as a _selector_ _expression_ if
+> calling the `selectKeys(keys)` method of its _resolved value_
+> did not throw an error.
+> - Using a _variable reference_, the resolved value of an _expression_
+> could be used as an _operand_ or _option_ value if
+> calling the `getValue()` method of its _resolved value_ did not throw an error.
+> In this use case, the `resolvedOptions()` method could also
+> provide a set of option values that could be taken into account by the called function.
+>
+> Extensions of the base `MessageValue` interface could be provided for different data types,
+> such as numbers or strings,
+> for which the `unknown` return types of `getValue()` and `resolvedOptions()`
+> could be narrowed appropriately.
+> An implementation could also allow `MessageValue` values to be passed in as input variables,
+> or automatically wrap each variable as a `MessageValue` to provide a uniform interface
I think this is missing an explanation of what the *value* (or resolved
value?) of an input variable is. It's implementation-specific, *and*
doesn't necessarily have to be the same as the "resolved value" that can
appear in various parts of a message as explained above.
------------------------------
In spec/formatting.md
<#728 (comment)>
:
>
-_Expressions_ are used in _declarations_, _selectors_, and _patterns_.
-_Markup_ is only used in _patterns_.
+This specification allows for the same value to be used for:
+- formatting in a _placeholder_,
+- selection in a _selector_ _expression_,
+- as the _operand_ of another _expression_, or
+- as the _option_ value of another _expression_,
I think this language is mixing phases. A "resolved value" is a runtime
concept. Syntactically, what can be the operand of another expression is
either a literal or a variable reference. At runtime (while formatting,
when the values of input variables are known) some process maps a literal
or variable reference onto a resolved value.
I have a branch where I tried writing up an operational semantics
<https://github.com/catamorphism/message-format-wg/blob/opsem/exploration/operational-semantics.md>,
which would answer the question of "what are the relations that map terms
onto values?" (A term being an instance of the data model.) This would be a
way of providing a declarative spec, which forces one to answer the
question of "what are the values that terms map onto?" I wrote this to try
to validate my intuitions for #645
<#645> and wasn't
intending to submit this as a PR or even share it, so it might not be
readable by anyone except me.
At any rate, a different way to organize this text might be to say
something like:
"Resolved values appear in
- Literal resolution
- Variable resolution
- Function resolution
- Option resolution"
which would at least be describing a runtime process. Or even something
like:
"Resolved values appear in
- Literal resolution (resolution maps a literal onto a value)
- Variable resolution (resolution maps a variable, along with context,
onto a value)
- Function resolution (functions map values onto values)
- Option resolution (resolution maps the right-hand side of an option
onto a value)"
(Using "right-hand side" instead of "value" in the last bullet point to
avoid using "value" with two different meanings in the same sentence.)
—
Reply to this email directly, view it on GitHub
<#728 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMBC74VQZGIAC6GD35DYY5J7NAVCNFSM6AAAAABEVFFBS6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNBUGEZDEMRXGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
In to 2024-03-25 call we agreed to work on this in the Tech Preview period. |
In the 2024-05-06 call, we asked @mihnita to review this before discussing further. |
> | ||
> ```ts | ||
> interface MessageValue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the direction seems OK.
But I am uneasy with specifying this interface.
Because:
- in "intertwines" even more the formatters and selectors (which I always maintained are different concepts, with different interfaces)
- it is just specified, without explaining how to use it, how it works.
So it feels over-specified.
I think this update strongly conflicts with #645 ("[DESIGN] dataflow for composability") That one proposes to throw away "resolved values" as too ambiguous ("In the current spec, a "resolved value" can be a nameable value, formattable value, or preformatted value, depending on context.") This PR seems to make resolved values even more ambiguous, while in the same time restricting the ability of implementations to implement things in a different (cleaner) way. |
I experimented with something like the suggested So I suggest that instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried changing ICU4C to use a value representation that's similar to this, and it works. The change in the PR shows what machinery needs to be there in order to implement examples like the one in #515. In an impl that uses the proposed MessageValue
interface, it should be possible to write custom functions that use options that have options, and so on. Maybe we can get to a more normative version of this in the future, but I think this is a good step.
Co-authored-by: Tim Chevalier <tjc@igalia.com>
spec/formatting.md
Outdated
_Expressions_ are used in _declarations_, _selectors_, and _patterns_. | ||
_Markup_ is only used in _patterns_. | ||
This specification allows for the same value to be used for: | ||
- formatting in a _placeholder_, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not right, I think. The result of formatting is a string or some kind of a "formatted part" type. When talking about resolved values, I think we want to identify the intermediate type that's the result of evaluating the placeholder, before it's formatted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the key thing here is the difference between the output of an expression and the evaluation of an expression. The "resolved value" is only important (or even visible) when it will be consumed by another expression later.
I think @stasm is correct that the output of formatting (or selection) is not the "resolved value". In the case of formatting, it is the string representation (or "formatted foo" parts representation), which is different from the "resolved value". Similarly, the output of selection is a filtered and stack ranked list of patterns (which is definitely not the "resolved value").
The "resolved value", to me, means "what is the value of the operand after the expression has been evaluated".
If I have a message You have {$x :integer} wildebeest
, the value of $x
is constrained to be an implementation-defined numeric type (it might not be an integer type, even though the formatting function formats it like one), but the output of the expression is a string.
I think that each function needs to explicitly say whether it "covers up" (changes) the operand's resolved value and what it changes it to be. Using my example:
Function:
:integer
- Operand: an implementation-defined type or a literal whose contents match the number-literal production in the ABNF
- Format output: a string
- Selection output: number selector (see design number-selection)
- Resolved value: an implementation-defined numeric type
Notice that this eliminates the string representation between the operand (input) and resolved value. It also, probably, allows the implementation defined type to be changed by the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Operand: an implementation-defined type or a literal whose contents match the number-literal production in the ABNF
There is a third kind of entity that can be an operand.
An operand is a defined type, or literal, or the "result of a previous functional application" (call that a function-result for now). A function-result is (logically) not just an implementation-defined datatype. If so, it wouldn't have access to the information that any composing function would need.
Instead, I think the best conceptual model of a function-result is that of an object with methods to get information. Such as (of course, the names can be chosen to protect the innocent):
- getSourceFunction() —the function used to create it
- getSourceOperand() — the operand used to create it
- getsourceOptions() — the options used to create it
- getFormattedString()
- getFormatToPartsStructure()
- getSelector()
- getResolvedValue()
Internally, it can lazy-evaluate. For example, it only needs to generate the formatted string if the method getFormattedString() is called. If the function-result is only used for selection, that never needs to be generated. If the function-result is passed to an :uppercase function, then the getResolvedValue() would never need to be called, etc.
In particular a function can look at its operand, and if it is a function-result, see what options it was passed and use them if the type of the function is known.
The description of a function needs to specify what its inputs are, and how its function-result behaves. Part of that involves specifying which functions it can compose with, and how it treats that function's operand and options.
> ```ts | ||
> interface MessageValue { | ||
> formatToString(): string | ||
> formatToX(): X // where X is an implementation-defined type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have missed some discussions about this, but why wouldn't we want to be more specific here about the parts?
> formatToX(): X // where X is an implementation-defined type | |
> formatToParts(): IterableIterator<MessagePart>; // MessagePart is implementation-defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is a non-normative example and we've not reached consensus on formatted parts, I'd rather not introduce them here implicitly and somewhat out of context, when the key aspect of the formatToX()
inclusion is to remind the reader that a string is not the only possible formatting target.
(My review comes in late. I'm OK with its not being considered blocking this PR. I can file a new PR if you prefer to discuss my suggestions elsewhere.) |
@aphillips As discussed yesterday, I've updated this PR to incorporate the consensus we reached a few weeks ago:
After some thought, I found the best place for this to be a new section defining function handlers as the real-world functions or methods that are called to get a resolved value. This now incorporates quite a bit of the language that was in step 4 of the Function Resolution process. I opted for "handler" as we tend to use "implementation" to mean the whole of an MF2 formatter. The exact MUSTard that's here is a little bit different from the above, as the requirements that a function "MUST define its resolved value" and "MUST define its resolved options" are not easily enforceable unless we were to define what "define" here means, and that's really rather tricky. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Doing this on a cell phone, so no suggestions... sorry.
@@ -400,6 +417,23 @@ _Option_ _identifiers_ and values are not included in the _fallback value_. | |||
|
|||
_Pattern selection_ is not supported for _fallback values_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be optional? *
might match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a selector does not support pattern selection, then the *
variant is selected. A selector is never asked about *
, that's handled by the selection algorithm directly.
The fact that you need to consider the combined effects of Resolve Preferences 2.ii.b, Filter Variants 2.i.b, and Sort Variants 5.iii.c to see that is what I tried to mean by arguing that "best choice" is too complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went to the context and read the section carefully. I guess I have a few questions.
This text suggests that the fallback state is transitive--that implementations must track if a fallback has occurred. That probably needs to be stated more clearly, if so. Otherwise, the fallback value looks just like a string i.e. a literal, which is what lead to my comment.
Let's use my bad example:
.local $a = {0xbeef :num} // this is Bad Operand with a fallback of `|0xbeef|`
.local $b = {$a :uppercase} // this might work on `0xbeef`? It's probably Bad Operand if the first line isn't
.match $b // let's say :uppercase is a type of string selector too...
48879 {{Definitely not this}}
0xBEEF {{Matches?}}
* {{Could match if above doesn't}}
My point is, how does .match $b
know that its resolved value is a fallback value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. Some of the current text is using "fails to resolve" in a way that's not clear. I'll apply some updates to improve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a set of further changes fixing this that's now in ac7cdc5, a commit not included in this PR, which improve the text around fallback values. As this PR now has some approval for its current state, I'll hold off on including those changes here, and propose them separately after this (hopefully!) lands.
@@ -269,7 +269,7 @@ a reference to a function which cannot be resolved. | |||
### Bad Selector | |||
|
|||
A **_<dfn>Bad Selector</dfn>_** error occurs when a message includes a _selector_ | |||
with a resolved value which does not support selection. | |||
with a _resolved value_ which does not support selection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. Can you give an example of a selector that supports selection where its resolved value doesn't?
That is, if I have
.input {$num :number}
.match $num
...
How could :number ever have a resolved value that didn't support selection? I think the notion of 'resolved value' doesn't help.
with a _resolved value_ which does not support selection. | |
that does not support selection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could :number ever have a resolved value that didn't support selection?
Going with the example you posted above, if that message is formatted without a num
argument, then the first step of Function Resolution applies:
If the expression includes an operand, resolve its value. If this fails, use a fallback value for the expression.
And then this part of Fallback Resolution applies:
Pattern selection is not supported for fallback values.
And so we end up emitting two errors when formatting:
- Unresolved Variable
- Bad Selector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @macchiati's finger is on the right thing. It's not a technical problem. This is just hard to understand. Perhaps:
with a _resolved value_ which does not support selection. | |
A **_<dfn>Bad Selector</dfn>_** error is an error that occurs when a _message_ | |
includes a _selector_ whose _resolved value_ | |
contains a _function handler_ which does not support selection, | |
is missing a _function handler_, | |
or consists of a _fallback value_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we spin this suggestion off into a separate PR? As is, the only change that is being applied here is linkifying resolved value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me as a solution.
or which depends on validation associated with a specific function. | ||
|
||
Implementations SHOULD provide a way for _functions_ to emit | ||
Implementations SHOULD provide a way for _function handlers_ to emit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a definition of what a "function handler" is. Which file is that in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's added by this PR to spec/formatting.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a definition; just references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a link to the section in this PR's branch: https://github.com/unicode-org/message-format-wg/blob/define-resolved-values/spec/formatting.md#function-handler
Replying to @macchiati in #728 (comment):
A resolved value is also useful when considering the processing of a message like this:
Because we're using |
I've rephrased the resolved value definition a bit, and clarified that it applies to all message parts. |
(chair hat 🎩 on) I just re-requested reviews from everyone who'd left reviews on the old PR so that the status is clear. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note my comment about the resolved value definition
Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
Co-authored-by: Addison Phillips <addison@unicode.org>
I really find this extremely confusing. It appears to me that the core concept is the following:
Is that what you mean, and I'm just confused by the terminology that you are using? |
Yes, that's pretty much it. With the very slight caveat that we do not require that the resolved value entity itself performs selection and formatting, as it should be possible for it to be a pure-data thing with no methods but enough information such that a separate, external processor can do the appropriate selection and formatting. |
To use a concrete example from ICU4J, think of the resolved value of a |
BTW, since at least part of the motivation for 'resolved value' is in Pattern Selection, I took a look at that section. I think the spec could be much cleaner (with the same results) with a revision: I proposed an outline of that in #898 |
* 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 <addison@unicode.org> * Mention attribute validity condition in the **_valid_** definition --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <tjc@igalia.com> * Update spec/README.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * remove well-formed * Update spec/README.md --------- Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Refine error handling text (#816) * Refine error handling text * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Update fallback text * Turn bullet point list into paragraphs * Be more mighty Co-authored-by: Addison Phillips <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * Update selection-declaration.md * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update selection-declaration.md --------- Co-authored-by: Mark Davis <mark@unicode.org> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * 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 <addison@unicode.org> * 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 <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * [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 <tjc@igalia.com> * Update exploration/maintaining-registry.md Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <tjc@igalia.com> * 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 <addison@unicode.org> * Apply suggestions from code review * Add missing test changes noticed during implementation * Empty commit to re-trigger CLA check --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <eemeli@mozilla.com> * Address comments about rule R3a-1 * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <eemeli@mozilla.com> * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update syntax.md * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <tjc@igalia.com> * Linkify "resolved value" * Add some examples & explicitly allow wrapping input values * No throw, only emit Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <eemeli@mozilla.com> * Update resolved value definition again Co-authored-by: Addison Phillips <addison@unicode.org> --------- Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * Add operand option priority example * Add apostrophes' Co-authored-by: Tim Chevalier <tjc@igalia.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <sta@malolepszy.org> * Drop the "only" * Update spec/registry.md * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Make :date and :time composition implementation-defined --------- Co-authored-by: Stanisław Małolepszy <sta@malolepszy.org> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <eemeli@gmail.com> * Update test/tests/syntax.json Co-authored-by: Eemeli Aro <eemeli@gmail.com> * Update test/tests/functions/string.json Co-authored-by: Eemeli Aro <eemeli@gmail.com> * Added tests for reordering and special case mapping * Add another selection test --------- Co-authored-by: Eemeli Aro <eemeli@gmail.com> * 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 <addison@unicode.org> * Fix test file reference Co-authored-by: Tim Chevalier <tjc@igalia.com> * Apply suggestions from code review * Update spec/u-namespace.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Add mention of functions to namespace description --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <addison@unicode.org> * 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 <addisonI18N@gmail.com> * Not using "localizable elements" Co-authored-by: Addison Phillips <addisonI18N@gmail.com> * 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 <addisonI18N@gmail.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> Co-authored-by: Elango Cheran <elango@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Mark Davis <mark@unicode.org> Co-authored-by: Danny Gleckler <daniel.gleckler@d2l.com> Co-authored-by: Steven R. Loomis <srl295@gmail.com> Co-authored-by: Stanisław Małolepszy <sta@malolepszy.org> Co-authored-by: Eemeli Aro <eemeli@gmail.com> Co-authored-by: Mihai Nita <nmihai_2000@yahoo.com>
* [DESIGN] Number selection design refinements This is to build up and capture technical considerations for how to address the issues raised by @eemeli's PR #842. * Update examples to match changes to syntax Also responds to the long discussion with @eemeli about significant digits by removing from the example. * Address 2024-09-16 call comments This changes the status to "Re-Opened" and adds a link to the PR. Expect to merge this imminently, although discussion on number selection remains. * Update exploration/number-selection.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <addison@unicode.org> * Mention attribute validity condition in the **_valid_** definition --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <tjc@igalia.com> * Update spec/README.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * remove well-formed * Update spec/README.md --------- Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Refine error handling text (#816) * Refine error handling text * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Update fallback text * Turn bullet point list into paragraphs * Be more mighty Co-authored-by: Addison Phillips <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * Update selection-declaration.md * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update exploration/selection-declaration.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update selection-declaration.md --------- Co-authored-by: Mark Davis <mark@unicode.org> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * 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 <addison@unicode.org> * 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 <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * [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 <tjc@igalia.com> * Update exploration/maintaining-registry.md Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <tjc@igalia.com> * 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 <addison@unicode.org> * Apply suggestions from code review * Add missing test changes noticed during implementation * Empty commit to re-trigger CLA check --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <eemeli@mozilla.com> * Address comments about rule R3a-1 * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <eemeli@mozilla.com> * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update syntax.md * Update spec/message.abnf Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <eemeli@mozilla.com> * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * 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 <tjc@igalia.com> * Linkify "resolved value" * Add some examples & explicitly allow wrapping input values * No throw, only emit Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <eemeli@mozilla.com> * Update resolved value definition again Co-authored-by: Addison Phillips <addison@unicode.org> --------- Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <addison@unicode.org> * Add operand option priority example * Add apostrophes' Co-authored-by: Tim Chevalier <tjc@igalia.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <addison@unicode.org> --------- Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <sta@malolepszy.org> * Drop the "only" * Update spec/registry.md * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Update spec/registry.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Make :date and :time composition implementation-defined --------- Co-authored-by: Stanisław Małolepszy <sta@malolepszy.org> Co-authored-by: Addison Phillips <addison@unicode.org> * 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 <eemeli@gmail.com> * Update test/tests/syntax.json Co-authored-by: Eemeli Aro <eemeli@gmail.com> * Update test/tests/functions/string.json Co-authored-by: Eemeli Aro <eemeli@gmail.com> * Added tests for reordering and special case mapping * Add another selection test --------- Co-authored-by: Eemeli Aro <eemeli@gmail.com> * 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 <addison@unicode.org> * Fix test file reference Co-authored-by: Tim Chevalier <tjc@igalia.com> * Apply suggestions from code review * Update spec/u-namespace.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Apply suggestions from code review Co-authored-by: Addison Phillips <addison@unicode.org> * Add mention of functions to namespace description --------- Co-authored-by: Addison Phillips <addison@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> * 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 <addison@unicode.org> * 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 <addisonI18N@gmail.com> * Not using "localizable elements" Co-authored-by: Addison Phillips <addisonI18N@gmail.com> * 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 <addisonI18N@gmail.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> Co-authored-by: Elango Cheran <elango@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Mark Davis <mark@unicode.org> Co-authored-by: Danny Gleckler <daniel.gleckler@d2l.com> Co-authored-by: Steven R. Loomis <srl295@gmail.com> Co-authored-by: Stanisław Małolepszy <sta@malolepszy.org> Co-authored-by: Eemeli Aro <eemeli@gmail.com> Co-authored-by: Mihai Nita <nmihai_2000@yahoo.com> * Add serialization proposal * Revert "Add serialization proposal" This reverts commit 17af553. * Revert "Update from main (#914)" This reverts commit da9377b. * Add serialization proposal --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com> Co-authored-by: Elango Cheran <elango@unicode.org> Co-authored-by: Tim Chevalier <tjc@igalia.com> Co-authored-by: Mark Davis <mark@unicode.org> Co-authored-by: Danny Gleckler <daniel.gleckler@d2l.com> Co-authored-by: Steven R. Loomis <srl295@gmail.com> Co-authored-by: Stanisław Małolepszy <sta@malolepszy.org> Co-authored-by: Eemeli Aro <eemeli@gmail.com> Co-authored-by: Mihai Nita <nmihai_2000@yahoo.com>
This PR is effectively an extended comment on the ongoing discussion in #515 / #645 / #646. It also closes #678.
The intent with the change proposed here is to keep our formatting spec close to its current shape, but more clearly define what "resolved values" are, and via a non-normative example guide the reader towards a mental model of what a "formattable" or "selectable" value might look like.
I think this could be included already in LDML45 as its doesn't actually change anything, but that's of course presuming a lot of consensus.