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

extract of pure js files is not working ... #81

Closed
DeepDiver1975 opened this issue Apr 17, 2020 · 7 comments
Closed

extract of pure js files is not working ... #81

DeepDiver1975 opened this issue Apr 17, 2020 · 7 comments

Comments

@DeepDiver1975
Copy link

DeepDiver1975 commented Apr 17, 2020

The given example is simply not working - https://www.npmjs.com/package/easygettext#javascriptes7-token-extraction

➭ ./node_modules/.bin/gettext-extract somefile.js 
[easygettext] extracting: 'somefile.js
msgid ""
msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: easygettext\n"
"Project-Id-Version: \n"

➭ more somefile.js 
const myVar = $gettext("My fantastic msgid")

const myConcatVar = $gettext(
  "My"
  + "fantastic"
  + "msgid"
)

const myTempVar = $gettext(
  `My
  fantastic
  msgid`
)

const myContextualizedVar = $pgettext("some context", "Some other string")
@DeepDiver1975
Copy link
Author

Is this a known issue yet? I'll dig into thsi to see what's going on.

@DeepDiver1975
Copy link
Author

2.10.0 is broken - master works

Looks like we need a release? THX

@DeepDiver1975
Copy link
Author

2.9.0 was good as well

@vperron
Copy link
Contributor

vperron commented Apr 17, 2020

Thanks for your investigation ! I just released version 2.11. Does it work for you ?

@DeepDiver1975
Copy link
Author

That would be awesome! Thx

@vperron
Copy link
Contributor

vperron commented Apr 18, 2020

Did you check that the latest version works ?

@DeepDiver1975
Copy link
Author

Tested with 2.12: ✔️

THX a lot

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