unicode-org / message-format-wg

Developing a standard for localizable message strings

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove functions not in the default registry from examples

aphillips opened this issue · comments

Is your feature request related to a problem? Please describe.
Many of our examples use functions that MF2 will not actually provide in 2.0. In some cases the speculative nature of these functions is called out, such as the use of :person in the description of options in syntax.md. In other cases (and particularly on the "front door" of this github repo) we act as if these were functions one can expect to find in 2.0.

Describe the solution you'd like
Examine each example for speculative use of a function and, where appropriate, replace it with a real function. In cases where pseudo-functions remain, ensure that the text calls it out. Definitely do not use speculative functions in the intro and on the front door.

Describe why your solution should shape the standard
We should not be setting false expectations.

Additional context or examples

This is the second example. It's cool looking, but not functional:

.local $hostName = {$host :person firstName=long}
.local $guestName = {$guest :person firstName=long}
.local $guestsOther = {$guestCount :number offset=1}

.match {$host :gender} {$guestOther :number}

female 0 {{{$hostName} does not give a party.}}
female 1 {{{$hostName} invites {$guestName} to her party.}}
female 2 {{{$hostName} invites {$guestName} and one other person to her party.}}
female * {{{$hostName} invites {$guestName} and {$guestsOther} other people to her party.}}

male 0 {{{$hostName} does not give a party.}}
male 1 {{{$hostName} invites {$guestName} to his party.}}
male 2 {{{$hostName} invites {$guestName} and one other person to his party.}}
male * {{{$hostName} invites {$guestName} and {$guestsOther} other people to his party.}}

* 0 {{{$hostName} does not give a party.}}
* 1 {{{$hostName} invites {$guestName} to their party.}}
* 2 {{{$hostName} invites {$guestName} and one other person to their party.}}
* * {{{$hostName} invites {$guestName} and {$guestsOther} other people to their party.}}

+1

I would still allow for showing some of them if they are explicitly trying to show how things can be extended.
If people want something like person format, or message references, we show (and tag is somehow?) how it can be done.
It shows how they can do it with custom functions, and that the spec is flexible enough to allow for it.

But if the example is trying to show how attributes work, or other aspects that can be illustrated with the existing registry functions, we should use that.

I fixed the readme in #606. The spec still needs to be evaluated, tho....