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

Retrieve column number #70

Open
MarcelloPerathoner opened this issue Sep 13, 2024 · 0 comments
Open

Retrieve column number #70

MarcelloPerathoner opened this issue Sep 13, 2024 · 0 comments

Comments

@MarcelloPerathoner
Copy link

Please make it possible to retrieve the column number along with the line number of a message.

Use case: to parse a Vue.js template the obvious way is to compile the Vue template into JS and then feed the compiled JS to the gettext-extractor. The Vue template compiler returns the compiled JS plus a sourceMap, so it would be easy to fix up the references using https://github.com/mozilla/source-map if you could get the column number. (Note that setting the column number to always 0 or always 9999 does not work reliably with mozilla/source-map.)

One way to fix this would be a callback before storing each message, with the message, filename, line, column as parameters, so I could replace the reference with the correct one.

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

1 participant