-
Notifications
You must be signed in to change notification settings - Fork 77
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
Split Localized into LocalizedElement, LocalizedText #502
base: main
Are you sure you want to change the base?
Conversation
ef51838
to
1803c30
Compare
The PR is not ready for review yet. I need to write tests for the new Summary: in React,
I'm not sure how much validation these new components should perform. For example, should @elisehein What do you think? |
It would make sense to me if correct use of the two components is enforced. Thinking back to your comment here even if it's possible for As an aside, will |
Good point about validation. It's good to be explicit about the expected input, both from the PoV of the users of
I don't think it should. Since one |
No, not at all. I'm not sure either, it's a bit of a weird gray area imo... But was just wondering because you wrote it would support React fragments, which could also be a list of multiple children. What would be the correct Fluent way of translating, say, this bit in your comment above? (genuinely asking, not suggesting)
It could be seen as a separate introductory phrase followed by four separate short phrases, but I guess it could also be seen as a single sentence that should be translated whole, in one |
As far as fragments are concerned, I'd like to support them explicitly via The support for arrays and implicit fragments is something that we could consider in the future, and I think the current API could be extended in a backwards-compatible manner.
That's a great question! Fluent's primary use-case is localizing the UI, and I'd argue that the example you cited is more content than UI. We've had some ideas about how to bridge the gap between these two different use-cases and how to support larger pieces of text in a single Fluent message. Today, the overlay mechanism (in both |
Fix #498.