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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trans doesn't call parseMissingKeyHandler #1354
Comments
Never requested by devs to have that option -> so it's not added. We add features needed not just to be consistent with other calls -> Trans is a completely different beast (so there is no need to compare it to the API call of a simple t call). So, yes...can be added - if someone needs it...but I won't add lines just to have them...save the bytes |
fyi: seems it is not directly because of Trans, but because of the defaultValue usage... this would fix it: https://github.com/i18next/i18next/blob/master/src/Translator.js#L273 |
@adrai lgtm |
@igorsantos07 will be fixed in the next i18next version: i18next/i18next@da47faa |
Hope its OK to borrow this thread (if not I can make a new issue) We have a case like this
We have a generated form, where translation might, or might not be defined. So we'd like to just print nothing. This commit/release (20.4.0) changes this behavior, and it will now look for the translation key Is this intended? Feels more like a breaking change imo. If yes, how can i fall back to a string, and not a translation? Update:
Update 2:
|
@kg-currenxie Please create a reproducible example and open a new issue. |
馃悰 Bug Report
Common
t()
calls with missing keys go throughparseMissingKeyHandler
if that's defined, but Trans doesn't, what feels like inconsistent/unexpected behavior.To Reproduce
I created a single sandbox for multiple issues I'm reporting, so it's a bit bigger than expected, sorry :)
Expected behavior
Trans should also go through
parseMissingKeyHandler
? Or should it go somewhere else? I tried themissingInterpolationHandler
, to no avail as well.Your Environment
The text was updated successfully, but these errors were encountered: