pronamic / wp-pay-core

Core components for the WordPress payment processing library. This library is used in the WordPress plugin Pronamic Pay: https://www.pronamicpay.com/, but also allows other plugin developers to set up a payment plugin.
https://www.wp-pay.org/
GNU General Public License v3.0
27 stars 3 forks source link

Core library should no longer load .mo file into text domain #123

Closed remcotolsma closed 1 year ago

remcotolsma commented 1 year ago

Following lines should be removed:

https://github.com/pronamic/wp-pay-core/blob/b20133ecec3b72d2ca9fab58b6b693f93edf3063/src/Plugin.php#L663-L664

https://github.com/pronamic/wp-pay-core/blob/b20133ecec3b72d2ca9fab58b6b693f93edf3063/src/Plugin.php#L758-L769

I only noticed the following usage of Plugin::load_plugin_textdomain();:

https://github.com/pronamic/wp-pay-core/blob/b20133ecec3b72d2ca9fab58b6b693f93edf3063/src/Core/Util.php#L186-L199

This is/was related to the following issue:

See https://github.com/pronamic/wp-pay-core/commit/e76ddb952303815c169b00c05db23c6d8a5eb8d0.

@rvdsteege is this still necessary or can it be removed or set up differently based on new insights?

rvdsteege commented 1 year ago

Seems https://github.com/pronamic/wp-pronamic-pay/issues/136 was discovered, but not mentioned, in https://secure.helpscout.net/conversation/1522453114/22112/#thread-4473270781 . I think it could be removed as it is more WordPress core territory to load the user preferred language on frontend too.

remcotolsma commented 1 year ago

Let's remove it, maybe for users the https://wordpress.org/plugins/jsm-user-locale/ is a good alternative.