ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
345 stars 43 forks source link

translator comments in JSX #180

Closed benmonro closed 5 years ago

benmonro commented 5 years ago

currently the docs here: https://ttag.js.org/docs/translator-comments.html do not mention any way to add a translator comment within JSX.

we might have some large blocks of JSX and putting the comment at the top would be kind of awkward, would be nice if we could do the following:

<MyComponent>{/* translator: Use this for that thing you want to do */ t`Thing Name`}</MyComponent>

is this possible? and if so can it be added to the docs? :)

AlexMost commented 5 years ago

This feature is was disabled by default for some reason. fixed in ttag-cli@1.7.19