amiranagram / localizator

Scan your Laravel project and generate language files ready to translate in language(s) of choosing.
Other
229 stars 29 forks source link

Added --force option to the localize command #56

Closed filip-nifti closed 1 year ago

filip-nifti commented 1 year ago

The Localize command implements the ConfirmableTrait but does not have a --force option. This makes it impossible to use the command programmatically and bypass the "Do you really wish to run this command?" Which you are supposed to be able to do using the --force option.

I did not add any tests since i did not manage to change the environment to production to force the question "Do you really wish to run this command? " therefore i could not create any assertions.

But it does work and it is a minor change that only implements a trait. Just an option no further code changes. All the previous tests pass as expected.

amiranagram commented 1 year ago

Environment can be changed with app()->detectEnvironment(fn () => 'production'), but nevertheless, I don't think tests are needed anyway. Thanks. Released as a patch. @filip-nifti

filip-nifti commented 1 year ago

Ah, thanks good to know!