You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When interpolating enums or other grammar rules that have other fallback for unmatched values, it does not treat an undefined value as a mismatch, instead it fails to render the whole message.
We rely on the behavior of intl-messageformat here, which also doesn't provide a way for customizing this. Therefore this is out of scope for next-intl.
That being said, I agree with the behavior of intl-messageformat, enabling stricter checks while still allowing undefined to be passed for edge cases as a way to bypass the check.
Description
When interpolating enums or other grammar rules that have
other
fallback for unmatched values, it does not treat an undefined value as a mismatch, instead it fails to render the whole message.Say we have such a message (from docs):
The behaviour is:
I am not sure if that is intentional, but it neither looks consistent to me nor behaves as one might imply from the docs:
Such behaviour is useful for creating plurals of the same thing:
Verifications
Mandatory reproduction URL
n/a
Reproduction description
see description
Expected behaviour
The text was updated successfully, but these errors were encountered: