Closed huynamboz closed 1 month ago
i tried with ubuntu and it worked but window is not
I got the same issue, it's been working fine until a recent update.
Hey everyone. I just implemented a new extraction parser that should be a bit more robust. Nobody has really used it yet, but if you still have extraction issues on Windows it may be worth a try.
Make sure to check the breaking changes though, e.g. the long-deprecated <translate>/v-translate
are not available anymore in v4: v4.0.0-alpha.4 and v4.0.0-alpha.2
Please let me know if you tried the new version and include your gettext-config file if you still have issues.
I can't get this to work. The new version gives me
vue-gettext-extract' is not recognized as an internal or external command, operable program or batch file.
module.exports = {
input: {
exclude: [
'./assets/images',
'./assets/locale',
'./assets/scss'
]
},
output: {
locales: [
'nb'
],
path: './src/assets/locale',
potPath: './locale.pot',
jsonPath: '../../../public/locale',
splitJson: true,
flat: false,
linguas: false
}
}
@fjeddy Sorry, I messed up the bin
paths. Please try again with 4.0.0-alpha.6
It's running now, but it's not actually extracting anything, same result as before, empty files. It's also so fast, so incredibly fast, that it doesn't seem like it's actually parsing any files. It spits out a response just as fast as I hit enter on the command.
gettext.config.cjs
module.exports = {
input: {
exclude: [
'./assets/images',
'./assets/locale',
'./assets/scss'
]
},
output: {
locales: [
'nb'
],
path: './src/assets/locale',
potPath: './locale.pot',
jsonPath: '../../../public/locale',
splitJson: true,
flat: false,
linguas: false
}
}
output
Input directory: ./src
Output directory: ./src/assets/locale
Output POT file: src\assets\locale\locale.pot
Locales: nb
Searching: src\**\*.js
Searching: src\**\*.ts
Searching: src\**\*.vue
Excluding: src\assets\images
Excluding: src\assets\locale
Excluding: src\assets\scss
Extraction successful, src\assets\locale\locale.pot created.
Merged: src\assets\locale\nb\app.po
@fjeddy I managed to reproduce this and pushed a fix with v4.0.0-alpha.7, please let me know if it works!
Nice, everything seems to be working fine now!
As a sidenote, before it would spit out how many strings it found and it's now spitting out a list of all the files it searched through, spamming the console a bit. Is the removal of the "summary" that was there in 2.4.0 on purpose?
@fjeddy Nice!
Is the removal of the "summary" that was there in 2.4.0 on purpose?
Iirc that was a feature of https://github.com/lukasgeiter/gettext-extractor that I now replaced with a custom parser and would have to implement myself. Probably a good idea, thanks for the input.
Newest version worked for me, thanks @lzurbriggen ❤️
i'm using window 11, pnpm and my current vue3-gettext's version is
3.0.0-beta.6
I have tried many times, but it still can't be exactMy config
Thanks