summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-19 03:56:38 +0200
committermkanat%bugzilla.org <>2006-09-19 03:56:38 +0200
commitfef6f78c2c8b9441dfd268257d40691ec79ef9a1 (patch)
tree897795c8eac444026eeff03a1eb62d79447297ed /Bugzilla
parent5750cad16151bf7ad028f7dc79a8ab39b2f9a07a (diff)
downloadbugzilla-fef6f78c2c8b9441dfd268257d40691ec79ef9a1.tar.gz
bugzilla-fef6f78c2c8b9441dfd268257d40691ec79ef9a1.tar.xz
Bug 223880: "marked a duplicate" messages cannot be localized
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/BugMail.pm2
-rw-r--r--Bugzilla/Template.pm6
-rw-r--r--Bugzilla/Util.pm2
3 files changed, 6 insertions, 4 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 35b05d231..2fc8b0f72 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -645,7 +645,7 @@ sub sendMail {
};
my $msg;
- my $template = Bugzilla::Template->create();
+ my $template = Bugzilla->template_inner;
$template->process("email/newchangedmail.txt.tmpl", $vars, \$msg)
|| ThrowTemplateError($template->error());
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index a60a453d6..b54c4a0f2 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -331,7 +331,8 @@ sub quoteUrls {
# we have to do this in one pattern, and so this is semi-messy.
# Also, we can't use $bug_re?$comment_re? because that will match the
# empty string
- my $bug_re = qr/bug\s*\#?\s*(\d+)/i;
+ my $bug_word = get_text('term', { term => 'bug' });
+ my $bug_re = qr/\Q$bug_word\E\s*\#?\s*(\d+)/i;
my $comment_re = qr/comment\s*\#?\s*(\d+)/i;
$text =~ s~\b($bug_re(?:\s*,?\s*$comment_re)?|$comment_re)
~ # We have several choices. $1 here is the link, and $2-4 are set
@@ -340,7 +341,8 @@ sub quoteUrls {
"<a href=\"$current_bugurl#c$4\">$1</a>")
~egox;
- # Old duplicate markers
+ # Old duplicate markers. These don't use $bug_word because they are old
+ # and were never customizable.
$text =~ s~(?<=^\*\*\*\ This\ bug\ has\ been\ marked\ as\ a\ duplicate\ of\ )
(\d+)
(?=\ \*\*\*\Z)
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index c051a987f..8457c8df8 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -400,7 +400,7 @@ sub clean_text {
sub get_text {
my ($name, $vars) = @_;
- my $template = Bugzilla->template;
+ my $template = Bugzilla->template_inner;
$vars ||= {};
$vars->{'message'} = $name;
my $message;