jshmrtn/vue3-gettext

msginit "Command failed"

Closed this issue · 2 comments

Extraction successful, src\language\messages.pot created.

152 messages extracted

322 total usages
6374 files (219 with messages)
1 message context (default)

Error: Command failed: msginit --no-translator --locale=en --input=src\language\messages.pot --output-file=src\language\en\app.po
'msginit' n�o � reconhecido como um comando interno
ou externo, um programa oper�vel ou um arquivo em lotes.

at ChildProcess.exithandler (node:child_process:387:12)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1090:16)
at Socket.<anonymous> (node:internal/child_process:449:11)
at Socket.emit (node:events:527:28)
at Pipe.<anonymous> (node:net:715:12) {

code: 1,
killed: false,
signal: null,
cmd: 'msginit --no-translator --locale=en --input=src\language\messages.pot --output-file=src\language\en\app.po'
}
node:fs:1858
handleErrorFromBinding(ctx);
^

Error: ENOENT: no such file or directory, chmod 'src\language\en\app.po'
at Object.chmodSync (node:fs:1858:3)
at C:\DEV__Vue\Mindu\node_modules\vue3-gettext\dist\bin\gettext_extract.js:324:40
at step (C:\DEV__Vue\Mindu\node_modules\tslib\tslib.js:193:27)
at Object.next (C:\DEV__Vue\Mindu\node_modules\tslib\tslib.js:174:57)
at fulfilled (C:\DEV__Vue\Mindu\node_modules\tslib\tslib.js:164:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -4058,
syscall: 'chmod',
code: 'ENOENT',
path: 'src\language\en\app.po'
}

Node.js v18.2.0

It's a example of an error, even I tried to change folders or clear caches/reinstall too this errors persist... the directory/folder has been created but appears a permission maybe about msginit?
I wrote this because someday, someone - maybe - will have the same issue
You guys saving our bacon. Thanks for this implementation - will be fantastic

Windows users like me
Need install
Go to:
#first https://www.gnu.org/software/gettext/ (and verify the link) ->
#second Michele Locati kindly provides precompiled binaries for Windows on his site -> AND
#third choose "static2".EXE version because this will install environment variable to access "gettext" anywhere

There is a short section in the setup docs that links to the mentioned Windows binaries. If that's not enough to get it working please provide a PR with better instructions.