Replies: 2 comments 6 replies
-
Any message might be transformed in the way that you suggest, with a machine naively producing it. I believe @eemeli has a working one. However, there are MF1 messages that cannot be transformed into MF2 messages--because we took the functions away. Any message that uses Looking this morning, I don't see in the spec where we say that MF1 messages are not transformable. Can you point to text? Pull requests are better than guessing 😄 |
Beta Was this translation helpful? Give feedback.
-
You're right. I searched, and there isn't any specific mention of that in the specs or the site material (what you can get to from https://github.com/unicode-org/message-format-wg). So I'll close this issue as a user-error. I think a few steps have to be in play to make migration easy, which will be important to build momentum. I'll talk to the ICU TC about this.
|
Beta Was this translation helpful? Give feedback.
-
I was looking more at conversion of MF1 to MF2, and realized something.
Take this badly formed pattern:
It is badly formed because it presumes that only one part of the message is governed by the
gender_of_host
. That will fail for many languages. However, we can always pull the embedded select placeholder forgender_of_host
to be the topmost, duplicating the messages and replacing the embedded placeholder contents in each case by the 'resolved value'.For example, look at the following:
And importantly, when we dot same thing to the translated messages, they also produce the same result. (Of course, they could be retranslated to take advantage of additional freedom, but they are no worse than they were.)
This was the only real roadblock for compatibly transforming MF1 messages into MF2, so I think we can change some of our language talking about the migration.
BTW, the second example is from https://unicode-org.github.io/icu/userguide/format_parse/messages/
Beta Was this translation helpful? Give feedback.
All reactions