ttag-org / ttag

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

Backtick is escaped wrong #152

Closed dimaqq closed 5 years ago

dimaqq commented 5 years ago

Given this JSX, where the value contains a single literal backtick in the middle

<Foo FIXME={t`test\`this`} />

ttag update produces this block in the translation file:

#: src/Bar.js:13
msgid "test\\`this"
 msgstr ""

Where the value contains a backslash and a backtick in the middle.

AlexMost commented 5 years ago

You can try fix in ttag-cli@1.7.12. Please, let me know if that works!

dimaqq commented 5 years ago

Yes, it's fixed, thank you! 👍

Tested with:

├─ babel-plugin-ttag@1.7.11
├─ ttag-cli@1.7.13
│  ├─ babel-plugin-ttag@1.7.11
├─ ttag@1.7.13