Issue [Solved] Mail Translation
we are running wpDiscuz on multiple sides and some of them are multilingual. Most parts of the feature support the translaion.
I asked you to add a filter for the subject within: wpdiscuz/utils/class.WpdiscuzHelperEmail.php
L: 160 $subject = apply_filters("wpdiscuz_email_notification", true, $subject, $comment, $emailData);
And you added the filter call very fast, thanks for that.
But sadly I made a mistake with the position. This line is after the marker replacement magic. So it's translatable now, but I cannot use the marker in my translation. It would be great if you either move the apply_filters call bevor that happens or add another set of filters.
confirmEmailSender --> move apply_filters to before line 100 emailSender --> move apply_filters before 161
New apply_filters call suggestion:
confirmEmailSender line 100: wpdiscuz_email_subject_pre_compile wpdiscuz_email_content_pre_compile emailSender line 161: wpdiscuz_confirm_email_subject_pre_compile wpdiscuz_confirm_email_content_pre_compile
Thanks in advance and let me know if that is possible. It would improve the translatability of the plugin.
I'll get back to you once I get a response from the developers.
I found another function, where I can't translate the subject and content.
class.WpdiscuzHelperEmail.php > notifyOnApproving
Line: 355 / 356
$subject = str_replace(["[BLOG_TITLE]", "[POST_TITLE]", "[COMMENT_AUTHOR]"], [$blogTitle, $postTitle, $comment->comment_author], $this->options->subscription["emailSubjectCommentApproved"]); $message = str_replace($search, $replace, wpautop($this->options->subscription["emailContentCommentApproved"]));
Could you make it so that i can access the subject and message before the replacing is happening.