Commit e043bc7c authored by wurblzap%gmail.com's avatar wurblzap%gmail.com

Bug 394933 – “neworchanged” of bugmail could be localizable more easily.

Patch by Marc Schumann <wurblzap@gmail.com>; r=mkanat; a=mkanat
parent 615414f5
...@@ -500,7 +500,7 @@ sub Send { ...@@ -500,7 +500,7 @@ sub Send {
\@diffparts, \@diffparts,
$comments{$lang}, $comments{$lang},
$anyprivate, $anyprivate,
$start, ! $start,
$id, $id,
exists $watching{$user_id} ? exists $watching{$user_id} ?
$watching{$user_id} : undef); $watching{$user_id} : undef);
...@@ -522,8 +522,8 @@ sub Send { ...@@ -522,8 +522,8 @@ sub Send {
} }
sub sendMail { sub sendMail {
my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef, my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef,
$diffRef, $newcomments, $anyprivate, $start, $diffRef, $newcomments, $anyprivate, $isnew,
$id, $watchingRef) = @_; $id, $watchingRef) = @_;
my %values = %$valueRef; my %values = %$valueRef;
...@@ -590,8 +590,6 @@ sub sendMail { ...@@ -590,8 +590,6 @@ sub sendMail {
return 0; return 0;
} }
my $isnew = !$start;
# If an attachment was created, then add an URL. (Note: the 'g'lobal # If an attachment was created, then add an URL. (Note: the 'g'lobal
# replace should work with comments with multiple attachments.) # replace should work with comments with multiple attachments.)
...@@ -629,13 +627,14 @@ sub sendMail { ...@@ -629,13 +627,14 @@ sub sendMail {
my $threadingmarker; my $threadingmarker;
if ($isnew) { if ($isnew) {
$threadingmarker = "Message-ID: <bug-$id-" . $user->id . "$sitespec>"; $threadingmarker = "Message-ID: <bug-$id-" . $user->id . "$sitespec>";
} else { }
else {
$threadingmarker = "In-Reply-To: <bug-$id-" . $user->id . "$sitespec>"; $threadingmarker = "In-Reply-To: <bug-$id-" . $user->id . "$sitespec>";
} }
my $vars = { my $vars = {
neworchanged => $isnew ? 'New: ' : '', isnew => $isnew,
to => $user->email, to => $user->email,
bugid => $id, bugid => $id,
alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "", alias => Bugzilla->params->{'usebugaliases'} ? $values{'alias'} : "",
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
[% PROCESS "global/variables.none.tmpl" %] [% PROCESS "global/variables.none.tmpl" %]
From: [% Param('mailfrom') %] From: [% Param('mailfrom') %]
To: [% to %] To: [% to %]
Subject: [[% terms.Bug %] [%+ bugid %]] [% neworchanged %][%+ summary %] Subject: [[% terms.Bug %] [%+ bugid %]] [% 'New: ' IF isnew %][%+ summary %]
X-Bugzilla-Reason: [% reasonsheader %] X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: newchanged X-Bugzilla-Type: newchanged
X-Bugzilla-Watch-Reason: [% reasonswatchheader %] X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment