Change the order of calling a function to improve the translation
-
Hi there
I’ve created the Brazilian Portuguese (pt_BR) translation for your plugin and sent you the PO and MO files by email, as you informed.
Anyway, I’ve had to change line 11 of pw-login-widget.php in order to call the “init” function before the “widgets_init” one.
If you don’t do this, the sidebar is registered before loading the translation and then sidebar’s description (in the admin area) seems not to be translated.So, here is what I’ve made:
add_action('init', array('SP_Nice_Login_Widget', 'init'), 1);
just added the last parameter “1”
It solved the translation little issue and everything is working here until now. Of course, if you have a better solution, I’d be glad to apply it.
Just another suggestion:
What do you think about creating a plugin deactivation hook for unregistering the sidebar?
I’ve already done this here just because I like to see everything clean when deactivating a plugin, but maybe it doesn’t make any difference for anybody else.Thank you for your good job!
https://www.ads-software.com/plugins/nice-login-register-widget/
- The topic ‘Change the order of calling a function to improve the translation’ is closed to new replies.