According to the Magento documentation, I should be able to create a translation csv file by calling bin/magento i18n:collect-phrases command. I have tried all variations of the following
bin/magento i18n:collect-phrases -o "path/to/my/file.csv" -m
bin/magento i18n:collect-phrases -o "path/to/my/file.csv" path/to/my/module
bin/magento i18n:collect-phrases --output="path/to/my/file.csv" "path/to/my/module"
bin/magento i18n:collect-phrases --output="path/to/my/file.csv" --magento
But I always get the same error
[InvalidArgumentException]
Directory path is needed when --magento flag is not set.
i18n:collect-phrases [-o|--output="..."] [-m|--magento] [directory]
I feel like the documentation is totally wrong, or the command is broken.