I'm mucking around trying to understand the output filename option from the command line.
I've tried several different calls and each seem to make very little sense; At first I thought this is my understanding that is not correct so I would appreciate if anyone could enlighten me...
root@c76c41e1100c:/usr/src/app/src# jsontt ./assets/i18n/en.json -m google2 -f en -t sl -n ./assets/i18n/sl.json -fb no -cl 1
β DONE! 719 of 719 translated.
All files are created! You can find them in the same folder as the original file.
Could not save the file.
For Slovenian --> /./assets/i18n/sl.json.sl.json created.
root@c76c41e1100c:/usr/src/app/src# jsontt ./assets/i18n/en.json -m google2 -f en -t sl -n assets/i18n/ -fb no -cl 1
β DONE! 719 of 719 translated.
All files are created! You can find them in the same folder as the original file.
Could not save the file.
For Slovenian --> /assets/i18n/.sl.json created.
root@c76c41e1100c:/usr/src/app/src# jsontt assets/i18n/en.json -m google2 -f en -t sl -n assets/i18n/ -fb no -cl 1
β DONE! 719 of 719 translated.
All files are created! You can find them in the same folder as the original file.
Could not save the file.
For Slovenian --> /assets/i18n/.sl.json created.
root@c76c41e1100c:/usr/src/app/src# jsontt assets/i18n/en.json -m google2 -f en -t sl -n sl.json -fb no -cl 1
β DONE! 719 of 719 translated.
All files are created! You can find them in the same folder as the original file.
For Slovenian --> /sl.json.sl.json created.

| -n value |
actual result |
notes |
a full path and filename; -n ./assets/i18n/sl.json |
a slash (/) is prepended, and a weird .filename.ext is appended to form; /./assets/i18n/sl.json.sl.json |
Could not save the file. |
relative folder only; -n assets/i18n/ |
/ is prepended and so is the . in front of the filename... /assets/i18n/.sl.json |
Could not save the file. |
just the filename; -n sl.json |
same / prefix and .sl.json suffix; /sl.json.sl.json |
file written in the correct folder, unlike what is suggested by output, but with a bad name |
I don't understand why... this seems weird;
- the file should be written in the current folder, or in the location specified
- the filename should NOT (ever!) be prefixed with
. yet this seems consistent in all my tests
So as per the documentation I proceeded to try jsontt your/path/to/file.json, answer a few questions, and sure enough, the output file is created in the same folder as the source, and with the correct name. And sure enough, using any permutation of the -n <filename> as per man and --help just - doesn't - work!!
Suggestions & Questions;
- you really ought to rename this -n flag to -p... this is not a "filename" option, this is a file "prefix" option. π€―π€― with all due respect to the work done so far... the documentation cannot read 'filename'!
- so my remaining question then; How do I suppress all user interaction if I cannot supply the filename? π΅π΅
I'm mucking around trying to understand the
output filenameoption from the command line.I've tried several different calls and each seem to make very little sense; At first I thought this is my understanding that is not correct so I would appreciate if anyone could enlighten me...
-n ./assets/i18n/sl.json/) is prepended, and a weird.filename.extis appended to form;/./assets/i18n/sl.json.sl.json-n assets/i18n//is prepended and so is the.in front of the filename.../assets/i18n/.sl.json-n sl.json/prefix and.sl.jsonsuffix;/sl.json.sl.jsonI don't understand why... this seems weird;
.yet this seems consistent in all my testsSo as per the documentation I proceeded to try
jsontt your/path/to/file.json, answer a few questions, and sure enough, the output file is created in the same folder as the source, and with the correct name. And sure enough, using any permutation of the-n <filename>as per man and--helpjust - doesn't - work!!Suggestions & Questions;