Active
Project:
Mail Comment
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2012 at 08:24 UTC
Updated:
15 May 2012 at 09:21 UTC
Jump to comment: Most recent
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
Comment #1
danepowell commentedGood 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.
Comment #2
renat commentedLooks 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.
Comment #3
kscheirerShould be fairly easy to add a textarea to the admin settings, and use those in addition to the existing $delimiters, would that be enough?
Comment #4
danepowell commented@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).