Transifex clit don't push strings with syntax `useT()('Some string')`

Issue

The transifex cli doesn’t push strings which are defined in this way

const A = useT()('Some string')

Changing the above string to

const t = useT()
const A = t('Some string')

works.

Question:
Can we also push the strings in the former manner ?

Why I need this:
When we migrated from v2 to v3, we just replaced all useT( with useT()( and that was faster solution but now we see we lost alot of translations and also seems like a refactor is needed. However, it would be great if the cli can just also detect the above way.

Many thanks :+1:

Hello ,

Thank you for contacting us.
I am Christos , a support engineer here in Transifex.

Unfortunately this is a limitation of the cli. This is a very special corner case that the parser cannot support, as it only evaluates and detects only “t” and “” functions. It has no way to detect and evaluate code. For the near future , no updates are scheduled for the cli.

We thank you for bringing this up to our attention and remain at your disposal.
Kind regards
Christos

Hi chrisb,
Thanks for the fast response. :+1:
I do request to please add this in the docs here: React because otherwise it’s kinda mistake that someone can do and with --purge feature they can remove their translations during migration :stuck_out_tongue:

Thanks again.

Thank you for the comments and response.

We are forwarding your suggestion to our team.

Kind regards
Christos