As Galician GTE, I translate a lot of strings from English to Galician: WordPress core, WordPress.org infrastructure, plugins, themes, … As a bilingual speaker (Galician and Spanish languages), I realized I can translate faster if I use the Spanish translations as starting point, so I develop a CLI tool to translate all WordPress stuff from Spanish to Galician, using the open-source translations created by the Spanish community (thank you, folks). A few months later, I converted this CLI tool in a website, so you can use it without any installation. And, of course, I have released it as open source (AGPL).
PHPCS and PHPCBF are two well-know PHP scripts used in the PHP development to (PHPCS) detect violations of a defined coding standard, and (PHPCBF) to automatically correct coding standard violations.
I usually use both with composer in my WordPress projects, adding them as dependency in the composer.json file.
But sometimes I need to check some individual PHP file without adding PHPCS and PHPCBF as dependency. In this post, I am going to explain how I do this.
Sometimes, it is useful to use the WordPress nightly version on your local environment, to avoid problems with your code in the near future.
GlotPress has some PHPUnit tests. In this post, I will go to explain how to run it in your local machine.
The last ApiGen commit was made on 23 Apr 2018, so I think this tool is deprecated. Furthermore, I was not able to use it with PHP 7.4 and GlotPress, so I look for another tool. The most PHP used tool is phpDocumentor. In this post I explain how to use it with GlotPress.
Install phpDocumentor globally on the machine, using the .phar tool.
cd ~/code/utils mkdir phpDocumentor cd phpDocumentor
Get the last .phar URL.
To run phpDocumentor, execute:
php phpDocumentor.phar run \ -d ~/code/wordpress/glotpress-env/glotpress.git \ -t ~/code/wordpress/glotpress-env/gp-docs \ --ignore "vendor/"
~/code/wordpress/glotpress-env/glotpress.gitis the GlotPress folder.
~/code/wordpress/glotpress-env/gp-docsis the documentation folder.
vendor/is the folder where Composer stores all the information. It is located in the root folder of the project.
I have had some problems installing wordpress-develop on the M1 chip, so I describe here how I have solved it.
Laravel Valet is a development environment for macOS minimalists. It was developed to use in Laravel projects, but in this post, I will explain how to install and use with WordPress.