Open wordpressfan opened 4 weeks ago
Solution 2 sounds more complex to handle: I am not sure all our plugins (at group.One) use gulp and it means every plugin will need to maintain the gulp file and redo teh translations everytime.
Solution 1 seems easier technically. I don't know if we can easily setyp the new translation domain and maintain it easily too?
There might be a simple solution for this, I have 2 again actually
$main_plugin
parsed here, this means for this, we will need an array of all the domains for our plugins, we know for WP Rocket is wp-rocket
& Imagify is imagify
then we will send this to a variable which will be retrieved in WPMedia\PluginFamily\Model\wp_media_plugins.php
data and used anytime we use the translation functions.WPMedia\PluginFamily\Model\wp_media_plugins.php
data and used anytime we use the translation functions. then on the plugin side, we assign the domain to the new property.The difference between both options is that the first has fixed domains and the 2nd doesn't which makes it more flexible.
The solution provided might not work as expected and I think phpcs might flag an issue with it. So I might also have another simple solution, we can update the package to use translation functions but keeping the domain param as default and since we handle the dependency with mozart, meaning we have it in a custom dependencies folder, we can just pass in the domain manually and push. I think I'm with this.
Is your feature request related to a problem? Please describe.
Now the plugin details are not translatable because we don't use translation functions, and be generic because this package can be used in multiple plugins so different domains.
Describe the solution you'd like
I think we have two options here:
Additional context
Slack discussion: https://wp-media.slack.com/archives/CUT7FLHF1/p1730270980051869