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
Is your feature request related to a problem? Please describe.
Hi there 👋 .
We recently moved to using i18next-extract and it's been really helpful. Thank you so much for your work.
One thing our previous solution supported was sending notes to the translator.
Notes in our current codebase look like this:
Describe the solution you'd like
We'd like a way to support arbitrary comments associated with a call to the translate function. Ideally we'd like to support multiline comments in some fashion as well.
I see that you have support comments for a variety of things already, e.g.
What we'd like to see is something like:
// i18next-extract-translator-comment This describes additional fees for a ticket, e.g. +$3.50 (additional cost)
i18n.t('+%(fee)s (additional cost)'), { fee: '3.50' })
Describe alternatives you've considered
We considered writing a babel plugin that extracts the translator notes as they exist in our codebase and then associates them to the extracted keys provided by the plugin.
Additional context
We're happy to do this work, we just want to solidify on a path forward. Thanks again for maintaining this project.
The text was updated successfully, but these errors were encountered:
Hi, thanks for raising an issue about this. It sounds like an interesting feature. Would you be interested in making a PR? I'd happily merge it.
I have one question though: where would the translator comment go in the output file? I don't see such comment supported in JSONv3 format, but I may be missing something.
That's actually why we made the issue. We're not sure where to put it either. We were hoping you'd have suggestions. If we can't find a place to put it in the object we could always write a second file.
Is your feature request related to a problem? Please describe.
Hi there 👋 .
We recently moved to using i18next-extract and it's been really helpful. Thank you so much for your work.
One thing our previous solution supported was sending notes to the translator.
Notes in our current codebase look like this:
Describe the solution you'd like
We'd like a way to support arbitrary comments associated with a call to the translate function. Ideally we'd like to support multiline comments in some fashion as well.
I see that you have support comments for a variety of things already, e.g.
What we'd like to see is something like:
Describe alternatives you've considered
We considered writing a babel plugin that extracts the translator notes as they exist in our codebase and then associates them to the extracted keys provided by the plugin.
Additional context
We're happy to do this work, we just want to solidify on a path forward. Thanks again for maintaining this project.
The text was updated successfully, but these errors were encountered: