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

generate pot file from cli #80

Open
nils-hoyer opened this issue Dec 12, 2018 · 5 comments
Open

generate pot file from cli #80

nils-hoyer opened this issue Dec 12, 2018 · 5 comments
Labels

Comments

@nils-hoyer
Copy link

can you please provide a functioning example for generating a .pot file.
I tried to execute the command with all necessary parameters:

i18next-conv --pot -l en -s 'path/to/file' -b 'path/to/file' -K

produces:
start converting --> reading file from: ..../file.json <-- writing file to: ..../en/file.po file written

@jamuhl
Copy link
Member

jamuhl commented Dec 14, 2018

does only pot not work or in general?

@nils-hoyer
Copy link
Author

the issue only occurs when generating .pot from cli.
i18next-conv --pot -l en -s 'path/to/file' -b 'path/to/file' -K

from the API it was working fine.
i18nextToPot('ua-UK', readFileSync(source), options).then(save('../locales/ua-UK/translation.pot'));

@jamuhl jamuhl added the bug label Dec 14, 2018
@jamuhl
Copy link
Member

jamuhl commented Dec 14, 2018

so other commands work from CLI? if so i'm sure @perrin4869 will look into this - you might speed this up by providing a PR containing a fix

@shirazz
Copy link

shirazz commented Feb 1, 2020

Tried to create a .pot file using the CLI and got the same issue. Did a quick check on the code. This condition will be triggered when no target is specified. So i just added a -t 'path/to/save/file.pot' and it worked.

@jamuhl
Copy link
Member

jamuhl commented Feb 2, 2020

So checking for --pot and depending on it set the correct extension should do the trick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants