-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic variable name with square brackets breaks extract command #2159
Comments
Hello, can you share what issue you have encountered specifically? |
Most likely it's a syntax not supported by the babel version used in the extractor. Probably version bump for babel/* deps should resolve the issue. I think what makes this syntax special is a combination of @myDecorator()['propertyOfDecorator'] |
Just checked babel repl, it seems that syntax was allowed in the The lingui is defining constraint for the babel as Update babel with yarn: yarn up -r "@babel/*" |
Checked your lock file, it seems you're using |
@FelixMalfait try to drop the This option enables (you can play with decorators spec version on the left sidebar) |
@timofei-iatsenko you're right I'm sorry, this does not seem to be directly linked to Lingui (not sure why it came up when running the lingui command and not in a previous build, I will investigate). (We actually used SWC / same outcome) ![]() Apologies! |
Hi @FelixMalfait, congratulations on the successful integration of Lingui into Twenty! 🎉 Would you mind if we put Twenty's logo on the main page of the Lingui site? |
@andrii-bodnar hey no of course feel free to add it now, we'd be proud to be part of that list! The frontend implementation is fairly simple and can be a good example for people who want to see a real-life implementation. |
https://github.com/twentyhq/twenty?tab=readme-ov-file#stack feel free to do a PR to add a link to Lingui there along Translation.io also (Lingui and Translation.io for translation). I can do a PR to add our logo our your website but not today, most likely tomorrow |
@FelixMalfait awesome, thank you! I will do both PRs :) |
This PR adds Lingui to the translation tools in the Stack section of the Readme, based on the suggestion in the comment lingui/js-lingui#2159 (comment)
This PR adds Lingui to the translation tools in the Stack section of the Readme, based on the suggestion in the comment lingui/js-lingui#2159 (comment)
This PR adds Lingui to the translation tools in the Stack section of the Readme, based on the suggestion in the comment lingui/js-lingui#2159 (comment)
This PR adds Lingui to the translation tools in the Stack section of the Readme, based on the suggestion in the comment lingui/js-lingui#2159 (comment)
We're in the process of implementing lingui on https://github.com/twentyhq/twenty. Really great experience so far, thank you!
I've encountered an issue when running the lingui extract command with dynamic variable names like here.
https://github.com/twentyhq/twenty/pull/9847/files/cf631f5abdf180b408b56c37c4f279c654d16c19#diff-dca629c9ae348f7bbcb4378298f48cb702f59e2a965c0956f2ea4d2f0ecb6301
It worked when I replaced them by their static value.

Is there a way to fix the parser to allow for these?
Thanks a lot!
The text was updated successfully, but these errors were encountered: