-
Notifications
You must be signed in to change notification settings - Fork 23
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
Disable line numbers #27
Comments
Currently this is not possible, but I will consider implementing it in the next feature release. |
@lukasgeiter a little input on this: we could also implement a feature to disable file references at once, not just line numbers 👍 |
Sure thing, that should be easy to implement 🙂 |
The workaround that I use for now (taking advantage of mutability and object references, which is not really cool but easier than parsing POT line-by-line) // clean file references
extractor.getMessages().forEach((msg) => {
msg.references = [];
});
extractor.savePotFile(outputPotFile); |
Nice workaround from @pronebird 👍
extractor.getMessages().forEach((msg) => {
msg.references = msg.references.map((ref) => {
return ref.replace(/:([^:]+)$/, '');
});
}); |
And you'd probably want to remove duplicated file names after that. |
Hi,
Is it possible to disable the output of line numbers in references field? The idea behind is to reduce the amount of noise in gettext catalogues because our codebase changes a lot but translations normally remain the same, so when running the gettext-extractor we get a dirty git because of the line numbers change.
The text was updated successfully, but these errors were encountered: