Implement hook_variable_info() instead of using php constants for mail notification template body and subject. Use variable module's functions to allow integration with I18n module for multilingual mail notifications.

This ought to be scheduled for version 2, because such approach departs from Comment Notify.

Comments

peacog’s picture

Version: » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new1.24 KB

I went ahead and made a patch for this. After you apply the patch, clear the cache and visit admin/config/regional/i18n/variable to enable the variables. Now when you edit Node Notify settings at admin/config/regional/i18n/variable you should see THERE ARE MULTILINGUAL VARIABLES IN THIS FORM at the top of the page.

donatasp’s picture

Hi, thanks for the patch :)

Can this be tested by writing a test case? I would be more inclined to commit this if there were some test cases. Do you use this with Comment Notify? If so, how does it play together? I see that Comment Notify does not use multilingual variables, they just pass body and subject through t().

I haven't got time to test this yet and would like some input from users.

peacog’s picture

I haven't written a test case before so I'm not sure where to start. Would you be able to give me some pointers so I can take a look when I have time?

I haven't used this with Comment Notify so I'm afraid I don't know if this will work with Comment Notify.

peacog’s picture

Issue summary: View changes

Comment about relation to Comment Notify.