@milan,
Thanks for those tickets and translation files. First patch is quite sensible as it avoids needing to cut the message or subject from the string passed as they’d be available immediately.
The second patch has issues though, it stops users of the plugin being able to edit the emails in the templates area of the Settings page. I’ve tried to minimise the number of templates by combining the subscribe and unsubscribe emails.
This ticket holds a patch that moves translation loading to init. More over there.
@milan,
Thanks for the patch, I’ve committed the spelling correction already and I’ll read up on the translation patch later.
@milan,
According to the load_plugin_textdomain() codex entry, this function can be called more than one on a single domain and the strings are merged.
In the new load_translations() function how about something like this:
load_plugin_textdomain('subscribe2', false, S2DIR);
load_plugin_textdomain('subscribe2', false, S2DIR . "languages/");
load_plugin_textdomain('subscribe2', false, WP_CONTENT_DIR . "/languages/subscribe2/");
That way the plugin looks in it’s own root, in a languages folder and in the core location too.
In fact that last core location check might be better like this:
load_plugin_textdomain('subscribe2', false, WP_LANG_DIR . "/");
Then the code will look in wp-content (or whatever it might be names) and wp-includes for a languages folder.