admin管理员组文章数量:1297103
I'm trying to debug some missingKey
warnings in my codebase and it seems that we're doing what essentially amount to t(t('some.valid.key'))
. The code is more complex which many layers between the first t()
returning a translated string and trying to use it as a key in the second t()
. For now, I've isolated and fixed my current issue by removing the extra call to t()
.
This wasn't initially detected since the translated text happened to be equal to the key in english. I believe it is an error to try and translate twice, unless there's some weird indirection usecase I'm not aware of. Is there a setting to enable such a warning? If not, would it be a sensible feature request?
本文标签:
版权声明:本文标题:When debug mode is active, is it possible to get i18next to warn when trying to use translated text as a key - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741648357a2390323.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论