Based on the discussion in #372, the MakeMocommand should support a destination file name.
This PR allows you to specify a destination file name when the source is a file. When the source is a directory, providing a destination file name is not supported:
wp i18n make-mo foo.po -> unchanged behavior, writes foo.mo to same directory as foo.po
wp i18n make-mo foo.po bar.mo -> writes file to bar.mo
wp i18n make-mo foo/bar -> unchanged behavior, generates MO files for all PO files in the directory
wp i18n make-mo foo/bar baz.mo -> won't work!
Based on the discussion in #372, the
MakeMo
command should support a destination file name.This PR allows you to specify a destination file name when the source is a file. When the source is a directory, providing a destination file name is not supported:
wp i18n make-mo foo.po
-> unchanged behavior, writes foo.mo to same directory as foo.powp i18n make-mo foo.po bar.mo
-> writes file to bar.mowp i18n make-mo foo/bar
-> unchanged behavior, generates MO files for all PO files in the directorywp i18n make-mo foo/bar baz.mo
-> won't work!