pelmered / composer-wp-language-updater

Automatically update the language files for core, plugins and themes after running install|update in composer.
6 stars 1 forks source link

Wordpress core language files not downloaded #9

Open msalaj opened 2 years ago

msalaj commented 2 years ago

Hi,

I am using bedrock wordpress and plugin and theme language files are downloaded, but no wordpress core language files.

I was looking into your code and found this:

case 'package': if ( 'johnpbloch/wordpress' === $package->getName() ) { $this->package_type = 'core'; $this->slug = 'wordpress-core'; break; }

I am using root/wordpress package for core, so looks like this would be a problem. Aren't there other way of determining core package except name?

Michal

pelmered commented 2 years ago

I haven't really maintained this in several years, but if you have a solution please submit a PR and I will look at it.

Otherwise, I guess just adding that name to the check would solve the problem.

tyrann0us commented 2 years ago

@msalaj, you are right, actually, the package should not treat a specific composer package as the WordPress package, but should look for a package of type "wordpress-core" as used by e.g. /johnpbloch/wordpress-core: https://github.com/johnpbloch/wordpress-core/blob/add65642b76d5a2fde178bb8448bc26e8a54ca00/composer.json#L9.

The problem is that this wouldn't help you either, because roots/wordpress is of type "metapackage": https://github.com/roots/wordpress/blob/41ff6e23ccbc3a1691406d69fe8c211a225514e2/composer.json#L10.

If I may suggest, it is best to use these three tools: