Skip to content
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

Improve the extract plugin so it throws a warning/error when it tries to extract message with undefine id. #863

Closed
semoal opened this issue Nov 13, 2020 · 2 comments
Assignees

Comments

@semoal
Copy link
Contributor

semoal commented Nov 13, 2020

Also we should improve the extract plugin so it throws a warning/error when it tries to extract message with undefine id.

Originally posted by @tricoder42 in #862 (comment)

@semoal semoal self-assigned this Nov 13, 2020
@semoal
Copy link
Contributor Author

semoal commented Nov 16, 2020

@semoal semoal closed this as completed Nov 16, 2020
@tricoder42
Copy link
Contributor

Yeah, but that's only Trans macro. I guess we simply need to copy the same working to lines 162

const props = {
id: path.node.arguments[0].value,
}
const copyOptions = ["message", "comment"]
and 195:
const props = {
id: path.node.value,
}
collectMessage(path, file, props)

the bug in js macro caused that undefined got extracted. That shouldn't happen, i.e. if id is undefined, we shouldn't extract any message but rather show a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants