Merge lp:~porten-deactivatedaccount/eventum/devel into lp:eventum

Proposed by Harri Porten
Status: Merged
Merged at revision: 4269
Proposed branch: lp:~porten-deactivatedaccount/eventum/devel
Merge into: lp:eventum
Diff against target: 40 lines (+7/-1)
3 files modified
docs/ChangeLog (+1/-0)
lib/eventum/class.mail_helper.php (+1/-1)
tests/Mail_HelperTest.php (+5/-0)
To merge this branch: bzr merge lp:~porten-deactivatedaccount/eventum/devel
Reviewer Review Type Date Requested Status
Eventum Development Team Pending
Review via email: mp+47469@code.launchpad.net

Description of the change

Recognize Italian reply prefix in mail subject.

We encountered mails with Rif: subject prefix. Searching the Net I also found RIF: and Rif.:

To post a comment you must log in.
4265. By Elan Ruusamäe

fix argument order: first is expected and second is result

4266. By Elan Ruusamäe

make testing not depend on config

4267. By Elan Ruusamäe

- fix RemoveExcessRe testing

4268. By Elan Ruusamäe

Deprecate fixEncoding, wrap it to decodeQuotedPrintable

4269. By Elan Ruusamäe

Recognize Italian reply prefix in mail subject (Harri Porten) (merge #47469)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/ChangeLog'
2--- docs/ChangeLog 2011-01-25 13:09:42 +0000
3+++ docs/ChangeLog 2011-01-25 22:14:17 +0000
4@@ -25,6 +25,7 @@
5 - Allow translating 'Re: ' in email subjects (Elan Ruusamäe)
6 - Add 'Subscribe Me' button to issue details screen for quickly add user itself to default notification options (Elan Ruusamäe)
7 - Respect charset when processing Mime_Helper::fixEncoding, [merge req#47336]
8+- Recognize Italian reply prefix in mail subject (Harri Porten)
9
10 2010-08-19, Version 2.3
11 - Removed reference to dynCalendar.css (Bryan, #42301)
12
13=== modified file 'lib/eventum/class.mail_helper.php'
14--- lib/eventum/class.mail_helper.php 2011-01-19 10:31:30 +0000
15+++ lib/eventum/class.mail_helper.php 2011-01-25 22:14:17 +0000
16@@ -94,7 +94,7 @@
17 }
18 // XXX: this works in most cases,
19 // probably the reply prefixes should be configrable per Eventum install
20- $re_pattern = "/(\[#\d+\] ){0,1}(([Rr][Ee][Ss]?|Ответ|Antwort|SV|[Aa][Ww])(\[[0-9]+\])?[ \t]*: ){2}(.*)/";
21+ $re_pattern = "/(\[#\d+\] ){0,1}(([Rr][Ee][Ss]?|Ответ|Antwort|SV|[Aa][Ww]|[Rr][Ii][Ff]\.?)(\[[0-9]+\])?[ \t]*: ){2}(.*)/";
22 if (preg_match($re_pattern, $subject, $matches)) {
23 // TRANSLATORS: %1 = email subject
24 $re_format = '$1'.ev_gettext('Re: %1$s', '$5');
25
26=== modified file 'tests/Mail_HelperTest.php'
27--- tests/Mail_HelperTest.php 2011-01-19 10:31:30 +0000
28+++ tests/Mail_HelperTest.php 2011-01-25 22:14:17 +0000
29@@ -107,6 +107,11 @@
30 $subject = 're[2]: re: subject';
31 $res = $this->object->RemoveExcessRe($subject);
32 $this->assertEquals($res, 'Re: subject', 're[2]: with squares');
33+
34+ // Italian
35+ $subject = 'RIF: rif: Rif.: subject';
36+ $res = $this->object->RemoveExcessRe($subject);
37+ $this->assertEquals($res, 'Re: subject', 'RIF/rif prefix');
38 }
39
40 public function testRemoveExcessReIssueId()

Subscribers

People subscribed via source and target branches