-
Notifications
You must be signed in to change notification settings - Fork 97
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
Make FluentMessage::attributes() return ExactSizeIterator #263
Comments
@zbraniecki do you foresee any problems with this? |
It may be a case of an explicit antipattern in Fluent - https://github.com/projectfluent/fluent/wiki/Good-Practices-for-Developers#prefer-separate-messages-over-variants-for-ui-logic If those are actually variants of the same message, as in same message but varied by tone etc. then maybe it's ok. |
Well, reading this link, I would say "yes" to both.
Otherwise, we wouldn't have them random :) |
Also to add to this, having it random makes it possible to have a different number of variants in different languages. |
It may be an unusual way of using attributes, but we plan to use them to implement message variation, for example, for NPCs speech in the game.
And we would like to choose a random message.
To do that we have multiple options.
.skip()
taking needed element.The text was updated successfully, but these errors were encountered: