Open georgkrause opened 3 years ago
While the extraction works fine with 0.19, I start getting problems with v0.21.
xgettext --language=JavaScript --keyword=npgettext:1c,2,3 --from-code=utf-8 --join-existing --no-wrap --package-name=$(node -e "console.log(require('./package.json').name);") --package-version=$(node -e "console.log(require('./package.json').version);") --output $locales_dir/app.pot src/App.vue --no-wrap xgettext: Öffnen der Datei »/app.pot« zum Lesen fehlgeschlagen: Datei oder Verzeichnis nicht gefunden
(Sorry for the german error message)
The file in question is available here: https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/front/src/App.vue
Hi
You resolved your issue?
I read your docs https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/CONTRIBUTING.rst
I have error: scripts/i18n-extract.sh: line 15: xgettext: command not found error Command failed with exit code 127.
Is the same error?
Hello!
I did not solved it, I simply work around it by using gettext
version 0.19.
Anyway, the errors are not the same. The one I reported is like Failed to open File "/app.pot" for reading: File or directory not found
Oh my colleague and I have been sitting way too much on trying to fix this.
I finally solved it by downgrading to gettext 0.20.2
Steps I took (on macOS Big Sur):
brew install nedap/versions/gettext@0.20.2
(big thanks @nedap!). Make sure you have the latest xcode-select installed for this to be able to be compiledIf you run into brew linking issues like me, run:
brew link --overwrite --force gettext@0.20.2
If you still get another version as linked, run:
gettext --version
to double-check what version is active.echo $PATH
to see if gettext is in your $PATH. If it is, remove it from there so that brew's version can be used instead.gettext --version
should now be returning gettext (GNU gettext-runtime) 0.20.2
and hopefully this can run your scripts again!He updated the xgettext
line to run via gettext-extract
instead, and removed a bunch of unusable flags.
From e.g.
xgettext --language=JavaScript --keyword=npgettext:1c,2,3 --from-code=utf-8 --join-existing --no-wrap --package-name=$(node -e "console.log(require('./package.json').name);") --package-version=$(node -e "console.log(require('./package.json').version);") --output $locales_dir/app.pot src/App.vue --no-wrap
To e.g.
xgettext --output $locales_dir/app.pot src/App.vue
But it's not really fully functioning properly yet, it doesn’t seem to --join-existing
. Will update if we manage to use this solution. For now we will unfortunately downgrade.
While the extraction works fine with 0.19, I start getting problems with v0.21.
(Sorry for the german error message)
The file in question is available here: https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/front/src/App.vue