Open alanszp opened 3 years ago
This one seems covered by this documentation: https://i18next-extract.netlify.app/#/configuration?id=tfunctionnames You can add relevant yup calls as function names, like "string().required" in your example.
Thanks for the comment! I think that it might be used, but can lead to potential errors if miss configured. And also if the implementation of the yup call handles multiple firms, it may also lead to problems.
I think that this hint is still usefull.
Is your feature request related to a problem? Please describe.
When using yup or other libraries, I want to give the library the translation path, but not the computed value, and then in the code use that path with the TFunction.
Ilustrative example:
Later on the code
In this case, i18next-extract won't know that
errors.bodyIsRequired
is a translation.Describe the solution you'd like
Was thinking (but open to discussion) that if we can add a comment hint like
// i18next-extract-string-is-translation
or// i18next-extract-string-is-translation-next-line
would help in this cases.Describe alternatives you've considered
Was thinking how to configure customTransComponents for this case, but the problem is that there are many types and they are stored in node_modules. Woludn't be so sure how to make that work.
Additional context