summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorwurblzap%gmail.com <>2009-06-03 00:00:10 +0200
committerwurblzap%gmail.com <>2009-06-03 00:00:10 +0200
commit5a10ebe6514918f89e60e0dc43fa19ebe06c03be (patch)
treed2c2a8ecb05804f93e69fd79d58993d57f155258 /Bugzilla/Bug.pm
parenta778b485e088757d81606ff85aae2f39473c42f5 (diff)
downloadbugzilla-5a10ebe6514918f89e60e0dc43fa19ebe06c03be.tar.gz
bugzilla-5a10ebe6514918f89e60e0dc43fa19ebe06c03be.tar.xz
Bug 457657 – Make e-mail comment header localizable.
Patch by Marc Schumann <wurblzap@gmail.com>, r/a=LpSolit
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm24
1 files changed, 5 insertions, 19 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 79cf1dd5e..f1fc9c424 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -3060,29 +3060,15 @@ sub GetComments {
return \@comments;
}
-# Format language specific comments. This routine must not update
-# $comment{'body'} itself, see BugMail::prepare_comments().
+# Format language specific comments.
sub format_comment {
my $comment = shift;
+ my $template = Bugzilla->template_inner;
+ my $vars = {comment => $comment};
my $body;
- if ($comment->{'type'} == CMT_DUPE_OF) {
- $body = $comment->{'body'} . "\n\n" .
- get_text('bug_duplicate_of', { dupe_of => $comment->{'extra_data'} });
- }
- elsif ($comment->{'type'} == CMT_HAS_DUPE) {
- $body = get_text('bug_has_duplicate', { dupe => $comment->{'extra_data'} });
- }
- elsif ($comment->{'type'} == CMT_POPULAR_VOTES) {
- $body = get_text('bug_confirmed_by_votes');
- }
- elsif ($comment->{'type'} == CMT_MOVED_TO) {
- $body = $comment->{'body'} . "\n\n" .
- get_text('bug_moved_to', { login => $comment->{'extra_data'} });
- }
- else {
- $body = $comment->{'body'};
- }
+ $template->process("bug/format_comment.txt.tmpl", $vars, \$body)
+ || ThrowTemplateError($template->error());
return $body;
}