Skip to content

Plans for v48 #1051

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

Open
macchiati opened this issue Mar 5, 2025 · 8 comments · May be fixed by #1065
Open

Plans for v48 #1051

macchiati opened this issue Mar 5, 2025 · 8 comments · May be fixed by #1065
Assignees
Labels
Agenda+ Requested for upcoming teleconference

Comments

@macchiati
Copy link
Member

macchiati commented Mar 5, 2025

CLDR needs a summary of planned v48 features.

Here's a draft:

  1. Full support of well-behaved* MF1 message functionality, as Stable
    • Stabilize remaining MF1.0 function support (:datetime, :date, :time, percent-format)
    • Should support migration of all "well-behaved" MF1 messages
  2. Functions that go well beyond MF1
    • Goal is enough new functionality to be worth the effort to migrate infrastructure
  3. Develop function description format (machine-readable function data), as ≥Draft
  4. Create documentation, especially the user guide & messageformat.dev
    • Should include MF1 migration guide.
    • Both to and from MF1, to aid migration before localization tooling catches up

* "well-behaved" excludes choice format and partial selects, like

  • "You have {numBooks, plural, one {# book} other {# books}}" instead of
  • "{numBooks, plural, one {You have # book} other {You have # books}}"
@eemeli
Copy link
Collaborator

eemeli commented Mar 6, 2025

Both to and from MF1, to aid migration before localization tooling catches up

I have not yet found a use case for MF2 → MF1, but this has worked for MF1 → MF2 for quite a while already:

import { mf1ToMessageData } from '@messageformat/icu-messageformat-1';
import { parse } from '@messageformat/parser';
import { stringifyMessage } from 'messageformat';

const mf1Msg = 'You have {numBooks, plural, one {# book} other {# books}}';
const mf2Msg = mf1ToMessageData(parse(mf1Msg));
stringifyMessage(mf2Msg);
.input {$numBooks :mf1:number}
.match $numBooks
one {{You have {$numBooks} book}}
* {{You have {$numBooks} books}}

For Fluent '@messageformat/fluent' provides two-way transforms and uses the default MF2 functions, but at least for now I found it easier to implement a separate family of mf1: functions, as the option mapping is a bit complicated and MF1 includes e.g. duration formatting, for which there's no MF2 function (yet)

@bearfriend
Copy link
Contributor

I have not yet found a use case for MF2 → MF1

My company is definitely interested in this. We're considering starting to write MF2 messages as we explore implementing it, but converting them back to MF1 either just for production or for the whole translation process. As mentioned, until "localization tooling catches up".

@eemeli
Copy link
Collaborator

eemeli commented Mar 7, 2025

@bearfriend I would very much welcome your (or anyone else's) contributions towards that at https://github.com/messageformat/messageformat/tree/main/mf2/icu-messageformat-1.

@aphillips aphillips added the Agenda+ Requested for upcoming teleconference label Mar 7, 2025
@aphillips
Copy link
Member

I noted somewhere else:

--
I think the list would be something like:

  • Stabilize remaining MF1.0 function support (:datetime, :date, :time)

  • Stabilize additional MF2.0 functions or options currently in draft (:unit and u:locale)

  • Create documentation, especially the user guide / messageformat.dev

  • Develop function description format as Draft (this is the machine-readable function data)

I don't think the WG should specifically build migration utilities, localization support, etc. But we should encourage people to report on their efforts in these areas. We crave success stories!!

Other than the function maintenance process, I hope that we do NOT change the spec much. Of course there will be typos and editorial improvements and of course there will be goof-ups or useful feedback. But, absent compelling evidence to the contrary, we should maintain a high bar on changes to the core spec.

@mihnita
Copy link
Collaborator

mihnita commented Mar 10, 2025

@bearfriend I would very much welcome your (or anyone else's) contributions towards that at
https://github.com/messageformat/messageformat/tree/main/mf2/icu-messageformat-1.

100% agree, but we need to find a good place.
Maybe in this repo, or somewhere related.
I am a bit reluctant about github.com/messageformat, which is a personal repo.

@aphillips aphillips self-assigned this Mar 10, 2025
@aphillips
Copy link
Member

In the 2025-03-10 teleconference we agreed that I would create a PR to update goals.md.

@bearfriend
Copy link
Contributor

bearfriend commented Mar 10, 2025

Sounds like these two statements potentially conflict, and settling one will (mostly) settle both:

I don't think the WG should specifically build migration utilities

...we need to find a good place. Maybe in this repo...

Either way, I did start fiddling with converting back to MF1 with some success. Am I to understand datetime is potentially being added to the MF1 spec? I had done some fun but less-than-ideal conversion to separate date and time formatted args provided a template (e.g. {0} {1}).

@eemeli
Copy link
Collaborator

eemeli commented Mar 10, 2025

I am a bit reluctant about github.com/messageformat, which is a personal repo.

To correct the above, messageformat is an OpenJS Foundation project. It is not a personal repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ Requested for upcoming teleconference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants