Closed Reaper88 closed 1 year ago
None of the i18n commands require a database connection or a WordPress installation.
Then why am I receiving this error of database connection and no files?
@Reaper88 wp i18n make-pot
seems to work fine for me without a database connection:
$ wp core download
Downloading WordPress 6.1.1 (en_US)...
md5 hash verified: 38a0a4f7b7ec8429b2fe96de6b5d6572
Success: WordPress downloaded.
$ mkdir languages
$ wp i18n make-pot . languages/filename.pot
Success: POT file successfully generated!
Can you reproduce the issue in another environment? If not, it might be a problem specific to your environment. Feel free to stop by the #cli
channel on WordPress.org Slack if you'd like help debugging further.
I'm not sure why exactly, or if it was my code or my environment, but I was running the command first in composer which never gave me issues before, and I decided to try running the command directly, that worked, tried composer again, and then it worked too all of a sudden. Sorry for the trouble at least it works, it could be due to using composer first I'll have to try that again later down the road.
Sounds good, thanks @Reaper88
Bug Report
Describe the current, buggy behavior
When I try to make a pot from just plugins files I get this error:
I am running a minimal setup working with wordpress in a docker image using volumes to link to the image for developement but doesn't work. I'm wondering why does it need to connect to database just for making a pot file
Describe how other contributors can replicate this bug
Describe what you would expect as the correct outcome
Make a pot file without the need for the databse.
Let us know what environment you are running this on
Provide additional context/Screenshots
I am running these as a volume for a docker image and database as an image and it is running but since wp-config is within the files of the docker image it cannot reach it therefore blocking the process at database level.