-
-
Notifications
You must be signed in to change notification settings - Fork 36
Why MessageFormat
needs a successor
#84
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
Conversation
@zibi: thank you for offering to help. If you look at the history of the file, I started with a list of bullets that were the same as the list of issues we already collected in GitHub. |
|
||
**Mandatory xkcd:** | ||
|
||
[<img src='https://imgs.xkcd.com/comics/standards.png'>](https://xkcd.com/927/) |
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.
😂😂😂😂😂😂😂😂😂😂😂
Going high-level first. I like the "5 points" - it simplifies the logic and makes it easy to read "what they're addressing" and "what should I expect out of the outcome". I don't like personal sentences in WG documents. Sentences like "I've started with..." read more like a personal take than a formal position of the WG. Here's my summary of your outline:
I removed pt (2) from your listing because it doesn't feel like a problem that requires fixing via new iteration - we could fix it just by adding test suite. Let me know if you agree. On the other hand, I see a number of MF shortcomings that are not captured here:
I trust you on selection of those, so feel free to incorporate or reject any and all of the above. Finally, I'm wondering if this is the right place to extract the conclusion from the shortcoming listed by you about "hard to add/remove features" into some form of "L10n systems are hard to change, they stay for decades as software changes. Encoding every feature deep into the data model and syntax does not stand the test of time. In conclusion we believe that designing a more generic data model on top of which we can develop features that can be extended and even deprecated as the time goes without affecting low-level foundational tooling is critical for the longevity of the system". |
Thanks, I'll do that I'll go through your list and refactor, but can't take you full suggestion "as is" There are things that are not addressed because they are not
There is no fallback or resolution, because "Designed to be API only", so it is already captured. The loading of the string (including resolution / fallback) is the responsibility of some other component. You load the string (using the Android ResourceManager, Java Resources, Windows / MacOS APIs, C/C++ gettext), then pass it to the This allows one to use ICU without being force to migrate the whole resource resolution out of the OS (making the resolution results inconsistent in the process). Add this to the "detailed notes" of the bullet?
Same for both items, addressed by "Designed to be API only", not a complete solution. You can use whatever metadata the native string storage mechanism you use. Whitespaces and multiline can't be specified well in HTML fragments to begin with, So And all of the 3 issues above can be solved without a new version of But the price is loss of flexibility: now as an iOS / Android / Qt developer I need to either move ALL my strings to a "MF store", with its own resolution / fallback / metadata, or keep non MF strings in a "native store" and MF strings in a "MF store" (with the huge risk that the resolution is different)
Agree with both.
I agree with this, and I'll see how I take this and use it.
As you might have noticed in my answers above, there is some bias (probably yours and mine :-) |
Would it be a good idea to enumarate with more detail the design mistakes which you briefly touch on in point 3? Things like positional and named parameters, escaping, etc. I feel like each would benefit from its own bullet point with an example and the rationale about why we think they didn't work out. |
I'm afraid that would make this document too big. There is an older Google Doc (public, shared) where I listed what I like / dislike about MessageFormat. I can link to it. Or I can convert it to a markdown file and post it somewhere (where?) But if others agree to include all that here I am also OK to include some of that doc here. |
Changed things quite a bit. I've tried to capture / address all of your points, even if that didn't change the bullets too much. |
doc/why_mf_next.md
Outdated
“de facto reference-implementations”, and the ports to other languages | ||
(JavaScript, Go, Dart, etc.) are at risk for being “slightly incompatible” | ||
|
||
### 3. Can't remove anything, even if we know know better |
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.
Not sure if this is related to ICU itself or more with its process? But it's a good reminder that we should avoid falling back in the same situation (e.g. support versioning)
doc/why_mf_next.md
Outdated
|
||
### 4. Hard to map to the existing localization core structures | ||
|
||
The format is not supported by any major localization system that I know 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.
Do you mean TMS here? and can you elaborate a bit more around what you would expect in terms of support?
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.
The term was "intentionally vague", since I didn't want to get into debates about TMS vs GMS vs CAT vs whateve-else-abbreviations-people-use.
Support means most of the stuff people do with other formats: extract (with unescape), segment, leverage, translate protecting codes, validate, merge (with proper escape).
I don't count "take the file as is, with curly brackets and all, and let translators edit it raw" as "support".
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.
This looks good. I agree with all points and I think it captures my mental model really well. Thank you!
doc/why_mf_next.md
Outdated
are doing it in ICU itself. | ||
It also means most tools used to process these messages are built rigidly, | ||
and are unprepared to handle changes | ||
(think localization tools, liners, friendly UIs, etc.). |
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'd maybe add that, from the experience with Fluent, the fact that almost every feature in MF is a syntax feature, means that on the very lowest level - AST, parser - every extensions basically breaks the existing functionality because the file cannot be parsed and its AST operated on.
Fluent's AST is more generic which means that more of the functionality falls on higher levels of abstraction and in fact, over the last 3 years, all accrued "wants" can be implemented either on the higher level (Semantic Comments, Dynamic References etc.) or require additive syntax relaxations (flatten selectors, rich overlays).
@@ -0,0 +1,146 @@ | |||
# Why `MessageFormat` needs a successor ([issue #49](https://github.com/unicode-org/message-format-wg/issues/49)) |
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.
In my opinion, the issue number should be placed along the article in a "more info" , "links" , "discussions" section or in the intro while giving context.
Issue #49
In preparation for the group meeting.