Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations for custom packages ("pro" plugins) #3

Open
raph-topo opened this issue Nov 26, 2020 · 3 comments
Open

Translations for custom packages ("pro" plugins) #3

raph-topo opened this issue Nov 26, 2020 · 3 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@raph-topo
Copy link
Owner

Currently, it seems WP Translation cannot find translations for packages loaded from custom repositories, such as "pro" plugins and themes. Is it really the case?

@davidhund, I saw in your logs advanced-custom-fields/advanced-custom-fields-pro, does WP Translations output anything concerning that package? Did it install translations? Is the package key for the translations a different one?

If needed, I could add an additional setting to force-install translations.

@raph-topo raph-topo added help wanted Extra attention is needed question Further information is requested labels Nov 26, 2020
@raph-topo raph-topo self-assigned this Nov 26, 2020
@davidhund
Copy link

@raph-topo I am not sure if it showed something special re: those packages.
What would be the best way to test this? Can I have wp-translations 're-check' without changing my requirements?

@raph-topo
Copy link
Owner Author

Referring to #2 (comment)
I can see one custom plugin (i.e. not from WPackagist):

  - Installing advanced-custom-fields/advanced-custom-fields-pro (5.9.3): Extracting archive

But no news from WP Translations for it, like:

  - Translations of wpackagist-plugin/autoptimize: Downloaded nl_NL

So WP Translations did not recognize it as a WordPress plugin with potentially available translations. Probably the plugin's composer.json does not contain

  "type": "wordpress-plugin",

Could you please confirm that?

Also, in your development Vagrant, if you try Dashboard > Updates > Update Translations, does WordPress find translations for Advanced Custom Fields?

@davidhund
Copy link

@raph-topo Excuses for the delayed response, the plugin in your example (ACF-Pro) is special in that it is a premium plugin and not available as such on WPackagist.

Instead: I can install it through Composer using https://github.com/pivvenit/acf-pro-installer
This allows me to use the ACF Key from an .env file and in turn requires ACF Pro from a Composer 'Bridge' hosted as a GitHub Page.

An example of the returned packages.json file is found at e.g: https://github.com/pivvenit/acf-composer-bridge/blob/gh-pages/composer/v3/wordpress-muplugin/packages.json

Also: I use this as a 'must-use' plugin: so my composer uses:

...
	"repositories": [
		{
			"type": "composer",
			"url": "https://wpackagist.org",
			"only": [
				"wpackagist-plugin/*",
				"wpackagist-theme/*"
			]
		},
		{
			"type": "composer",
			"url": "https://pivvenit.github.io/acf-composer-bridge/composer/v3/wordpress-muplugin/"
		}
	],
...

All in All a complex setup. I guess this is also why the language files are not picked up…
Maybe you can think of some way to make this work ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants