ttag-org / ttag

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

Run ttag in deno project #280

Closed hshoja closed 8 months ago

hshoja commented 8 months ago

It appears that there are some challenges to running ttag in a deno project.

From what I've discovered ttag-cli only works if it finds import { t } from 'ttag' import format, whereas importing in deno is different

I am considering a solution involving running a bash script to resolve this issue, but I'm wondering if there is a quicker fix available.

hshoja commented 8 months ago

It appears that there are some challenges to running ttag in a deno project.

From what I've discovered ttag-cli only works if it finds import { t } from 'ttag' import format, whereas importing in deno is different

I am considering a solution involving running a bash script to resolve this issue, but I'm wondering if there is a quicker fix available.

found this comment, by running ttag-cli with discover , we don't have to follow import format ttag update --discover="t" app.ts https://github.com/ttag-org/ttag/issues/190#issuecomment-608265258