The aggressive filter has some hardcoded strings in it, for several mail clients. However, this doesn't take localization into account. For instance, my mailclienst doesn't work with "On Jan 26, 2009, John Doe wrote:" but it uses the Dutch version: "On Jan 26, 2009, John Doe wrote: "Op 26 Jan 2012, om 21:50 heeft John Doe het volgende geschreven:"

It would be nice if there was a way to add custom strings without overriding the module. Maybe using a hook, or via the interface?

Comments

danepowell’s picture

Good point- unfortunately since the cleaners are all regexes, it's not simply a matter of running them through t(). I wonder if anyone else has solved the problem of how to localize regular expressions... I'm open to suggestions / patches.

renat’s picture

Looks like Variable module will play nice for this:
http://drupal.org/project/variable
But from my point of view it would be better to let site admin to define filtering patterns through module admin page. Actual hardcoded patterns may be there as a default values, but admin should be able to edit them, or to add new values. It will not just solve localization problem, it will make possible to add new mailing services. Some of them are English, but just not so popular.

kscheirer’s picture

Should be fairly easy to add a textarea to the admin settings, and use those in addition to the existing $delimiters, would that be enough?

danepowell’s picture

@kscheirer I think that makes the most sense. Ultimately it would be nice to use some sort of translation / internationalization solution, but letting admins define delimiters in the UI is a good stopgap, and generally useful anyway (to cover email clients that we don't support natively).