-
Notifications
You must be signed in to change notification settings - Fork 51
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
Trace: TypeError: expression.arguments is not iterable
when import $gettext...
is used
#37
Labels
Comments
gorkat
added a commit
to gorkat/easygettext
that referenced
this issue
Jul 3, 2018
…ext function This commit is a fix for issue Polyconseil#37. The problem came from the extractor that was trying to extract the strings arguments of any gettext-like node without making sure that the type of the current node was a CallExpression. This fix prevents the extractor to automatically extract strings or variables or whatever called like a vue-gettext function. How to test: - setup a vue file containing decoys looking like some gettext functions like: <template> <h1>{{ message }}<h1> </template> <script> import $gettext from '@helper/gettext'; export default { name: "$gettext", // because some people are actually weird computed: { message() { return this.$gettext('Hello world from the $gettext function'); } } } </script> - Run extract-cli with this file. Expected results - The string "Hello world from the $gettext function" has been successfully extracted without any error.
Hello, |
gorkat
pushed a commit
that referenced
this issue
Jul 19, 2018
…e-is-not-a-function Issue #37 - Extract strings only when expression is a gettext function
Hello @escapedcat, this should be fixed now, I close this issue :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our component files we use a helper like this:
With 2.5.0 (#34) I get:
Looks like it's trying to parse the import statement.
The text was updated successfully, but these errors were encountered: