-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
extracting from JS code #121
Comments
Apparently, there’s a bug in
Obviously, it doesn’t collect all parameters, but only the first of each function. Doing the same with |
The bug is actually in The method apparently tries to determine if the argument is a literal, but checks only for the first character. If there’s a space after the commas separating the parameters of the JS function call, it will not consider the argument to be a literal string. The simple solution would be to insert However, I didn’t dig too deep into the code, so I can’t really say if this is maybe more of a hack than a solution. |
I just made a commit to fix this. Let me know if it works fine now. |
Yup, seems to work alright now. Thanks! |
It seems that
JsFunctionsScanner
skips certain functions from JS calls with more than one parameter. This means that it skips at least allngettext()
andpgettext()
calls.I tried the following with both a JS and a PHP source file:
Extracted and generated dumps with the following code:
This gave me the following results:
The output for PHP is as expected, however, the JS output is missing the entries for the
pgettext()
andngettext()
calls.The text was updated successfully, but these errors were encountered: